From: B.S on 2 Nov 2009 07:23 Hi all. I am trying to write some thing like hot key and i need to get WM_CHAR from desktop window. the window name is "Progman". to get it i used this code: FARPROC DeskWndProc; DeskWndProc = (FARPROC)SetWindowLong(DeskWnd, GWL_WNDPROC, (DWORD) DeskProc); SetWindowLong(DeskWnd, GWL_WNDPROC, (DWORD) DeskWndProc); but it doesn't work. Pleas help.
From: Friedel Jantzen on 2 Nov 2009 08:29 Am Mon, 2 Nov 2009 04:23:52 -0800 (PST) schrieb B.S: > Hi all. I am trying to write some thing like hot key You cannot use RegisterHotKey in your app? > and i need to get > WM_CHAR from desktop window. the window name is "Progman". to get it > i used this code: > > FARPROC DeskWndProc; > DeskWndProc = (FARPROC)SetWindowLong(DeskWnd, GWL_WNDPROC, (DWORD) > DeskProc); > SetWindowLong(DeskWnd, GWL_WNDPROC, (DWORD) DeskWndProc); > > but it doesn't work. > > Pleas help. See "Subclassing". Is it really necessary for you to subclass Progman? Perhaps a keyboard hook could do it, if you cannot use RegisterHotKey. Regards, Friedel
From: B.S on 2 Nov 2009 14:05 i'm trying this but it doesn't working. WNDPROC DeskWndProc; DeskWndProc = (WNDPROC)GetWindowLongPtr(DeskWnd,GWLP_WNDPROC); SetWindowLongPtr(DeskWnd,GWLP_WNDPROC,(LONG_PTR) DeskProc);
From: Friedel Jantzen on 3 Nov 2009 03:11 Am Mon, 2 Nov 2009 11:05:29 -0800 (PST) schrieb B.S: > i'm trying this but it doesn't working. > > WNDPROC DeskWndProc; > DeskWndProc = (WNDPROC)GetWindowLongPtr(DeskWnd,GWLP_WNDPROC); > SetWindowLongPtr(DeskWnd,GWLP_WNDPROC,(LONG_PTR) DeskProc); Subclassing and its limits: http://msdn.microsoft.com/en-us/library/ms997565.aspx HTH, Friedel
|
Pages: 1 Prev: ANN: Seed7 Release 2009-11-01 Next: [ANN] Idle Scripting Language 1.0 |