Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do you TRACE() a BSTR?? Pin
Chris Losinger1-Mar-07 7:42
professionalChris Losinger1-Mar-07 7:42 
GeneralRe: How do you TRACE() a BSTR?? Pin
Anders Gustafsson1-Mar-07 7:59
Anders Gustafsson1-Mar-07 7:59 
AnswerRe: How do you TRACE() a BSTR?? Pin
Jörgen Sigvardsson1-Mar-07 9:33
Jörgen Sigvardsson1-Mar-07 9:33 
AnswerRe: How do you TRACE() a BSTR?? Pin
Michael Dunn1-Mar-07 10:09
sitebuilderMichael Dunn1-Mar-07 10:09 
AnswerRe: How do you TRACE() a BSTR?? Pin
ThatsAlok1-Mar-07 19:49
ThatsAlok1-Mar-07 19:49 
QuestionChange remotely a text Pin
Dennis L1-Mar-07 5:22
Dennis L1-Mar-07 5:22 
AnswerRe: Change remotely a text Pin
led mike1-Mar-07 5:42
led mike1-Mar-07 5:42 
AnswerRe: Change remotely a text Pin
Hamid_RT1-Mar-07 6:25
Hamid_RT1-Mar-07 6:25 
AnswerRe: Change remotely a text Pin
lucy1-Mar-07 6:53
lucy1-Mar-07 6:53 
GeneralRe: Change remotely a text Pin
Hamid_RT1-Mar-07 7:09
Hamid_RT1-Mar-07 7:09 
GeneralRe: Change remotely a text Pin
ThatsAlok1-Mar-07 21:40
ThatsAlok1-Mar-07 21:40 
QuestionA letter to webmaster/author Pin
Software_Specialist1-Mar-07 4:23
Software_Specialist1-Mar-07 4:23 
AnswerRe: A letter to webmaster/author Pin
Eytukan1-Mar-07 4:26
Eytukan1-Mar-07 4:26 
AnswerRe: A letter to webmaster/author Pin
toxcct1-Mar-07 5:16
toxcct1-Mar-07 5:16 
GeneralRe: A letter to webmaster/author Pin
Software_Specialist1-Mar-07 5:28
Software_Specialist1-Mar-07 5:28 
QuestionRe: A letter to webmaster/author Pin
Hamid_RT1-Mar-07 6:32
Hamid_RT1-Mar-07 6:32 
AnswerRe: A letter to webmaster/author Pin
toxcct1-Mar-07 21:40
toxcct1-Mar-07 21:40 
GeneralRe: A letter to webmaster/author Pin
ThatsAlok1-Mar-07 21:40
ThatsAlok1-Mar-07 21:40 
GeneralRe: A letter to webmaster/author Pin
Programm3r1-Mar-07 20:10
Programm3r1-Mar-07 20:10 
GeneralRe: A letter to webmaster/author Pin
toxcct1-Mar-07 21:43
toxcct1-Mar-07 21:43 
QuestionCreating a SDI window from a dialog (MFC) Pin
sascha.billian1-Mar-07 3:48
sascha.billian1-Mar-07 3:48 
Hi there!

We've got a real big problem, allthough it seems to be not really difficult:

Our main application is a dialog which definitely MUST remain a dialog.
My colleague wants to create a SDI window from this dialog by clicking on a specific button.

Still no problem.

The problem ist, that the window seems not to get the windows messages:

Usually if you create a method to handle a mouseclick on a button in the toolbar, you can also create a function

OnUpdateClickXXX(CCmdUI* pCmdUI)

for example you could gray a specific button, if ButtonXXX is being clicked on.
But OnUpdateClickXXX is never called!
For me it seems, that the WM_PAINT message is being processed just by the dialog.

the SDI window is created with

CSingleDocTemplate* pDocTemplate;<br />
  pDocTemplate = new CSingleDocTemplate(<br />
  IDR_MAINFRAME,<br />
  RUNTIME_CLASS(CSDI_LeerDoc),<br />
  RUNTIME_CLASS(CMainFrame),       <br />
  RUNTIME_CLASS(CSDI_LeerView));<br />
  AfxGetApp()->AddDocTemplate(pDocTemplate);  //because i am in the dialog, i have to call AfxGetApp() to register the doctemplate with the application


when you click on a button in the dialog.

All OnClickBlah, OnUpdateBlah... methods are inserted by the class wizard, and the AFX_MESSAGE_MAP
has the correct ON_COMMAND, ON_UPDATE_COMMAND...entries

Could you give us some hints, where we could look for that problem?

Sure, the problem is caused by the dialog "standing" between the application and the doc/view.

Thank you all, and i hope you can help us with our problem.

Sascha Billian

Sascha Billian
AnswerRe: Creating a SDI window from a dialog (MFC) Pin
Mark Salsbery1-Mar-07 7:28
Mark Salsbery1-Mar-07 7:28 
GeneralRe: Creating a SDI window from a dialog (MFC) Pin
sascha.billian1-Mar-07 8:32
sascha.billian1-Mar-07 8:32 
QuestionRe: Creating a SDI window from a dialog (MFC) Pin
Mark Salsbery1-Mar-07 8:53
Mark Salsbery1-Mar-07 8:53 
AnswerRe: Creating a SDI window from a dialog (MFC) Pin
led mike1-Mar-07 11:38
led mike1-Mar-07 11:38 

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.