Notification and Radio buttons

Hi,
i've a notification with 2/3 radio buttons and one button.
I can get the selected item through WM_NOTIFY and SHNN_LINKSEL clicking on button.
I would like to know how get selected item clicking on softkey menu (like in wifi network availables notification for example)
Any idea

Thanks in advance



Answer this question

Notification and Radio buttons

  • Kewley

    Hi Alex,
    thanks for your reply but i already solved the problem with NOTIF_SOFTKEY_FLAGS_SUBMIT.
    Btw, i intercept WM_NOTIFY and SHNN_LINKSEL so i can get the link with radio selected button.

    Bye ;))


  • jalal_machou

    Sir

    I have similar problem.I am drawing radio buttons using Owner DrawItem Method in MFC......When we try to do the event handling then both are get selected....the selection has to be one out of 2 /3/4......I need a soution in connection with the same......

    I am using CMyButtonclass(for eg) derived from CButton Class from MFC and using DrawItem method for drawing own child controls.Except radiobuttons everthing is perfect till the time....but the thing is i am getting the controls drawn on a window perfectly....now i am getting the problem in handling that....i.e.I need to handle the radio button events ....CHECKED and UNCHECKED.....

    ....for that i need a Handle of Parent window...

    I have options of GetParent() method...I am using like this....

    CWnd *p =GetParent(); from where i am getting the handle of that....i want the functionality of radiobuttons to be in my derived class so i am doingn that....



    Can Any one find the solution of controlling the radio button in derived class so that event handling can be done in that only....



    This is what i am trying to get that handle//....



    CWnd *pChild = NULL;

    for (pChild=GetWindow(GW_CHILD); pChild; pChild=GetWindow(GW_HWNDNEXT))

    {

    if (pChild == pBtn)

    {

    ((CRadioButtonEx *)pChild)->SetCheckStatus(false);

    ((CRadioButtonEx *)pChild)->Invalidate(TRUE);

    }

    }
    Basically my derived class should able to handle the Events associated with the radio buttons....

    Can any one know the solution....

    Thanks in Advance

    Shailesh


  • SonAsylum

    On WM5 SHNOTIFICATIONDATA is extended to provide softkey support. The easiest way to do it is to use:

    SHNOTIFICATIONDATA shnd;

    ...

    shnd.rgskn[0].pszTitle = _T("Left button cmd text");
    shnd.rgskn[0].skc.wpCmd = 0x101;
    shnd.rgskn[0].skc.grfFlags = NOTIF_SOFTKEY_FLAGS_DISMISS; // or any other relevant flag

    etc...

    When you specified the above, you will receive a WM_COMMAND with wParam set to 0x101 if the user clicked the softkey



  • Notification and Radio buttons