The MASM Forum

General => The Campus => Topic started by: Magnum on February 27, 2013, 01:53:29 AM

Title: DS_MODALFRAME error
Post by: Magnum on February 27, 2013, 01:53:29 AM
rsrc.rc.
Writing BITMAP:1000,   lang:0x409,   size 958122.rsrc.rc (4): error RC2104 : undefined keyword or key name: DS_MODALFRAME


1000 BITMAP "Bitmap_2.bmp"

MYDIALOG DIALOG 10, 10, 320, 250
STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Number of gallons needed."
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
   CONTROL 1000, 1000, STATIC, SS_BITMAP | WS_CHILD | WS_VISIBLE, 0, 0, 640, 499
   CONTROL "", 3000, EDIT, ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 128, 97, 100, 13
   CONTROL "Check it", 3001, BUTTON, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 240, 97, 52, 13
}

3005 ICON "Icon_1.ico"
Title: Re: DS_MODALFRAME error
Post by: dedndave on February 27, 2013, 02:15:56 AM
you want the first line of your resource file to be....

#include "\masm32\include\resource.h"

it defines most of the windows constants you will use
Title: Re: DS_MODALFRAME error
Post by: hfheatherfox07 on February 27, 2013, 02:17:13 AM
Hello,
You need to add an include file ( I use ResEd ) to do that ...
Masm32/include/resource.h

Than you are good to go  :biggrin:
Title: Re: DS_MODALFRAME error
Post by: hfheatherfox07 on February 27, 2013, 02:21:42 AM
LOL
dedndave, you typed faster than I did .... Just saw your answer   8)
Title: Re: DS_MODALFRAME error
Post by: dedndave on February 27, 2013, 02:33:55 AM
copy....paste    :biggrin:
Title: Re: DS_MODALFRAME error
Post by: Magnum on February 27, 2013, 03:08:45 AM
Thanks gentlemen, I don't know why I forgot the include file.

Andy