Come on Mate! Whos writting this app you or me?
>>can you tell me what a HWND is?
A HWND is a Handle to a WiNDow, a window being a control, dialog or window.
Look for CWND in MFC.
To get you past you current problem.
You need to know the checkbox that is currently checked.
How do you know the user has selected a checkbox?
Thats where this code has to go.
Find this by asking each checkbox if it is checked or responding to the message that one has BN_CLICKED.
Can you find which checkbox has been changed by the user and when?
Send each a BM_GETCHECK message looking for the checkbox that returns a BST_CHECKED.
Code:
mCalculate=0;
hWnd=GetDlgItem( hWholeDlg, ID_BUTTON1);
if(BST_CHECKED == SendMessage(hWnd, BM_GETCHECK, (WPARAM)0, (LPARAM)0))
m_Calculate=1;
hWnd=GetDlgItem(hWholeDlg ,ID_BUTTON2);
if(BST_CHECKED == SendMessage(hWnd, BM_GETCHECK, (WPARAM)0, (LPARAM)0))
m_Calculate=2;
//ect
If one does you can use your code.
If none do then????
>>this is a function that basically i was hoping that it would do this:
Yes but if some buttons are turned off for a calculation (say m_calculate=0 then DC_TEMP1, DC_TEMP2 ect will be turned off) , then a differnet type of calculation is selected, the buttons( DC_TEMP1, DC_TEMP2 ect) will still be off. You must turn them back on.
With your code if I select each type in turn all of the controls will be off.
PS why is MOLES1 and MOLES2 off in each type?