The IsDlgButtonChecked function determines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither.
UINT IsDlgButtonChecked( HWND hDlg, // handle to dialog box int nIDButton // button identifier );
---
CheckDlgButton The CheckDlgButton function changes the check state of a button control.
BOOL CheckDlgButton( HWND hDlg, // handle to dialog box int nIDButton, // button-control identifier UINT uCheck // check state );
Jeg går ud fra du har flere radio buttons, så har du også en funktion (f.eks. OnRadioBtn()) som bliver kaldt hver gang du har kliket på dem. Det du skal bruge er: Til den checkbox du snakker om tilknytter du en control variabel (via ClassWizarden) lad os kalde den variabel DinCheckBox. Så det du skal så er at kalde SetCheck() <-- er ikke helt sikke om navnet, men du kan prøv at se hva VC++ foreslår. Dvs: OnRadioBtn{ <------------funktion start DinCheckBox.SetCheck(TRUE); <------------Set check i boxen UpdateData(FALSE); <------------Opdater skærmen }
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.