home *** CD-ROM | disk | FTP | other *** search
/ PC Administrator / spravce.iso / TaskModule / src / undocumented.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-07  |  503 b   |  16 lines

  1. // undocumented.cpp
  2.  
  3. #include "undocumented.h"
  4. #include "stdafx.h"
  5.  
  6. // declare undocumented functions
  7. void SwitchToThisWindow(HWND hWnd, BOOL bActivate)
  8. {
  9.     // bring window to the front
  10.     typedef void (WINAPI *SwitchToThisWindowFunc)( HWND, BOOL );
  11.     HINSTANCE hInstance = LoadLibrary("USER32.DLL");
  12.     SwitchToThisWindowFunc SwitchToThisWindow_Call = (SwitchToThisWindowFunc)GetProcAddress(hInstance,"SwitchToThisWindow");
  13.     SwitchToThisWindow_Call(hWnd,bActivate);
  14.     FreeLibrary(hInstance);
  15. }
  16.