|
-
March 17th, 2006, 11:35 AM
#4
Re: Child dlg can only move w/in parent client region.. help!
Hello gstercken et all,
Thank you for the reply. Yes, my intend of having a parent was so that
some of the code can be re-used, i.e. the menu items and their associated actions and I thought that makes toggling between the child windows easier.
I want to bring up the menu when any child window received a mouse-up signal. This menu is the same for both windows.
Currently I have tried to have the menu code in Child_1 class, and if Child_2 receives the mouse up msg, it would call Child_1's OnNcRButtonUp(), however, the problem, as you already know, is probably b/c Child_1 's h_wnd is not valid so I can't bring up the menu?
perhaps this is not right with putting "this"?
nCommand = m_subMenu->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON | TPM_RETURNCMD, point.x, point.y, this);
2. The way I do the toggling bewteen Child_1 and Child_2 was that when a botton is clicked, then I EndDialog() the receiving child window and DoModal() the other way. Can you comment on this approach, or anyone?
Thanks alot,
Jiac
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|