Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Radiobuttons and checkboxes unravelled

$
0
0

This is not a problem but some help to fellow developers.  Brooks V

 

Instructions on some dialog controls:

CheckBoxes_______________________________________________________________________________

Integer(BOOL)::    bret
Integer(HANDLE)::  hDlg
Integer(UINT)::    uret

     bret = CheckDlgButton (hDlg, IDC_CHECKBOX1, BST_CHECKED)   ! This checks IDC_CHECKBOX1

! bret returns TRUE if IDC_CHECKBOX1 was checked

     bret = CheckDlgButton (hDlg, IDC_CHECKBOX2, BST_UNCHECKED) ! This unchecks IDC_CHECKBOX2  

! bret returns TRUE if IDC_CHECKBOX2 was unchecked

     uret = IsDlgButtonChecked(hDlg, IDC_CHECKBOX1)

! uret returns a value of BST_CHECKED if IDC_CHECKBOX1 was checked and BST_UNCHECKED otherwise

RadioButtons_______________________________________________________________________________

Integer(4),parameter:: IDC_Radio1 = 1001
Integer(4),parameter:: IDC_Radio2 = 1002
Integer(4),parameter:: IDC_Radio3 = 1003
Integer(4),parameter:: IDC_Radio4 = 1004
Integer(BOOL)::   bret
Integer(UINT)::   uStatus
Integer(HANDLE):: hDlg

     bret = CheckRadioButton(hDlg, IDC_Radio1, IDC_Radio4, IDC_Radio2)

! bret returns TRUE is successful and FALSE if not.
! IDC_Radio1, IDC_Radio2, IDC_Radio3 and IDC_Radio4 were all connected
! but only IDC_Radio2 is checked. IDC_Radio1 must be the only one with
! the Group property set and all four must have their Auto button
! property selected.

   uStatus = IsDlgButtonChecked(hDlg, IDC_Radio3)

! where uStatus will equal BST_CHECKED if IDC_Radio3 is checked and
! equal to BST_UNCHECKED if it is not selected (checked).

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>