The SetFocus function sets the keyboard focus to the specified window. The window must be attached to the calling thread's message queue.
Syntax
HWND SetFocus( HWND hWnd
);
Parameters
hWnd
[in] Handle to the window that will receive the keyboard input. If this parameter is NULL, keystrokes are ignored.
Return Value
If the function succeeds, the return value is the handle to the window that previously had the keyboard focus. If the hWnd parameter is invalid or the window is not attached to the calling thread's message queue, the return value is NULL. To get extended error information, call GetLastError.
nco2k hat geschrieben:den befehl kenne ich, hat aber nichts mit gadgets zu tun, sondern ist nur für fenster gedacht. also kann ich das nicht gebrauchen.
c ya,
nco2k
hmmm, ist ja komisch wenn der Befehl nichts mit Gadget´s zu hat frage
ich mich warum es dann funktioniert.
DONALDwww.PureBasic-Donald.de gibt es im Moment nicht mehr PureBasic - jaPBe - PureVisonXP - TailBite
In Windows sind alle Steuerelemente (Gadgets) Fenster. Gadgets sind ChildWindows des eigentlichen Programmfenster. SetFocus_ ist also auch mit Gadgets möglich. Jeder Button oder was sonst noch ist ein Fenster
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.