Prev: error C2371: 'WCHAR' : redefinition; different basic types when including odbcss.h
Next: CComboBoxEx Dropdown height
From: Dave on 4 Oct 2005 15:31 Hello all, The problem described in this post is being experienced with VC++ 7.1 under Windows XP. I am having a problem compiling a resource file. The following error results: ..\AVIV.rc(87) : error RC2104 : undefined keyword or key name: DIALOG I should note that I have not edited my resource file by hand - all work has been done through the resource editor. So, I'm not sure how this problem came to be... The block of resource code below shows where the error is being flagged. #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_AUXCTRL, DIALOG <========== ERROR HERE! BEGIN LEFTMARGIN, 3 END END #endif // APSTUDIO_INVOKED I have included the entire file contents below in case more context is needed. Does anybody have any idea what the problem is? Thanks, Dave // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS //////////////////////////////////////////////////////////////////////////// / // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" //////////////////////////////////////////////////////////////////////////// / #undef APSTUDIO_READONLY_SYMBOLS //////////////////////////////////////////////////////////////////////////// / // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED //////////////////////////////////////////////////////////////////////////// / // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "#include ""res\\Version.rc2""\r\n" "\0" END #endif // APSTUDIO_INVOKED //////////////////////////////////////////////////////////////////////////// / // // Dialog // IDD_AUXCTRL DIALOGEX 0, 0, 123, 76 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "AVIV Auxiliary Control" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "Close",IDC_CMDCLOSE,68,56,42,14 CTEXT "Gain",IDC_STATIC,27,61,25,9 CTEXT "Level",IDC_STATIC,3,61,23,9 GROUPBOX " Hot ",IDC_STATIC,55,9,54,41 CONTROL "White",IDC_RADWHITE,"Button",BS_AUTORADIOBUTTON | BS_LEFTTEXT,63,21,37,8 CONTROL "Black",IDC_RADBLACK,"Button",BS_AUTORADIOBUTTON | BS_LEFTTEXT,63,37,37,8 CONTROL 1602,IDC_LEVEL_UP,"Static",SS_BITMAP,10,30,11,10, WS_EX_DLGMODALFRAME CONTROL 1604,IDC_LEVEL_DOWN,"Static",SS_BITMAP,10,44,11,10, WS_EX_DLGMODALFRAME CONTROL 1602,IDC_GAIN_UP,"Static",SS_BITMAP,34,30,11,10, WS_EX_DLGMODALFRAME CONTROL 1604,IDC_GAIN_DOWN,"Static",SS_BITMAP,34,45,11,10, WS_EX_DLGMODALFRAME END //////////////////////////////////////////////////////////////////////////// / // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_AUXCTRL, DIALOG BEGIN LEFTMARGIN, 3 END END #endif // APSTUDIO_INVOKED //////////////////////////////////////////////////////////////////////////// / // // Bitmap // IDB_UP BITMAP "res\\up.bmp" IDB_UPX BITMAP "res\\up_x.bmp" IDB_DOWN BITMAP "res\\down.bmp" IDB_DOWNX BITMAP "res\\down_x.bmp" #endif // English (U.S.) resources //////////////////////////////////////////////////////////////////////////// / #ifndef APSTUDIO_INVOKED //////////////////////////////////////////////////////////////////////////// / // // Generated from the TEXTINCLUDE 3 resource. // #include "res\Version.rc2" //////////////////////////////////////////////////////////////////////////// / #endif // not APSTUDIO_INVOKED
From: Tom Serface on 4 Oct 2005 18:14 That code should be OK. It's a very simple dialog of course, but... You could try editing the code by hand (use NotePad or open using Open With and edit in Visual Studio) and just remove that code and add the dialog back in. Is IDD_AUXCTRL in your resource.h file? Still, DIALOG is a valid. This error might happen because some of the parameters are missing. A typical one would look like: IDD_MYDIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 480 TOPMARGIN, 1 BOTTOMMARGIN, 42 END Tom "Dave" <better_cs_now(a)yahoo.com> wrote in message news:11k5m567cv5crdd(a)news.supernews.com... > Hello all, > > The problem described in this post is being experienced with VC++ 7.1 > under > Windows XP. > > I am having a problem compiling a resource file. The following error > results: > .\AVIV.rc(87) : error RC2104 : undefined keyword or key name: DIALOG > > > I should note that I have not edited my resource file by hand - all work > has > been done through the resource editor. So, I'm not sure how this problem > came to be... > > The block of resource code below shows where the error is being flagged. > > #ifdef APSTUDIO_INVOKED > GUIDELINES DESIGNINFO > BEGIN > IDD_AUXCTRL, DIALOG <========== ERROR HERE! > BEGIN > LEFTMARGIN, 3 > END > END > #endif // APSTUDIO_INVOKED > > > > I have included the entire file contents below in case more context is > needed. Does anybody have any idea what the problem is? > > Thanks, > > Dave > > > > > > > > > > // Microsoft Visual C++ generated resource script. > // > #include "resource.h" > > #define APSTUDIO_READONLY_SYMBOLS > //////////////////////////////////////////////////////////////////////////// > / > // > // Generated from the TEXTINCLUDE 2 resource. > // > #include "afxres.h" > > //////////////////////////////////////////////////////////////////////////// > / > #undef APSTUDIO_READONLY_SYMBOLS > > //////////////////////////////////////////////////////////////////////////// > / > // English (U.S.) resources > > #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) > #ifdef _WIN32 > LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US > #pragma code_page(1252) > #endif //_WIN32 > > #ifdef APSTUDIO_INVOKED > //////////////////////////////////////////////////////////////////////////// > / > // > // TEXTINCLUDE > // > > 1 TEXTINCLUDE > BEGIN > "resource.h\0" > END > > 2 TEXTINCLUDE > BEGIN > "#include ""afxres.h""\r\n" > "\0" > END > > 3 TEXTINCLUDE > BEGIN > "#include ""res\\Version.rc2""\r\n" > "\0" > END > > #endif // APSTUDIO_INVOKED > > > //////////////////////////////////////////////////////////////////////////// > / > // > // Dialog > // > > IDD_AUXCTRL DIALOGEX 0, 0, 123, 76 > STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION > CAPTION "AVIV Auxiliary Control" > FONT 8, "MS Sans Serif", 0, 0, 0x0 > BEGIN > DEFPUSHBUTTON "Close",IDC_CMDCLOSE,68,56,42,14 > CTEXT "Gain",IDC_STATIC,27,61,25,9 > CTEXT "Level",IDC_STATIC,3,61,23,9 > GROUPBOX " Hot ",IDC_STATIC,55,9,54,41 > CONTROL "White",IDC_RADWHITE,"Button",BS_AUTORADIOBUTTON | > BS_LEFTTEXT,63,21,37,8 > CONTROL "Black",IDC_RADBLACK,"Button",BS_AUTORADIOBUTTON | > BS_LEFTTEXT,63,37,37,8 > CONTROL 1602,IDC_LEVEL_UP,"Static",SS_BITMAP,10,30,11,10, > WS_EX_DLGMODALFRAME > CONTROL 1604,IDC_LEVEL_DOWN,"Static",SS_BITMAP,10,44,11,10, > WS_EX_DLGMODALFRAME > CONTROL 1602,IDC_GAIN_UP,"Static",SS_BITMAP,34,30,11,10, > WS_EX_DLGMODALFRAME > CONTROL 1604,IDC_GAIN_DOWN,"Static",SS_BITMAP,34,45,11,10, > WS_EX_DLGMODALFRAME > END > > > //////////////////////////////////////////////////////////////////////////// > / > // > // DESIGNINFO > // > > #ifdef APSTUDIO_INVOKED > GUIDELINES DESIGNINFO > BEGIN > IDD_AUXCTRL, DIALOG > BEGIN > LEFTMARGIN, 3 > END > END > #endif // APSTUDIO_INVOKED > > > //////////////////////////////////////////////////////////////////////////// > / > // > // Bitmap > // > > IDB_UP BITMAP "res\\up.bmp" > IDB_UPX BITMAP "res\\up_x.bmp" > IDB_DOWN BITMAP "res\\down.bmp" > IDB_DOWNX BITMAP "res\\down_x.bmp" > #endif // English (U.S.) resources > //////////////////////////////////////////////////////////////////////////// > / > > > > #ifndef APSTUDIO_INVOKED > //////////////////////////////////////////////////////////////////////////// > / > // > // Generated from the TEXTINCLUDE 3 resource. > // > #include "res\Version.rc2" > > //////////////////////////////////////////////////////////////////////////// > / > #endif // not APSTUDIO_INVOKED > > >
From: Alexander Grigoriev on 5 Oct 2005 00:54
See if APSTUDIO_INVOKED got defined in the resource includes. It should not be defined during resource compilation. "Dave" <better_cs_now(a)yahoo.com> wrote in message news:11k5m567cv5crdd(a)news.supernews.com... > Hello all, > > The problem described in this post is being experienced with VC++ 7.1 > under > Windows XP. > > I am having a problem compiling a resource file. The following error > results: > .\AVIV.rc(87) : error RC2104 : undefined keyword or key name: DIALOG > > > I should note that I have not edited my resource file by hand - all work > has > been done through the resource editor. So, I'm not sure how this problem > came to be... > > The block of resource code below shows where the error is being flagged. > > #ifdef APSTUDIO_INVOKED > GUIDELINES DESIGNINFO > BEGIN > IDD_AUXCTRL, DIALOG <========== ERROR HERE! > BEGIN > LEFTMARGIN, 3 > END > END > #endif // APSTUDIO_INVOKED > > > > I have included the entire file contents below in case more context is > needed. Does anybody have any idea what the problem is? > > Thanks, > > Dave > > > > > > > > > > // Microsoft Visual C++ generated resource script. > // > #include "resource.h" > > #define APSTUDIO_READONLY_SYMBOLS > //////////////////////////////////////////////////////////////////////////// > / > // > // Generated from the TEXTINCLUDE 2 resource. > // > #include "afxres.h" > > //////////////////////////////////////////////////////////////////////////// > / > #undef APSTUDIO_READONLY_SYMBOLS > > //////////////////////////////////////////////////////////////////////////// > / > // English (U.S.) resources > > #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) > #ifdef _WIN32 > LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US > #pragma code_page(1252) > #endif //_WIN32 > > #ifdef APSTUDIO_INVOKED > //////////////////////////////////////////////////////////////////////////// > / > // > // TEXTINCLUDE > // > > 1 TEXTINCLUDE > BEGIN > "resource.h\0" > END > > 2 TEXTINCLUDE > BEGIN > "#include ""afxres.h""\r\n" > "\0" > END > > 3 TEXTINCLUDE > BEGIN > "#include ""res\\Version.rc2""\r\n" > "\0" > END > > #endif // APSTUDIO_INVOKED > > > //////////////////////////////////////////////////////////////////////////// > / > // > // Dialog > // > > IDD_AUXCTRL DIALOGEX 0, 0, 123, 76 > STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION > CAPTION "AVIV Auxiliary Control" > FONT 8, "MS Sans Serif", 0, 0, 0x0 > BEGIN > DEFPUSHBUTTON "Close",IDC_CMDCLOSE,68,56,42,14 > CTEXT "Gain",IDC_STATIC,27,61,25,9 > CTEXT "Level",IDC_STATIC,3,61,23,9 > GROUPBOX " Hot ",IDC_STATIC,55,9,54,41 > CONTROL "White",IDC_RADWHITE,"Button",BS_AUTORADIOBUTTON | > BS_LEFTTEXT,63,21,37,8 > CONTROL "Black",IDC_RADBLACK,"Button",BS_AUTORADIOBUTTON | > BS_LEFTTEXT,63,37,37,8 > CONTROL 1602,IDC_LEVEL_UP,"Static",SS_BITMAP,10,30,11,10, > WS_EX_DLGMODALFRAME > CONTROL 1604,IDC_LEVEL_DOWN,"Static",SS_BITMAP,10,44,11,10, > WS_EX_DLGMODALFRAME > CONTROL 1602,IDC_GAIN_UP,"Static",SS_BITMAP,34,30,11,10, > WS_EX_DLGMODALFRAME > CONTROL 1604,IDC_GAIN_DOWN,"Static",SS_BITMAP,34,45,11,10, > WS_EX_DLGMODALFRAME > END > > > //////////////////////////////////////////////////////////////////////////// > / > // > // DESIGNINFO > // > > #ifdef APSTUDIO_INVOKED > GUIDELINES DESIGNINFO > BEGIN > IDD_AUXCTRL, DIALOG > BEGIN > LEFTMARGIN, 3 > END > END > #endif // APSTUDIO_INVOKED > > > //////////////////////////////////////////////////////////////////////////// > / > // > // Bitmap > // > > IDB_UP BITMAP "res\\up.bmp" > IDB_UPX BITMAP "res\\up_x.bmp" > IDB_DOWN BITMAP "res\\down.bmp" > IDB_DOWNX BITMAP "res\\down_x.bmp" > #endif // English (U.S.) resources > //////////////////////////////////////////////////////////////////////////// > / > > > > #ifndef APSTUDIO_INVOKED > //////////////////////////////////////////////////////////////////////////// > / > // > // Generated from the TEXTINCLUDE 3 resource. > // > #include "res\Version.rc2" > > //////////////////////////////////////////////////////////////////////////// > / > #endif // not APSTUDIO_INVOKED > > > |