Click here to Skip to main content
15,905,593 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CreateDialogIndirect doesn't return Pin
Rage27-May-03 5:36
professionalRage27-May-03 5:36 
GeneralRe: CreateDialogIndirect doesn't return Pin
CHAIGNEAU27-May-03 9:30
CHAIGNEAU27-May-03 9:30 
GeneralProblems with message routing in Dundas' COXSizeControlBar Pin
Miguel Segarra27-May-03 1:21
Miguel Segarra27-May-03 1:21 
GeneralRe: Problems with message routing in Dundas' COXSizeControlBar Pin
Ivor S. Sargoytchev27-May-03 5:36
Ivor S. Sargoytchev27-May-03 5:36 
GeneralRe: Problems with message routing in Dundas' COXSizeControlBar Pin
Ivor S. Sargoytchev28-May-03 10:12
Ivor S. Sargoytchev28-May-03 10:12 
GeneralRe: Problems with message routing in Dundas' COXSizeControlBar Pin
Miguel Segarra28-May-03 23:09
Miguel Segarra28-May-03 23:09 
GeneralRe: Problems with message routing in Dundas' COXSizeControlBar Pin
Ivor S. Sargoytchev29-May-03 7:53
Ivor S. Sargoytchev29-May-03 7:53 
GeneralRe: Problems with message routing in Dundas' COXSizeControlBar Pin
Miguel Segarra30-May-03 1:26
Miguel Segarra30-May-03 1:26 
Dear Ivor,

First of all I apologize for calling you Igor in my first message (it is a more common name to me). Secondly, I manage to get the application working with the tips you gave me. Nevertheless, I still do not fully understand how the thing is working. In my application I set the parent of the tree ctrl to the COXSizeControlBar class (m_wndTree.Create(pParentWnd... where pParentWnd is a pointer to an object of a class derived from COXSizeControlBar). After this I created the tab control as a child of the COXSizeControlBar class and added the tree control to a page of the tab control. Then it was possible to handle messages from the tree control inside the COXSizeControlBar derived class.

This happens even if AddPage from the Dundas tab control makes m_wndTree.SetParent(this) where 'this' is the tab control !!!!!!!!

So in fact, I am handling messages inside the grandparent window class (The COXSizeControlBar. I have also a COXShortcutBar inside the tab control and for this I made the same thing than with the tree control. I passed a pointer to the COXSizeControlBar in the create method of the shortcut bar and then added it to a page of the tab control (COX3DTabViewBar). As you know, AddPage() sets to 'this' the parent window of control passed as argument of the AddPage() method. In this case, I was not able to process messages inside the COXSizeControlBar. I found out that it is because COXSizeControlBar 'only' sends messages to its parent/owner window so it is only possible to process them there.

What is surprising to me is that I am able to process messages inside the grandparent window event if the Dundas code makes SetParent() to 'this' for the tree control inside the AddPage method of the tab control.

I also tried to handle the messages inside a CTreeControl derived class and also it does not work. This means, I cannot handle messages inside a control's derived class which very annoying. I do not know if this is an MFC problem because I do not know what is going on.

Any ideas of what is behind this behaviour?

Best Regards,

Miguel
GeneralRe: Problems with message routing in COXSizeControlBar Pin
Ivor S. Sargoytchev2-Jun-03 11:25
Ivor S. Sargoytchev2-Jun-03 11:25 
GeneralRe: Problems with message routing in COXSizeControlBar Pin
Miguel Segarra4-Jun-03 1:07
Miguel Segarra4-Jun-03 1:07 
Questionhow to add windows type properties to our own files..? Pin
harinath27-May-03 1:12
professionalharinath27-May-03 1:12 
AnswerRe: how to add windows type properties to our own files..? Pin
Rage27-May-03 1:21
professionalRage27-May-03 1:21 
AnswerRe: how to add windows type properties to our own files..? Pin
Rage27-May-03 1:23
professionalRage27-May-03 1:23 
GeneralRe: how to add windows type properties to our own files..? Pin
harinath27-May-03 1:29
professionalharinath27-May-03 1:29 
GeneralRe: how to add windows type properties to our own files..? Pin
harinath27-May-03 1:37
professionalharinath27-May-03 1:37 
GeneralProblem by using Property Page as a Dialog Pin
praveenpnayak27-May-03 0:49
praveenpnayak27-May-03 0:49 
GeneralRe: Problem by using Property Page as a Dialog Pin
Rage27-May-03 1:02
professionalRage27-May-03 1:02 
GeneralRe: Problem by using Property Page as a Dialog Pin
praveenpnayak27-May-03 1:27
praveenpnayak27-May-03 1:27 
GeneralRe: Problem by using Property Page as a Dialog Pin
Rage27-May-03 2:33
professionalRage27-May-03 2:33 
GeneralRe: Problem by using Property Page as a Dialog Pin
Renjith Ramachandran27-May-03 4:09
Renjith Ramachandran27-May-03 4:09 
GeneralRe: Problem by using Property Page as a Dialog Pin
praveenpnayak28-May-03 0:11
praveenpnayak28-May-03 0:11 
GeneralDialogBox problem Pin
Jump_Around27-May-03 0:02
Jump_Around27-May-03 0:02 
GeneralRe: DialogBox problem Pin
Daniel Strigl27-May-03 0:18
Daniel Strigl27-May-03 0:18 
GeneralRe: DialogBox problem Pin
Neville Franks27-May-03 0:32
Neville Franks27-May-03 0:32 
GeneralDisable close button in AfxMessageBox Pin
rohit.dhamija26-May-03 23:27
rohit.dhamija26-May-03 23:27 

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.