Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp with derived class Pin
ddmcr16-Apr-05 4:12
ddmcr16-Apr-05 4:12 
GeneralRe: Help with derived class Pin
John M. Drescher16-Apr-05 4:59
John M. Drescher16-Apr-05 4:59 
GeneralRe: Help with derived class Pin
ddmcr16-Apr-05 5:09
ddmcr16-Apr-05 5:09 
GeneralRe: Help with derived class Pin
John M. Drescher16-Apr-05 5:32
John M. Drescher16-Apr-05 5:32 
GeneralRe: Help with derived class Pin
David Crow18-Apr-05 4:26
David Crow18-Apr-05 4:26 
GeneralRe: Help with derived class Pin
Blake Miller18-Apr-05 8:29
Blake Miller18-Apr-05 8:29 
GeneralRe: Help with derived class Pin
David Crow18-Apr-05 9:32
David Crow18-Apr-05 9:32 
GeneralRe: Help with derived class Pin
Blake Miller18-Apr-05 9:54
Blake Miller18-Apr-05 9:54 
Hello David;

I just tried it out. No recursion occurred whatsoever.

SetButtonText does not get called by SetWindowText. The functions have similar signature, but different name. And that is why I originally did not beleive they would recurse, by inspection, but now I demonstrated to myself they do not recurse - by definitive testing.

I noticed that there was a runtime assertion on a window handle WinOcc.cpp - line 229 - ASSERT(::IsWindow(m_hWnd));, but once I did SubclassDlgItem on an existing button control it works as expected. I maintain you can not SetWindowText on a CButton or CButton-derived class until the class has been assigned to an existing button window.

This is code path I observed:
CMyButton::SetButtonText -> CButton::SetWindowText -> ::SetWindowText

If you can get it to recurse, please explain exactly how.
GeneralRe: Help with derived class Pin
David Crow18-Apr-05 10:06
David Crow18-Apr-05 10:06 
GeneralButton Create Pin
Francis Chau16-Apr-05 4:06
Francis Chau16-Apr-05 4:06 
GeneralRe: Button Create Pin
PJ Arends16-Apr-05 6:37
professionalPJ Arends16-Apr-05 6:37 
GeneralRe: Button Create Pin
Francis Chau16-Apr-05 18:15
Francis Chau16-Apr-05 18:15 
Questionhow to recognize "real" printer in EnumPrinters? Pin
sstoyan16-Apr-05 3:52
sstoyan16-Apr-05 3:52 
AnswerRe: how to recognize "real" printer in EnumPrinters? Pin
Alexander M.,16-Apr-05 11:20
Alexander M.,16-Apr-05 11:20 
GeneralRe: how to recognize "real" printer in EnumPrinters? Pin
sstoyan17-Apr-05 4:43
sstoyan17-Apr-05 4:43 
Generalencryption symetric Pin
3loka16-Apr-05 2:15
3loka16-Apr-05 2:15 
GeneralRe: encryption symetric Pin
22491716-Apr-05 2:21
22491716-Apr-05 2:21 
GeneralRe: encryption symetric Pin
Alexander M.,16-Apr-05 2:32
Alexander M.,16-Apr-05 2:32 
GeneralRe: encryption symetric Pin
22491716-Apr-05 2:55
22491716-Apr-05 2:55 
GeneralRe: encryption symetric Pin
Alexander M.,16-Apr-05 9:49
Alexander M.,16-Apr-05 9:49 
GeneralRe: encryption symetric Pin
3loka24-Apr-05 17:44
3loka24-Apr-05 17:44 
GeneralRe: encryption symetric Pin
Francesco Aruta17-Apr-05 23:57
Francesco Aruta17-Apr-05 23:57 
GeneralRe: encryption symetric Pin
3loka19-Apr-05 20:03
3loka19-Apr-05 20:03 
GeneralRe: encryption symetric Pin
Francesco Aruta20-Apr-05 9:54
Francesco Aruta20-Apr-05 9:54 
GeneralRe: encryption symetric Pin
3loka23-Apr-05 12:48
3loka23-Apr-05 12:48 

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.