From: David Lowndes on 16 Apr 2010 05:43 >I've created copies of the relevant resources, and assigned conditions >to each of them. I've also added the definitions to "Project >Properties->Resources->General->Preprocesor definitions". > >I need the definitions to be seen by my application code as well, >since there are 3 different code paths depending on the proprocessor >definition, so I put the #defines in a separate file choice.h and >#include in stdafx.h. You want to eliminate the duplicated definition from the project settings and just include the same header file in your .rc file. Dave
From: Joseph M. Newcomer on 16 Apr 2010 09:40 And to include that header file, you will want to modify the "preprocessor includes" using the IDE. DO NOT edit your file "by hand" unless you well-and-truly understand what you are doing! joe On Fri, 16 Apr 2010 10:43:51 +0100, David Lowndes <DavidL(a)example.invalid> wrote: >>I've created copies of the relevant resources, and assigned conditions >>to each of them. I've also added the definitions to "Project >>Properties->Resources->General->Preprocesor definitions". >> >>I need the definitions to be seen by my application code as well, >>since there are 3 different code paths depending on the proprocessor >>definition, so I put the #defines in a separate file choice.h and >>#include in stdafx.h. > >You want to eliminate the duplicated definition from the project >settings and just include the same header file in your .rc file. > >Dave Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Joseph M. Newcomer on 19 Apr 2010 12:06 See below... On Sun, 18 Apr 2010 19:00:10 -0700 (PDT), galapogos <goister(a)gmail.com> wrote: >On Apr 16, 9:40�pm, Joseph M. Newcomer <newco...(a)flounder.com> wrote: >> And to include that header file, you will want to modify the "preprocessor includes" using >> the IDE. �DO NOT edit your file "by hand" unless you well-and-truly understand what you >> are doing! >> � � � � � � � � � � � � joe >> >> On Fri, 16 Apr 2010 10:43:51 +0100, David Lowndes <Dav...(a)example.invalid> wrote: >> >>I've created copies of the relevant resources, and assigned conditions >> >>to each of them. I've also added the definitions to "Project >> >>Properties->Resources->General->Preprocesor definitions". >> >> >>I need the definitions to be seen by my application code as well, >> >>since there are 3 different code paths depending on the proprocessor >> >>definition, so I put the #defines in a separate file choice.h and >> >>#include in stdafx.h. >> >> >You want to eliminate the duplicated definition from the project >> >settings and just include the same header file in your .rc file. >> >> >Dave >> >> Joseph M. Newcomer [MVP] >> email: newco...(a)flounder.com >> Web:http://www.flounder.com >> MVP Tips:http://www.flounder.com/mvp_tips.htm > >Hi, > >I'm not quite sure I understand. You mean include the choice.h header >file that I put my definitions in the .rc file? When I try to do that, >the #include gets removed every time I make changes to the resources >using resource editor. **** That's what I meant by "do not edit this file by hand unless you understand what you are doing". Yes, this is what is SUPPOSED to happen. But if you look under the Edit menu of VS, there is an option to modify the resource include files used, and THAT is what you must use to make the change! ***** > >Where in the VS2005 IDE can I find preprocessor includes? Do I need to >include choice.h both there and in "Project >>>Properties->Resources->General->Preprocesor definitions"? **** Edit>Resource Includes... due to the usual terminal stupidity of the IDE design, this menu (which should be global and always available) does not contain the Resource Includes... item unless you are in the context of having the .rc file selected. Add the directive to the lower of the two boxes. joe **** Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Joseph M. Newcomer on 19 Apr 2010 12:06 I've never tried to change these strings, so I really don't know. joe On Mon, 19 Apr 2010 00:56:25 -0700 (PDT), galapogos <goister(a)gmail.com> wrote: >On Apr 19, 10:00�am, galapogos <gois...(a)gmail.com> wrote: >> On Apr 16, 9:40�pm, Joseph M. Newcomer <newco...(a)flounder.com> wrote: >> >> >> >> > And to include that header file, you will want to modify the "preprocessor includes" using >> > the IDE. �DO NOT edit your file "by hand" unless you well-and-truly understand what you >> > are doing! >> > � � � � � � � � � � � � joe >> >> > On Fri, 16 Apr 2010 10:43:51 +0100, David Lowndes <Dav...(a)example.invalid> wrote: >> > >>I've created copies of the relevant resources, and assigned conditions >> > >>to each of them. I've also added the definitions to "Project >> > >>Properties->Resources->General->Preprocesor definitions". >> >> > >>I need the definitions to be seen by my application code as well, >> > >>since there are 3 different code paths depending on the proprocessor >> > >>definition, so I put the #defines in a separate file choice.h and >> > >>#include in stdafx.h. >> >> > >You want to eliminate the duplicated definition from the project >> > >settings and just include the same header file in your .rc file. >> >> > >Dave >> >> > Joseph M. Newcomer [MVP] >> > email: newco...(a)flounder.com >> > Web:http://www.flounder.com >> > MVP Tips:http://www.flounder.com/mvp_tips.htm >> >> Hi, >> >> I'm not quite sure I understand. You mean include the choice.h header >> file that I put my definitions in the .rc file? When I try to do that, >> the #include gets removed every time I make changes to the resources >> using resource editor. >> >> Where in the VS2005 IDE can I find preprocessor includes? Do I need to >> include choice.h both there and in "Project >> >> >>Properties->Resources->General->Preprocesor definitions"? > > I found out where to put the #include...in the resource tree view. It >works now. Another thing though...how do I change IDR_MAINFRAME and >AFX_IDS_APP_TITLE based on the #if conditionals? Which resource should >I copy and set a condition to? Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
|
Pages: 1 Prev: Performance Counter in windows vista Next: PreTranslateMessage |