Click here to Skip to main content
15,889,335 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: displaying dialog in MDIParent when it's loaded Pin
venadder21-Apr-06 7:19
venadder21-Apr-06 7:19 
AnswerRe: displaying dialog in MDIParent when it's loaded Pin
Cool Ju19-Apr-06 21:39
Cool Ju19-Apr-06 21:39 
GeneralRe: displaying dialog in MDIParent when it's loaded Pin
venadder21-Apr-06 6:10
venadder21-Apr-06 6:10 
GeneralRe: displaying dialog in MDIParent when it's loaded Pin
Cool Ju23-Apr-06 17:15
Cool Ju23-Apr-06 17:15 
GeneralRe: displaying dialog in MDIParent when it's loaded Pin
venadder24-Apr-06 6:37
venadder24-Apr-06 6:37 
GeneralRe: displaying dialog in MDIParent when it's loaded Pin
Cool Ju24-Apr-06 19:15
Cool Ju24-Apr-06 19:15 
GeneralRe: displaying dialog in MDIParent when it's loaded Pin
venadder25-Apr-06 5:30
venadder25-Apr-06 5:30 
QuestionConditionals and RC files Pin
rentzk19-Apr-06 15:14
rentzk19-Apr-06 15:14 
I have a code base that can produce two separate programs with different functionality. This functionality is controlled via #defines in the main code. I would like to use the same #define to control the program’s icon, and the wording in a few menus. I found that the following code will allow me to control the icon:

<br />
#if defined(APSTUDIO_INVOKED)<br />
IDR_MAINFRAME           ICON                    "..\\res\\MAIN.ico"<br />
#else<br />
#if defined(MAIN_PROG)<br />
IDR_MAINFRAME			ICON           "..\\res\\MAIN.ico"<br />
#else<br />
IDR_MAINFRAME		        ICON           "..\\res\\SECONDARY.ico"<br />
#endif<br />
#endif<br />


The problem is that as soon as someone actually edits a file with the resource editor, all of the conditional code is removed.

Is it actually possible to conditionally change the icon of a program, and if so what is the recommended method. I’m trying to avoid going to multiple rc files, since we will have to keep them in sync from this point on.
AnswerRe: Conditionals and RC files Pin
Stephen Hewitt19-Apr-06 15:37
Stephen Hewitt19-Apr-06 15:37 
GeneralRe: Conditionals and RC files Pin
Bram van Kampen19-Apr-06 16:14
Bram van Kampen19-Apr-06 16:14 
GeneralRe: Conditionals and RC files Pin
Stephen Hewitt19-Apr-06 17:39
Stephen Hewitt19-Apr-06 17:39 
GeneralRe: Conditionals and RC files Pin
David Crow20-Apr-06 3:54
David Crow20-Apr-06 3:54 
GeneralRe: Conditionals and RC files Pin
kiran janaswamy19-Apr-06 19:02
kiran janaswamy19-Apr-06 19:02 
GeneralRe: Conditionals and RC files Pin
Stephen Hewitt19-Apr-06 20:38
Stephen Hewitt19-Apr-06 20:38 
QuestionRe: Conditionals and RC files Pin
David Crow20-Apr-06 3:59
David Crow20-Apr-06 3:59 
AnswerRe: Conditionals and RC files Pin
rentzk20-Apr-06 5:48
rentzk20-Apr-06 5:48 
QuestionMFC, DLL's Pin
Bram van Kampen19-Apr-06 14:37
Bram van Kampen19-Apr-06 14:37 
AnswerRe: Forwarding API's Pin
Bram van Kampen19-Apr-06 16:02
Bram van Kampen19-Apr-06 16:02 
QuestionCFile::Read Pin
Sam 200619-Apr-06 14:16
Sam 200619-Apr-06 14:16 
AnswerRe: CFile::Read Pin
valikac19-Apr-06 14:51
valikac19-Apr-06 14:51 
GeneralRe: CFile::Read Pin
Sam 200619-Apr-06 17:29
Sam 200619-Apr-06 17:29 
AnswerRe: CFile::Read Pin
Bram van Kampen19-Apr-06 15:56
Bram van Kampen19-Apr-06 15:56 
AnswerRe: CFile::Read Pin
kiran janaswamy19-Apr-06 19:38
kiran janaswamy19-Apr-06 19:38 
GeneralRe: CFile::Read Pin
David Crow20-Apr-06 4:02
David Crow20-Apr-06 4:02 
QuestionCrypto Api - create key with standard RSA rather than strong RSA (for W2K compatibility) Pin
EthannCastell19-Apr-06 13:52
EthannCastell19-Apr-06 13:52 

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.