registerhotkey



Автор Бари задал вопрос в разделе Другие языки и технологии

WinAPI RegisterHotKey где это найти??? и получил лучший ответ

Ответ от Alexander ART[гуру]
regedit из командной строки набери (флажок+R)

Ответ от Костя Кузнецов[гуру]
зависит от среды в которой пишешь
функция эта находится в user32.dll
погугли описание этой функции и вперед
RegisterHotKey Function
BOOL WINAPI RegisterHotKey(
__in_opt HWND hWnd,
__in int id,
__in UINT fsModifiers,
__in UINT vk
);
Parameters
hWnd [in, optional]
Type: HWND
A handle to the window that will receive WM_HOTKEY messages generated by the hot key. If this parameter is NULL, WM_HOTKEY messages are posted to the message queue of the calling thread and must be processed in the message loop.
id [in]
Type: int
The identifier of the hot key. If the hWnd parameter is NULL, then the hot key is associated with the current thread rather than with a particular window. If a hot key already exists with the same hWnd and id parameters, see Remarks for the action taken.
fsModifiers [in]
Type: UINT
The keys that must be pressed in combination with the key specified by the uVirtKey parameter in order to generate the WM_HOTKEY message. The fsModifiers parameter can be a combination of the following values.
vk [in]
Type: UINT
The virtual-key code of the hot key. See Virtual Key Codes.
Return Value
Type: BOOL
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
When a key is pressed, the system looks for a match against all hot keys. Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the window with which the hot key is associated. If the hot key is not associated with a window, then the WM_HOTKEY message is posted to the thread associated with the hot key.
This function cannot associate a hot key with a window created by another thread.
RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.
In Windows XP and previous versions of Windows, if a hot key already exists with the same hWnd and id parameters, it is replaced by the new hot key. In subsequent versions of Windows, if a hot key already exists with the same hWnd and id parameters, it is maintained along with the new hot key. In these versions of Windows, the application must explicitly call UnregisterHotKey to unregister the old hot key.
The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.
An application must specify an id value in the range 0x0000 through 0xBFFF. A shared DLL must specify a value in the range 0xC000 through 0xFFFF (the range returned by the GlobalAddAtom function). To avoid conflicts with hot-key identifiers defined by other shared DLLs, a DLL should use the GlobalAddAtom function to obtain the hot-key identifier.

Ответ от 3 ответа[гуру]
Привет! Вот подборка тем с похожими вопросами и ответами на Ваш вопрос: WinAPI RegisterHotKey где это найти???
 

Ответить на вопрос:

Имя*

E-mail:*

Текст ответа:*
Проверочный код(введите 22):*