1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Controls in a GroupBox

Discussion in 'Win32' started by Spogliani, Jul 11, 2008.

  1. Spogliani

    Spogliani New Member

    Joined:
    Jun 24, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Milano, Italy
    Hi everybody,

    I've created a groupbox containing some buttons but I have a problem:
    I can't receive the notifications from the controls inside the groupbox:(

    I have searched on Google and I have found that I can change the controls WindowPocedure using SetWindowLong(hGrpControls,GWL_WNDPROC,(LONG)GrpControlsProc);

    This makes me receive the notifications but makes the control disappear:eek: :eek:

    This is my code:
    Code:
    [SIZE=2]hGrpControls = CreateWindow(L[/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"BUTTON"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], TEXT([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"Module controls"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]), (WS_VISIBLE | WS_CHILD | BS_GROUPBOX | WS_TABSTOP), 26, 50, 270, 107, hClip, NULL, MyAppInst, NULL);[/SIZE]
    [SIZE=2]SendMessage(hGrpControls, WM_SETFONT, (WPARAM)CrlFont, 0);[/SIZE]
    S[SIZE=2]etWindowLong(hGrpControls,GWL_WNDPROC,(LONG)GrpControlsProc);[/SIZE]
    
    can anyone help me please?
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    It dissappears because you need to handle the paint and other messages properly.
     

Share This Page