How to implement the Tri State checkbox?
CONTROL "Interni:", 136, "BUTTON", BS_AUTO3STATE | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 385, 110, 30, 12
nCsn = 2
REDEFINE CHECKBOX oCsn VAR csn;
ID 111 OF oDlgAna;
ON CLICK ( ::SendMsg( BM_SETCHECK, ( nCsn + 1 ) % 3 ),;
nCsn := ::SendMsg( BM_GETCHECK ) )
// Button messages
#define BM_GETCHECK 240
#define BM_SETCHECK 241
#define BM_GETSTATE 242
#define BM_SETSTATE 243
#define BM_SETSTYLE 244
#include "fivewin.ch"
#define BM_GETCHECK 240
#define BM_SETCHECK 241
#define BM_GETSTATE 242
#define BM_SETSTATE 243
#define BM_SETSTYLE 244
Procedure TestTriCheck()
Private oDlg, oChk, lChk, nChk := 0, oBtnTest, oBtnExit
Define Dialog oDlg;
Resource "DIALOG_TEST";
Of oWnd
Redefine CheckBox oChk;
var lChk;
Update;
ID 101;
Of oDlg;
ON CLICK ( oChk:SendMsg( BM_SETCHECK, ( nChk+ 1 ) % 3 ),;
nChk := oChk:SendMsg( BM_GETCHECK ) )
Redefine ButtonBmp oBtnTest;
ID 102;
of oDlg;
Prompt "Test ";
action MsgInfo(Str(nChk));
Update;
TextRight
Redefine ButtonBmp oBtnExit;
ID 103;
of oDlg;
Prompt "End ";
action oDlg:End();
Update;
TextRight
Activate Dialog oDlg;
CENTER
Return
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 65 guests