Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: to validate editbox control Pin
ThatsAlok22-Nov-06 22:31
ThatsAlok22-Nov-06 22:31 
QuestionFunction name clashing with MACRO Pin
Waldermort22-Nov-06 20:47
Waldermort22-Nov-06 20:47 
QuestionRe: Function name clashing with MACRO Pin
CPallini22-Nov-06 20:57
mveCPallini22-Nov-06 20:57 
AnswerRe: Function name clashing with MACRO Pin
ThatsAlok22-Nov-06 21:23
ThatsAlok22-Nov-06 21:23 
QuestionRe: Function name clashing with MACRO Pin
CPallini22-Nov-06 21:26
mveCPallini22-Nov-06 21:26 
AnswerRe: Function name clashing with MACRO Pin
Viorel.22-Nov-06 21:51
Viorel.22-Nov-06 21:51 
GeneralRe: Function name clashing with MACRO Pin
CPallini22-Nov-06 22:29
mveCPallini22-Nov-06 22:29 
AnswerRe: Function name clashing with MACRO Pin
Waldermort22-Nov-06 21:58
Waldermort22-Nov-06 21:58 
My 4mb connection is running at 2k again today Mad | :mad:

I thought about the #undef method, but I would then need to define it again after the function. Redefining involves checking the UNICODE and using the correct function, in doing so what's to say the origional macro will not change after a few months.

For now I have simply renamed the function to GetWindow(), but this is confusing within my personal naming schemes.

You also asked for a code sample of how it's called:
m_hWnd = GetWindow( dwStyle, hParent );
if ( ! m_hWnd )
    throw _T("Unable to create window");

// Set the windows size and position
BOOL bSuccess = FALSE;
bSuccess = SetWindowPos(m_hWnd,NULL,uLeft,uTop,uWidth,uHeight,SWP_NOZORDER|SWP_NOSENDCHANGING);


The derived class would then call the orgional CreateWindow() macro/function to creat a certain type of window ( window class ) and return it's handle.

[APPEND]
Oops, I replied to the wrong poster. This message is aimed at ThatsAllOk Rose | [Rose]
GeneralRe: Function name clashing with MACRO Pin
ThatsAlok22-Nov-06 22:30
ThatsAlok22-Nov-06 22:30 
AnswerRe: Function name clashing with MACRO Pin
ThatsAlok22-Nov-06 21:24
ThatsAlok22-Nov-06 21:24 
AnswerRe: Function name clashing with MACRO Pin
prasad_som22-Nov-06 23:27
prasad_som22-Nov-06 23:27 
AnswerRe: Function name clashing with MACRO Pin
Michael Dunn23-Nov-06 0:28
sitebuilderMichael Dunn23-Nov-06 0:28 
QuestionESMTP Pin
neha.agarwal2722-Nov-06 20:30
neha.agarwal2722-Nov-06 20:30 
AnswerRe: ESMTP Pin
ThatsAlok22-Nov-06 21:25
ThatsAlok22-Nov-06 21:25 
GeneralRe: ESMTP Pin
neha.agarwal2722-Nov-06 21:31
neha.agarwal2722-Nov-06 21:31 
AnswerRe: ESMTP Pin
Galatei23-Nov-06 1:50
Galatei23-Nov-06 1:50 
Questionfitting the view Pin
sheetal_0622-Nov-06 20:01
sheetal_0622-Nov-06 20:01 
AnswerRe: fitting the view Pin
Rajesh R Subramanian22-Nov-06 20:35
professionalRajesh R Subramanian22-Nov-06 20:35 
GeneralRe: fitting the view Pin
sheetal_0622-Nov-06 21:14
sheetal_0622-Nov-06 21:14 
GeneralRe: fitting the view Pin
Rajesh R Subramanian22-Nov-06 22:51
professionalRajesh R Subramanian22-Nov-06 22:51 
Questionerror LNK2005: _DllMain@12 already defined in SPLibrSync.obj Pin
DattaK22-Nov-06 19:53
DattaK22-Nov-06 19:53 
AnswerRe: error LNK2005: _DllMain@12 already defined in SPLibrSync.obj Pin
Waldermort22-Nov-06 20:54
Waldermort22-Nov-06 20:54 
GeneralRe: error LNK2005: _DllMain@12 already defined in SPLibrSync.obj Pin
DattaK22-Nov-06 21:33
DattaK22-Nov-06 21:33 
AnswerRe: error LNK2005: _DllMain@12 already defined in SPLibrSync.obj Pin
Cedric Moonen22-Nov-06 21:42
Cedric Moonen22-Nov-06 21:42 
QuestionUnicode Conversion Pin
Vineet Kumar22-Nov-06 19:51
Vineet Kumar22-Nov-06 19:51 

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.