   Win32 Radio Buttons in a Group box
  Hey, doing some Win32 development, and running into a few problems.First: When I put radio buttons in a Group Box, the group box is the button's parent, and so my window can't receive the commands from the radio buttons, since the button passes the messages to it's parent, and the group box isn't passing on the messages to my window.If the radio button is directly in my window, my window recieves 'WM_COMMAND' with 'HIWORD(wParam)' being 'BN_CLICKED', and 'LOWORD(wParam)' being the button's ID. But if the radio button is a child of a group box, and the group box is the child of my window, I don't recieve the message.How do I recieve the button's message?Second: Buttons have 'IDs'. Is there a function to get the ID of a button, knowing only the HWND? GetMenu() works for me, is that what people normally use?Third: Why can't I use Command Links? Why's my Windows headers out of date? For instance, Commctrl.h doesn't #define some defines that I need in able to use Command links.I'm using MinGW GCC - are their headers out of date? Am I required to use Microsoft Visual Studio to program modern applications, or is there a GCC update for Windows 7 (because Stallman loves Microsoft so much) that I can use?   
Quote:First: When I put radio buttons in a Group Box, the group box is the button's parent, and so my window can't receive the commands [...]I answered a similar question here. That poster specifically wanted to be able to hide all the child controls at once so it made sense to make them children of a grouping child control. If you don't need that functionality there is nothing wrong with just making your radio buttons children of the parent window rather than the group box. If you are having trouble with Z-order, i.e. the group box is in front of the radio buttons, either change the order of construction or call BringWindowToTop() on the radio buttons after you create them. Also in the old thread I recommended a custom class... in your case if you do want the radio buttons to be children of the group box, you'd probably be better off subclassing the group box -- that way you don't have to worry about painting a custom control to look like a regular group box.Quote:Second: Buttons have 'IDs'. Is there a function to get the ID of a button, knowing only the HWND? GetWindowLong(hwnd, GWL_ID);   