Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
945 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. BizPlanBuilder.cpp
  5. Abstract:
  6. App does not repaint after a WM_SETTEXT message.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 01/03/2001 linstev Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(BizPlanBuilder)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(SetWindowTextA)
  17. APIHOOK_ENUM_END
  18. /*++
  19. Subclass the windowproc for this call and fix the pointer that comes out in
  20. the WM_SETTEXT message that is generated by SetWindowTextA.
  21. --*/
  22. BOOL
  23. APIHOOK(SetWindowTextA)(
  24. HWND hWnd,
  25. LPCSTR lpString
  26. )
  27. {
  28. BOOL bRet = ORIGINAL_API(SetWindowTextA)(hWnd, lpString);
  29. //
  30. // Redraw the window
  31. //
  32. InvalidateRect(hWnd, NULL, TRUE);
  33. return bRet;
  34. }
  35. /*++
  36. Register hooked functions
  37. --*/
  38. HOOK_BEGIN
  39. APIHOOK_ENTRY(USER32.DLL, SetWindowTextA)
  40. HOOK_END
  41. IMPLEMENT_SHIM_END