Click here to Skip to main content
16,005,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to convert CString to int MFC 7.1 Pin
Ravi Bhavnani10-Mar-07 14:39
professionalRavi Bhavnani10-Mar-07 14:39 
AnswerRe: How to convert CString to int MFC 7.1 Pin
Christian Graus10-Mar-07 10:28
protectorChristian Graus10-Mar-07 10:28 
AnswerRe: How to convert CString to int MFC 7.1 Pin
Hamid_RT11-Mar-07 6:39
Hamid_RT11-Mar-07 6:39 
AnswerRe: How to convert CString to int MFC 7.1 Pin
Mark Salsbery11-Mar-07 8:59
Mark Salsbery11-Mar-07 8:59 
Questionneed help on detecting the insertion of a USB device Pin
sowhat_8210-Mar-07 8:56
sowhat_8210-Mar-07 8:56 
AnswerRe: need help on detecting the insertion of a USB device Pin
prasad_som10-Mar-07 18:15
prasad_som10-Mar-07 18:15 
QuestionPredefined Macros Pin
sawerr10-Mar-07 8:49
sawerr10-Mar-07 8:49 
AnswerRe: Predefined Macros Pin
Waldermort10-Mar-07 18:12
Waldermort10-Mar-07 18:12 
Macros are there to make your life simple and your code easy to read. Take the following example:
#define min(x,y) (x<=y?x:y)
int a = 10;
int b = 20;
cout << min(a,b);

Since you created a macro your code has instantly become easier to read and write. When you hit the 'compile' button, before the compiler does anything it will go through all your code and replace the macros with the real code, from the above example the compiler will produce
cout << 10<=20?10:20;

Other types of macros go alongside functions. Take the CreateWindow() function for example. This is actually a macro, there are two versions of the real function CreateWindowA() and CreateWindowW() each taking ansi strings and unicode strings. That's where the _UNICODE macro comes in:
#if defined _UNICODE
#define CreateWindow CreateWindowW
#else
#define CreateWindow CreateWindowA
#endif

So now anytime you use the CreateWindow macro, that macro will be replaced with the real function name depending on whether or not your project is unicode.
GeneralRe: Predefined Macros Pin
sawerr10-Mar-07 22:07
sawerr10-Mar-07 22:07 
GeneralRe: Predefined Macros Pin
toxcct10-Mar-07 23:05
toxcct10-Mar-07 23:05 
AnswerRe: Predefined Macros Pin
toxcct11-Mar-07 0:04
toxcct11-Mar-07 0:04 
QuestionHow to Remove the Title bar of Window created through CreateWindowEx... Pin
nagamohan_p10-Mar-07 6:30
nagamohan_p10-Mar-07 6:30 
AnswerRe: How to Remove the Title bar of Window created through CreateWindowEx... Pin
Mark Salsbery10-Mar-07 6:45
Mark Salsbery10-Mar-07 6:45 
QuestionCertification in C++ or VC++ Pin
vibindia10-Mar-07 2:05
vibindia10-Mar-07 2:05 
AnswerRe: Certification in C++ or VC++ Pin
Waldermort10-Mar-07 3:13
Waldermort10-Mar-07 3:13 
AnswerRe: Certification in C++ or VC++ Pin
Kevin McFarlane10-Mar-07 5:10
Kevin McFarlane10-Mar-07 5:10 
QuestionVisual C++ vs C++.Net Pin
Software_Specialist10-Mar-07 1:54
Software_Specialist10-Mar-07 1:54 
AnswerRe: Visual C++ vs C++.Net Pin
Waldermort10-Mar-07 3:14
Waldermort10-Mar-07 3:14 
AnswerRe: Visual C++ vs C++.Net Pin
George L. Jackson10-Mar-07 3:25
George L. Jackson10-Mar-07 3:25 
GeneralRe: Visual C++ vs C++.Net Pin
Pan San10-Mar-07 22:19
Pan San10-Mar-07 22:19 
GeneralRe: Visual C++ vs C++.Net Pin
toxcct11-Mar-07 0:09
toxcct11-Mar-07 0:09 
GeneralRe: Visual C++ vs C++.Net Pin
Eytukan11-Mar-07 0:17
Eytukan11-Mar-07 0:17 
GeneralRe: Visual C++ vs C++.Net Pin
Eytukan11-Mar-07 0:18
Eytukan11-Mar-07 0:18 
GeneralRe: Visual C++ vs C++.Net Pin
George L. Jackson11-Mar-07 2:34
George L. Jackson11-Mar-07 2:34 
GeneralRe: Visual C++ vs C++.Net Pin
Pan San13-Mar-07 23:19
Pan San13-Mar-07 23: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.