Click here to Skip to main content
15,904,346 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Project Pin
Richard MacCutchan31-Aug-09 3:59
mveRichard MacCutchan31-Aug-09 3:59 
GeneralInclude headers Pin
gordon305630-Aug-09 9:53
gordon305630-Aug-09 9:53 
GeneralRe: Include headers Pin
Adam Roderick J30-Aug-09 18:19
Adam Roderick J30-Aug-09 18:19 
GeneralRe: Include headers Pin
Hamid_RT30-Aug-09 22:53
Hamid_RT30-Aug-09 22:53 
QuestionOvercoming problem with std::min, std::max, #define NOMINMAX Pin
Sternocera30-Aug-09 9:02
Sternocera30-Aug-09 9:02 
AnswerRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Richard Andrew x6430-Aug-09 11:34
professionalRichard Andrew x6430-Aug-09 11:34 
GeneralRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Sternocera30-Aug-09 11:43
Sternocera30-Aug-09 11:43 
GeneralRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Sternocera30-Aug-09 12:50
Sternocera30-Aug-09 12:50 
I've come up with this unfortunate hack:

#define NOMINMAX
#ifndef max
#define max(a,b)            (((a) > (b)) ? (a) : (b))
#endif

#ifndef min
#define min(a,b)            (((a) < (b)) ? (a) : (b))
#endif
#include <afxcontrolbars.h>
#undef max
#undef min
// ...contine to use std::mix, std::max from here on


When I undefined NOMINMAX, min and max were already defined, so it didn't matter. So, I've simply defined min and max just as they are defined from within WinDef.h .

Regards,
Sternocera
GeneralRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Richard Andrew x6430-Aug-09 13:08
professionalRichard Andrew x6430-Aug-09 13:08 
AnswerRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Stuart Dootson30-Aug-09 13:21
professionalStuart Dootson30-Aug-09 13:21 
GeneralRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Member 1235294525-Oct-20 4:58
Member 1235294525-Oct-20 4:58 
GeneralRe: Overcoming problem with std::min, std::max, #define NOMINMAX Pin
Stuart Dootson25-Oct-20 8:19
professionalStuart Dootson25-Oct-20 8:19 
QuestionDrawShadowText Pin
thanhvinh090630-Aug-09 8:29
thanhvinh090630-Aug-09 8:29 
AnswerRe: DrawShadowText Pin
Code-o-mat30-Aug-09 9:31
Code-o-mat30-Aug-09 9:31 
AnswerRe: DrawShadowText Pin
kilt3-Sep-09 4:39
kilt3-Sep-09 4:39 
QuestionCDC::DrawState [modified] Pin
thanhvinh090630-Aug-09 8:25
thanhvinh090630-Aug-09 8:25 
AnswerRe: CDC::DrawState Pin
«_Superman_»30-Aug-09 18:17
professional«_Superman_»30-Aug-09 18:17 
Questionhow to make a graphical text editor using c++??? Pin
mukulbawa30-Aug-09 8:18
mukulbawa30-Aug-09 8:18 
AnswerRe: how to make a graphical text editor using c++??? Pin
Richard Andrew x6430-Aug-09 10:12
professionalRichard Andrew x6430-Aug-09 10:12 
GeneralRe: how to make a graphical text editor using c++??? Pin
mukulbawa30-Aug-09 10:33
mukulbawa30-Aug-09 10:33 
GeneralRe: how to make a graphical text editor using c++??? Pin
Richard Andrew x6430-Aug-09 10:37
professionalRichard Andrew x6430-Aug-09 10:37 
GeneralRe: how to make a graphical text editor using c++??? Pin
Joe Woodbury30-Aug-09 11:35
professionalJoe Woodbury30-Aug-09 11:35 
GeneralRe: how to make a graphical text editor using c++??? Pin
mukulbawa31-Aug-09 7:47
mukulbawa31-Aug-09 7:47 
QuestionTO place SetCaretPos at The end of the text Pin
prithaa30-Aug-09 7:30
prithaa30-Aug-09 7:30 
GeneralRe: TO place SetCaretPos at The end of the text Pin
msn9230-Aug-09 8:17
msn9230-Aug-09 8:17 

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.