|
|
|
Ошибка с registrationhotkey
|
|||
|---|---|---|---|
|
#18+
В чём ошибка unit1.cpp //--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; HWND hwnd; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::WMHotKey(TWM0x00F& WM_HOTKEY ) { if(!(hwnd=FindWindow("SciCalc","Êàëüêóëÿòîð"))) { WinExec("Calc",SW_SHOWNA); hwnd=FindWindow("SciCalc","Êàëüêóëÿòîð"); } void __fastcall TForm1::FormCreate(TObject *Sender) { bool RHKret = RegisterHotKey(Form1->Handle, 0x00F, MOD_ALT, int('X') ); } //--------------------------------------------------------------------------- unit1.h //--------------------------------------------------------------------------- #ifndef Unit1H #define Unit1H //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> //--------------------------------------------------------------------------- class TForm1 : public TForm { __published: // IDE-managed Components void __fastcall FormCreate(TObject *Sender); private: // User declarations void __fastcall WMHotKey(TWMHotKey&); public: // User declarations __fastcall TForm1(TComponent* Owner); BEGIN_MESSAGE_MAP MESSAGE_HANDLER(WM_HOTKEY,TWMHotKey,WMHotKey); END_MESSAGE_MAP(TComponent); }; //--------------------------------------------------------------------------- extern PACKAGE TForm1 *Form1; //--------------------------------------------------------------------------- #endif ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.09.2007, 13:35:32 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=275&tid=2028106]: |
0ms |
get settings: |
10ms |
get forum list: |
20ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
341ms |
get topic data: |
11ms |
get forum data: |
4ms |
get page messages: |
28ms |
get tp. blocked users: |
2ms |
| others: | 246ms |
| total: | 670ms |

| 0 / 0 |
