Click here to Skip to main content
15,912,069 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl DeleteItem Pin
Jarek G26-Oct-03 14:16
Jarek G26-Oct-03 14:16 
GeneralRe: CListCtrl DeleteItem Pin
Ravi Bhavnani26-Oct-03 14:39
professionalRavi Bhavnani26-Oct-03 14:39 
GeneralRe: CListCtrl DeleteItem Pin
Jarek G26-Oct-03 23:32
Jarek G26-Oct-03 23:32 
GeneralRe: CListCtrl DeleteItem Pin
Roger Allen27-Oct-03 2:21
Roger Allen27-Oct-03 2:21 
GeneralRe: CListCtrl DeleteItem Pin
David Crow27-Oct-03 4:46
David Crow27-Oct-03 4:46 
GeneralRe: CListCtrl DeleteItem Pin
Jarek G27-Oct-03 7:59
Jarek G27-Oct-03 7:59 
GeneralRe: CListCtrl DeleteItem Pin
Abin27-Oct-03 14:09
Abin27-Oct-03 14:09 
GeneralCPP question Pin
alex.barylski26-Oct-03 12:22
alex.barylski26-Oct-03 12:22 
I have 3 classes
CFirst : CButton
CSecond : CFirst
CThird : CSecond


CSecond::OnTimer() sends the parent window a message using:

WPARAM wParam = MAKEWPARAM(GetDlgCtrlID(), BN_CLICKED);
GetParent()->SendMessage(WM_COMMAND, wParam, this);


I'm trying to notify the parent that this particular button was clicked, but i have 2 problems/questions:

1) How can I send the
this</code pointer? When I cast it as long woun't it loose it's RTTI? I need this for later :)<br />
<br />
2) When the parent recieves <code>WM_COMMAND
messages is there anyway the parent window can determine using the this pointer which class derived from CButton was clicked? CSecond or CThird

Will the parent be able to determine that it was a CSecond clicked or a CThird clicked??? or will it always get the CSecond? Do I have to make CSecond::OnTimer virtual?

Thanks in advance Smile | :)

I'm drinking triples, seeing double and acting single Cool | :cool:
GeneralRe: CPP question Pin
Steve S27-Oct-03 1:46
Steve S27-Oct-03 1:46 
GeneralRe: CPP question Pin
alex.barylski27-Oct-03 6:53
alex.barylski27-Oct-03 6:53 
GeneralRe: CPP question Pin
Roger Allen27-Oct-03 2:32
Roger Allen27-Oct-03 2:32 
GeneralRe: CPP question Pin
Steve S27-Oct-03 3:20
Steve S27-Oct-03 3:20 
GeneralRestore Window State; Pin
Bo Hunter26-Oct-03 11:46
Bo Hunter26-Oct-03 11:46 
GeneralRe: Restore Window State; Pin
Ravi Bhavnani26-Oct-03 12:25
professionalRavi Bhavnani26-Oct-03 12:25 
GeneralGetOpenFileName Pin
Anonymous26-Oct-03 11:45
Anonymous26-Oct-03 11:45 
GeneralRe: GetOpenFileName Pin
Ravi Bhavnani26-Oct-03 12:27
professionalRavi Bhavnani26-Oct-03 12:27 
GeneralRe: GetOpenFileName Pin
georgiek5026-Oct-03 13:33
georgiek5026-Oct-03 13:33 
GeneralRe: GetOpenFileName Pin
Ravi Bhavnani26-Oct-03 13:51
professionalRavi Bhavnani26-Oct-03 13:51 
GeneralRe: GetOpenFileName Pin
georgiek5026-Oct-03 14:02
georgiek5026-Oct-03 14:02 
GeneralRe: GetOpenFileName Pin
Ravi Bhavnani26-Oct-03 14:29
professionalRavi Bhavnani26-Oct-03 14:29 
QuestionHow do I increment a char? Pin
JasonKaiser26-Oct-03 11:43
JasonKaiser26-Oct-03 11:43 
AnswerRe: How do I increment a char? Pin
georgiek5026-Oct-03 12:09
georgiek5026-Oct-03 12:09 
GeneralRe: How do I increment a char? Pin
JasonKaiser26-Oct-03 12:51
JasonKaiser26-Oct-03 12:51 
GeneralRe: How do I increment a char? Pin
georgiek5026-Oct-03 14:07
georgiek5026-Oct-03 14:07 
GeneralCArray for GCC Pin
Sergei Yevseyev26-Oct-03 11:16
Sergei Yevseyev26-Oct-03 11:16 

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.