AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

NonVCL Hotkey

Ein Thema von SleepyMaster · begonnen am 26. Okt 2003 · letzter Beitrag vom 27. Okt 2003
Antwort Antwort
Seite 2 von 5     12 34     Letzte »    
Benutzerbild von SleepyMaster
SleepyMaster

Registriert seit: 18. Mai 2003
634 Beiträge
 
#11

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:50
Nil???
  Mit Zitat antworten Zitat
Benutzerbild von phlux
phlux

Registriert seit: 4. Nov 2002
Ort: Witten
1.335 Beiträge
 
Delphi 6 Personal
 
#12

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:53
hWnd?
Christian "phlux" Arndt
  Mit Zitat antworten Zitat
Benutzerbild von SleepyMaster
SleepyMaster

Registriert seit: 18. Mai 2003
634 Beiträge
 
#13

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:54
Und als Parameter???
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#14

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:55
Ohne Fenster keine MessageLoop / MessageQueu und somit auch keine Nachrichtenverarbeitung und somit wiederrum bekommst du kein WM_HOTKEY. Oder kurz: "Aus die Maus." Hotkeys gehen nur in Verbindung mit Fenstern (mit einer Nachrichtenschlefe und einer fenster- / Dialogprozedur), ob sichtbar oder unsichtbar spielt dabei keine Rolle. Siehe dazu mein NoteIt.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von SleepyMaster
SleepyMaster

Registriert seit: 18. Mai 2003
634 Beiträge
 
#15

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:56
Ohh man!!! Dann muss ich jetzt mit Hooks anfangen???

@Luckie wie finde ich dein dazu passendes Tutorial???
  Mit Zitat antworten Zitat
Benutzerbild von phlux
phlux

Registriert seit: 4. Nov 2002
Ort: Witten
1.335 Beiträge
 
Delphi 6 Personal
 
#16

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:57
Zitat:
The RegisterHotKey function defines a hot key for the current thread.

BOOL RegisterHotKey(

HWND hWnd, // window to receive hot-key notification
int id, // identifier of hot key
UINT fsModifiers, // key-modifier flags
UINT vk // virtual-key code
);


Parameters

hWnd

Identifies 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

Specifies the identifier of the hot key. No other hot key in the calling thread should have the same identifier. An application must specify a value in the range 0x0000 through 0xBFFF. A shared dynamic-link library (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.

fsModifiers

Specifies keys that must be pressed in combination with the key specified by the nVirtKey parameter in order to generate the WM_HOTKEY message. The fsModifiers parameter can be a combination of the following values:

Value Meaning
MOD_ALT Either ALT key must be held down.
MOD_CONTROL Either CTRL key must be held down.
MOD_SHIFT Either SHIFT key must be held down.


vk

Specifies the virtual-key code of the hot key.



Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.

Remarks

When a key is pressed, the system looks for a match against all thread hot keys. Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the thread that registered the hot key. This message is posted to the beginning of the queue so it is removed by the next iteration of the message loop.
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.

If the window identified by the hWnd parameter already registered a hot key with the same identifier as that specified by the id parameter, the new values for the fsModifiers and vk parameters replace the previously specified values for these parameters.
RegisterHotKey(hWnd, 2FFF, MOD_ALT or MOD_CONTROL, VK_ESC);
Christian "phlux" Arndt
  Mit Zitat antworten Zitat
Benutzerbild von SleepyMaster
SleepyMaster

Registriert seit: 18. Mai 2003
634 Beiträge
 
#17

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:58
Upps war doppelt!

Daniel! lösch mal bitte!
  Mit Zitat antworten Zitat
Benutzerbild von SleepyMaster
SleepyMaster

Registriert seit: 18. Mai 2003
634 Beiträge
 
#18

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 20:59
OK Habs gefunden (Ist aber von Assarbad)
  Mit Zitat antworten Zitat
Benutzerbild von phlux
phlux

Registriert seit: 4. Nov 2002
Ort: Witten
1.335 Beiträge
 
Delphi 6 Personal
 
#19

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 21:00
@Luckie: hat er nciht ein Fenster bzw Nachrichtenschleife wenn er nonVCL proggt, oder steh ich aufm Schlauch??
Christian "phlux" Arndt
  Mit Zitat antworten Zitat
Benutzerbild von SleepyMaster
SleepyMaster

Registriert seit: 18. Mai 2003
634 Beiträge
 
#20

Re: NonVCL Hotkey

  Alt 26. Okt 2003, 21:02
Wenn ich ein in meinem NonVCL Prog ein Formular drin hab schon!

Aber ich will ohne Formular!
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 5     12 34     Letzte »    


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz