Here is How you can use PushButton..
a PushButton is a button but when you click it, it stay pushed
to get the state i use custom variables set to 1 for push and 0 for normal (UnPush)
you just need to add this file in your project and add the proper extern declaration.
////////////////////////////////////////////////////////////////////////////////
//ButtonAPI.src
////////////////////////////////////////////////////////////////////////////////
//Add to the src file where these functions are used
//declare extern PushButton(Unsigned int Button);
//declare extern UnPushButton(Unsigned int Button);
//#define BS_PUSHBUTTON 0x00000000
//#define BS_DEFPUSHBUTTON 0x00000001
//Uncomment if Undeclared
//#define BM_SETSTATE 0x00F3
//declare import,SendMessage alias SendMessageA(unsigned int hWnd,unsigned int Msg,int wParam,int lParam),int;
////////////////////////////////////////////////////////////////////////////////
//You need to add BS_DEFPUSHBUTTON or BS_PUSHBUTTON flag when you create the control
Global Sub PushButton(Unsigned int Button)
{
SendMessage(Button, BM_SETSTATE, true, NULL);
}
////////////////////////////////////////////////////////////////////////////////
//You need to add BS_DEFPUSHBUTTON or BS_PUSHBUTTON flag when you create the control
Global Sub UnPushButton(Unsigned int Button)
{
SendMessage(Button, BM_SETSTATE, false, NULL);
}