Click here to Skip to main content
15,890,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIP Address Control Pin
JensB5-May-03 20:29
JensB5-May-03 20:29 
GeneralRe: IP Address Control Pin
Ryan Binns6-May-03 1:33
Ryan Binns6-May-03 1:33 
GeneralRe: IP Address Control Pin
David Crow6-May-03 4:33
David Crow6-May-03 4:33 
GeneralThe VxD problem Pin
Jeef5-May-03 17:59
Jeef5-May-03 17:59 
Generalredirected streams and stdout Pin
virtual me()5-May-03 16:50
virtual me()5-May-03 16:50 
GeneralRe: redirected streams and stdout Pin
Andrew Walker6-May-03 0:19
Andrew Walker6-May-03 0:19 
GeneralCustom Component Newbie Question Pin
crewchill5-May-03 16:18
crewchill5-May-03 16:18 
GeneralRe: Custom Component Newbie Question Pin
Ryan Binns6-May-03 1:50
Ryan Binns6-May-03 1:50 
You can do this overriding OnCommand() and send a WM_COMMAND messages to the parent in response, such as

CBetterGroupbox::OnCommand(WPARAM wParam, LPARAM lParam)
{
    CWnd *pParent = GetParent();
    ASSERT_VALID(pParent);
    pParent->SendMessage(WM_COMMAND, wParam, lParam);
}


This should take care of any control command messages, but it won't help with common controls that use WM_NOTIFY messages.

However, a better way would be to call SetOwner() on the child windows to set their owner to the dialog box. This will cause all the control messages to be sent to the dialog box instead of the group box. I'm not sure if this works for common controls, though. I think it does, but perhaps you can test it Smile | :)

Hope this helps

Ryan

Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)

Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

GeneralCGI printing under IIS Pin
Anonymous5-May-03 13:49
Anonymous5-May-03 13:49 
GeneralRe: CGI printing under IIS Pin
basementman6-May-03 5:16
basementman6-May-03 5:16 
QuestionCopying form a Window to MS Word? Pin
krle5-May-03 13:49
krle5-May-03 13:49 
QuestionHow do I control what happens on a keypress? Pin
Kaezin5-May-03 13:13
Kaezin5-May-03 13:13 
AnswerRe: How do I control what happens on a keypress? Pin
valikac5-May-03 13:47
valikac5-May-03 13:47 
AnswerRe: How do I control what happens on a keypress? Pin
Michael Dunn5-May-03 17:43
sitebuilderMichael Dunn5-May-03 17:43 
Generalunknown mistake Pin
aguest5-May-03 12:34
aguest5-May-03 12:34 
GeneralRe: unknown mistake Pin
Baris Kurtlutepe5-May-03 12:38
Baris Kurtlutepe5-May-03 12:38 
GeneralRe: unknown mistake Pin
Wes Aday5-May-03 12:39
professionalWes Aday5-May-03 12:39 
GeneralRe: unknown mistake Pin
jhaga5-May-03 12:55
professionaljhaga5-May-03 12:55 
GeneralRe: unknown mistake Pin
aguest5-May-03 13:08
aguest5-May-03 13:08 
GeneralRe: unknown mistake Pin
aguest5-May-03 13:14
aguest5-May-03 13:14 
Generalanother problem Pin
aguest5-May-03 13:28
aguest5-May-03 13:28 
GeneralRe: another problem Pin
Chris Richardson6-May-03 5:16
Chris Richardson6-May-03 5:16 
GeneralLaunch a thread in a dll Pin
peter ho5-May-03 12:29
peter ho5-May-03 12:29 
GeneralRe: Launch a thread in a dll Pin
Trollslayer5-May-03 13:26
mentorTrollslayer5-May-03 13:26 
GeneralRe: Launch a thread in a dll Pin
Neville Franks6-May-03 1:39
Neville Franks6-May-03 1:39 

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.