| |
| | Controls |
 | | In our example, we will have two checkboxes for "male" and "pregnant" If the user tries to set both to on, then the system will turn the other one off with a nasty error message. |
 | | CheckBox1a = CreateWindow ("button","1A",WS_CHILDWS_VISIBLEBS_AUTORADIOBUTTONWS_GROUP, 100,100,50,50,hWnd, (HMENU) 1, ((LPCREATESTRUCT) lParam)->hInstance, NULL); CheckBox1b = CreateWindow ("button","1B",WS_CHILDWS_VISIBLEBS_AUTORADIOBUTTON, 100,200,50,50,hWnd, (HMENU) 2, ((LPCREATESTRUCT) lParam)->hInstance, NULL); CheckBox2a = CreateWindow ("button","2A",WS_CHILDWS_VISIBLEBS_AUTORADIOBUTTONWS_GROUP, 200,100,50,50,hWnd, (HMENU) 3, ((LPCREATESTRUCT) lParam)->hInstance, NULL); CheckBox2b = CreateWindow ("button","2B",WS_CHILDWS_VISIBLEBS_AUTORADIOBUTTON, 200,200,50,50,hWnd, (HMENU) 4, ((LPCREATESTRUCT) lParam)->hInstance, NULL); |
 | | We respond to each one of these with a message that says that it was changed. |
| www.wiu.edu /users/musp1/control.html (1106 words) |
|