Einzeilermakros statt Mehrzeiler #ifdef IDS_MY_RESOURCE....?
- From: "Michael Schikora" <schiko@xxxxxxxxxx>
- Date: Mon, 21 Jan 2008 17:31:28 +0100
Moin zusammen,
hat jemand eine Idee, ob es eine Möglichkeit gibt folgende Zeilen
#ifdef ID_MY_STRING
strMyString.LoadString(IDC_MY_STRING)
#else
strMyString=_T("Default String")
#endif
zusammenzufassen in ein Makro o.ä. à la:
LOAD_STRING_IF_ID_DEFINED(str,ID_MY_STRING,"Default String");
#define LOAD_STRING_IF_DEFINED(str,ID,defaultString) \
#ifdef ID\
str.LoadString(ID)\
#else\
str=sefaultString
--
MfG Samples: http://www.codeproject.com
Schiko Samples: http://codeguru.earthweb.com
FAQ: http://www.mpdvc.de
Privat: http://www.schikos.de/MFC.html
Motorrad als Boot: http://bootorrad.de
.
- Follow-Ups:
- Re: Einzeilermakros statt Mehrzeiler #ifdef IDS_MY_RESOURCE....?
- From: Ulrich Eckhardt
- Re: Einzeilermakros statt Mehrzeiler #ifdef IDS_MY_RESOURCE....?
- From: Karsten Schulz
- Re: Einzeilermakros statt Mehrzeiler #ifdef IDS_MY_RESOURCE....?
- Prev by Date: Kalenderwoche in Visual Studio 2005, MFC; DIN Norm
- Next by Date: Re: STL, VC6++ auf VStudio2005, MFC
- Previous by thread: Kalenderwoche in Visual Studio 2005, MFC; DIN Norm
- Next by thread: Re: Einzeilermakros statt Mehrzeiler #ifdef IDS_MY_RESOURCE....?
- Index(es):
Relevant Pages
|
Loading