CODE:#define WS_CHILD 0x40000000
#define WS_VISIBLE 0x10000000
#define WS_BORDER 0x00800000
#define HKM_GETHOTKEY 0x402
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll");
external(INT, "SetFocus", "SetFocus", "User32.dll");
int hotkey;
createdialog(0);
showdialog(0, "Диалог",50, 50, 300, 300, 1, 1);
loop() pause(100);
function getmessage(0, WM_CREATE)
{
hotkey=CreateWindow(0, "msctls_hotkey32", "", WS_CHILD | WS_VISIBLE | WS_BORDER, 80, 80, 50, 28, gethwnd(0), 0, 0, 0);
}
function getmessage(0, WM_COMMAND)
{
if(message.lparam==hotkey)
{
char с[4];
codhex(sendmessage(HKM_GETHOTKEY, 0, 0, formatiw(hotkey)), #с[0]);
if(с[0]>0)SetFocus(0);
}
} |