Click here to Skip to main content
15,881,413 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help in closing main application from child window Pin
pavanbabut5-Jan-06 12:59
pavanbabut5-Jan-06 12:59 
GeneralRe: Help in closing main application from child window Pin
StarMeteor5-Jan-06 16:46
StarMeteor5-Jan-06 16:46 
GeneralRe: Help in closing main application from child window Pin
pavanbabut5-Jan-06 16:56
pavanbabut5-Jan-06 16:56 
GeneralRe: Help in closing main application from child window Pin
StarMeteor5-Jan-06 17:54
StarMeteor5-Jan-06 17:54 
GeneralRe: Help in closing main application from child window Pin
pavanbabut5-Jan-06 18:00
pavanbabut5-Jan-06 18:00 
GeneralRe: Help in closing main application from child window Pin
StarMeteor5-Jan-06 22:33
StarMeteor5-Jan-06 22:33 
GeneralRe: Help in closing main application from child window Pin
pavanbabut6-Jan-06 6:06
pavanbabut6-Jan-06 6:06 
GeneralRe: Help in closing main application from child window Pin
StarMeteor8-Jan-06 4:50
StarMeteor8-Jan-06 4:50 
there is a problem
assume your OnKeyFunction1 at parent (CMainWindow::OnKeyFunction1()) is for closing the application, in it you will KILL the child (i.e. delete the pointer of child window or equivlant) and so the function don't know how to return to the child part (CChildWindow::OnKeyFunction1)!!

so, what you have to do is change the structure:
1. Use callback function to use parent window function instead of directly calling, callback allow window to handle when to call the function
2. Use Send message as the "tunnel" for commuincation for some command function
3. try to build the function in child only if it only consider to be used in child

hope this help!
GeneralRe: Help in closing main application from child window Pin
pavanbabut9-Jan-06 8:49
pavanbabut9-Jan-06 8:49 
GeneralRe: Help in closing main application from child window Pin
StarMeteor9-Jan-06 21:33
StarMeteor9-Jan-06 21:33 
GeneralRe: Help in closing main application from child window Pin
pavanbabut10-Jan-06 5:31
pavanbabut10-Jan-06 5:31 
QuestionHow to send data Pin
sheshidar5-Jan-06 5:18
sheshidar5-Jan-06 5:18 
AnswerRe: How to send data Pin
Prakash Nadar5-Jan-06 5:42
Prakash Nadar5-Jan-06 5:42 
AnswerRe: How to send data Pin
Cool Ju5-Jan-06 17:54
Cool Ju5-Jan-06 17:54 
AnswerRe: How to send data Pin
ThatsAlok8-Jan-06 23:16
ThatsAlok8-Jan-06 23:16 
QuestionHow to display an Excel Diagram with VC++ Pin
zhangguoliming5-Jan-06 4:00
zhangguoliming5-Jan-06 4:00 
AnswerRe: How to display an Excel Diagram with VC++ Pin
lastgen5-Jan-06 11:32
lastgen5-Jan-06 11:32 
GeneralRe: How to display an Excel Diagram with VC++ Pin
Anilkumar K V5-Jan-06 17:40
Anilkumar K V5-Jan-06 17:40 
AnswerRe: How to display an Excel Diagram with VC++ Pin
zhangguoliming8-Jan-06 21:02
zhangguoliming8-Jan-06 21:02 
QuestionHowto change the View of an SDI app ? (MFC) Pin
cromag5-Jan-06 3:46
cromag5-Jan-06 3:46 
AnswerRe: Howto change the View of an SDI app ? (MFC) Pin
David Crow5-Jan-06 4:10
David Crow5-Jan-06 4:10 
GeneralRe: Howto change the View of an SDI app ? (MFC) Pin
cromag5-Jan-06 5:00
cromag5-Jan-06 5:00 
GeneralRe: Howto change the View of an SDI app ? (MFC) Pin
David Crow5-Jan-06 6:55
David Crow5-Jan-06 6:55 
GeneralRe: Howto change the View of an SDI app ? (MFC) Pin
cromag5-Jan-06 7:16
cromag5-Jan-06 7:16 
QuestionTapi Application Please Help..... Pin
Jeeva Mary Varghese5-Jan-06 3:10
Jeeva Mary Varghese5-Jan-06 3:10 

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.