Click here to Skip to main content
15,921,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
Ah crud. I spoke too soon. (I had only compiled it and did not try to run it when I replied earlier)

I removed those two string resources, IDR_MAINFRAME and AFX_IDS_APP_TITLE, from the .rc file and put them in the .rc2 file.

If I simply place them in there, in a STRINGTABLE, the application works correctly (has the correct title and such).
However, once I try to put a preprocessor directive in there, it compiles but the values will be incorrect sometimes depending on which value is in the if branch and the else branch.

After some experimentation, it appears that the last string assigment wins. I'm guessing that means it is ignoring the preprocessor directives or my symbol is not defined yet. I defined the symbol way up toward the top in my stdafx.h file but I'm guessing this isn't early enough?

You don't happen to remember where you defined your symbol when you had the need to do something like this?
I apologize for the extra question.
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 
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 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
pandit8428-Mar-11 3:29
pandit8428-Mar-11 3:29 
QuestionRe: Can we stop an .exe from anthoer .exe Pin
Rajesh R Subramanian28-Mar-11 3:42
professionalRajesh R Subramanian28-Mar-11 3:42 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
pandit8428-Mar-11 3:50
pandit8428-Mar-11 3:50 
QuestionRe: Can we stop an .exe from anthoer .exe Pin
Rajesh R Subramanian28-Mar-11 3:58
professionalRajesh R Subramanian28-Mar-11 3:58 
AnswerRe: Can we stop an .exe from anthoer .exe Pin
pandit8428-Mar-11 4:20
pandit8428-Mar-11 4:20 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
Stefan_Lang28-Mar-11 5:39
Stefan_Lang28-Mar-11 5:39 
GeneralRe: Can we stop an .exe from anthoer .exe Pin
CPallini28-Mar-11 6:02
mveCPallini28-Mar-11 6:02 
AnswerRe: Can we stop and .exe from anthoer .exe Pin
Rolf Kristensen28-Mar-11 7:07
Rolf Kristensen28-Mar-11 7:07 
GeneralRe: Can we stop and .exe from anthoer .exe Pin
pandit8428-Mar-11 7:19
pandit8428-Mar-11 7:19 

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.