Click here to Skip to main content
15,905,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Error message running exe Pin
Luc Pattyn28-Mar-11 14:37
sitebuilderLuc Pattyn28-Mar-11 14:37 
AnswerRe: Error message running exe Pin
Albert Holguin28-Mar-11 15:36
professionalAlbert Holguin28-Mar-11 15:36 
AnswerRe: Error message running exe Pin
Hans Dietrich28-Mar-11 16:25
mentorHans Dietrich28-Mar-11 16:25 
GeneralRe: Error message running exe Pin
Albert Holguin28-Mar-11 17:45
professionalAlbert Holguin28-Mar-11 17:45 
AnswerRe: Error message running exe Pin
Nitheesh George28-Mar-11 20:27
Nitheesh George28-Mar-11 20:27 
GeneralRe: Error message running exe Pin
Cyclone_S29-Mar-11 14:02
Cyclone_S29-Mar-11 14:02 
AnswerRe: Error message running exe Pin
malaugh31-Mar-11 13:05
malaugh31-Mar-11 13:05 
QuestionPreprocessor directives - resources Pin
bob1697228-Mar-11 5:36
bob1697228-Mar-11 5:36 
AnswerRe: Preprocessor directives - resources Pin
Richard MacCutchan28-Mar-11 5:58
mveRichard MacCutchan28-Mar-11 5:58 
GeneralRe: Preprocessor directives - resources Pin
bob1697228-Mar-11 7:45
bob1697228-Mar-11 7:45 
GeneralRe: Preprocessor directives - resources Pin
bob1697228-Mar-11 8:11
bob1697228-Mar-11 8:11 
GeneralRe: Preprocessor directives - resources Pin
Richard MacCutchan28-Mar-11 9:06
mveRichard MacCutchan28-Mar-11 9:06 
GeneralRe: Preprocessor directives - resources Pin
bob1697228-Mar-11 17:02
bob1697228-Mar-11 17:02 
GeneralRe: Preprocessor directives - resources Pin
Richard MacCutchan28-Mar-11 22:26
mveRichard MacCutchan28-Mar-11 22:26 
GeneralRe: Preprocessor directives - resources Pin
Chris Meech28-Mar-11 9:15
Chris Meech28-Mar-11 9:15 
GeneralRe: Preprocessor directives - resources Pin
bob1697228-Mar-11 17:09
bob1697228-Mar-11 17:09 
AnswerRe: Preprocessor directives - resources Pin
cp987628-Mar-11 19:29
cp987628-Mar-11 19:29 
GeneralRe: Preprocessor directives - resources Pin
bob1697229-Mar-11 3:18
bob1697229-Mar-11 3:18 
GeneralRe: Preprocessor directives - resources Pin
cp987629-Mar-11 18:38
cp987629-Mar-11 18:38 
We've been using this since VC6 to have customised menus, dialogs, bitmaps etc in different builds.

I just checked VC6 and it appears that in VC6 you can add a preprocessor condition to any resource item EXCEPT string tables, these seem to only depend on language. We skipped VS2003 so I can't comment on what you can do there, but if there is no Condition field in the Properties window on string tables then I guess it isn't supported yet. Just look at the properties windows for other resources (e.g. menus) and you should see the Condition field.

You should be able to use the same syntax in the .rc file that VS uses for other resources dependent on preprocessor definitions, and use the same in string tables. For example, a menu that is only included when DEFINE1 is defined appears as:

#if defined(APSTUDIO_INVOKED) || defined(DEFINE1)
#if defined(APSTUDIO_INVOKED)
IDR_MENU1$(DEFINE1) MENU DISCARDABLE 
#else
IDR_MENU1 MENU DISCARDABLE 
#endif
BEGIN
    POPUP "Menu1"
    BEGIN
        MENUITEM "Help",                 ID_HELP_X
        ...
        ...
    END
END
#endif


I'm not sure about the APSTUDIO_INVOKED, it seems to use two different mechanisms for the conditional inclusion, one for the IDE and the other for a command line version.

You should be able to create a couple of conditional menus or other resources and check the syntax of the .rc file.

Don't forget that you specify these defines under the Resources settings in the Project settings.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

QuestionCan we stop and .exe from anthoer .exe Pin
pandit8428-Mar-11 1:08
pandit8428-Mar-11 1:08 
AnswerRe: Can we stop and .exe from anthoer .exe Pin
Nitheesh George28-Mar-11 2:24
Nitheesh George28-Mar-11 2:24 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
pandit8428-Mar-11 2:30
pandit8428-Mar-11 2:30 
AnswerRe: Can we stop an .exe from anthoer .exe Pin
Rajesh R Subramanian28-Mar-11 2:46
professionalRajesh R Subramanian28-Mar-11 2:46 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
Cedric Moonen28-Mar-11 3:00
Cedric Moonen28-Mar-11 3:00 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
CPallini28-Mar-11 3:12
mveCPallini28-Mar-11 3:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.