code_junkie

Getting control of the main thread in windows c++ app

Nov 12th, 2011
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. WM_CALLBACK = WM_APP+1
  2.  
  3. // Subclass the edit control.
  4. wpOrigEditProc = (WNDPROC) SetWindowLong(hwndEdit, GWL_WNDPROC, (LONG)EditSubclassProc);
  5.  
  6. // Remove the subclass from the edit control.
  7. SetWindowLong(hwndEdit, GWL_WNDPROC, (LONG)wpOrigEditProc);
  8.  
  9. VOID CALLBACK Function(
  10. HWND hwnd,
  11. UINT uMsg,
  12. UINT_PTR idEvent,
  13. DWORD dwTime
  14. )
  15. {
  16. // stuff
  17. }
  18.  
  19. SetTimer(hWnd, event, 0, Function);
Add Comment
Please, Sign In to add comment