home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 / Programming Windows 95.iso / code / CHAP12 / HELPER.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-01  |  816 b   |  28 lines

  1. /*--------------------------------
  2.    HELPER.C -- Helper routines.
  3.                (c) Paul Yao, 1996
  4.   --------------------------------*/
  5. #include <windows.h>
  6. #include <windowsx.h>
  7. #include <commctrl.h>
  8. #include "property.h"
  9.  
  10.  
  11. //-------------------------------------------------------------------
  12. void SetButtonCheck (HWND hwndDlg, int CtrlID, BOOL bCheck)
  13.      {
  14.      HWND hwndCtrl = GetDlgItem (hwndDlg, CtrlID) ;
  15.      if (bCheck)
  16.           {
  17.           Button_SetCheck (hwndCtrl, BST_CHECKED) ;
  18.           }
  19.      }
  20.  
  21. //-------------------------------------------------------------------
  22. BOOL QueryButtonCheck (HWND hwndDlg, int CtrlID)
  23.      {
  24.      HWND hwndCtrl = GetDlgItem (hwndDlg, CtrlID) ;
  25.      int  nCheck = Button_GetCheck (hwndCtrl) ;
  26.      return (nCheck == BST_CHECKED) ;
  27.      } 
  28.