Guest User

Untitled

a guest
Apr 26th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. EnumChildWindows(hWnd, SetChildRedraw, FALSE); //stopping redraw
  2. //... here you do your operations
  3. EnumChildWindows(hWnd, SetChildRedraw, TRUE); //restarting redraw
  4.  
  5. #define DECLARE_STRING(str) TCHAR str[MAX_PATH]; ZeroMemory(str, sizeof(str));
  6. BOOL CALLBACK SetChildRedraw(HWND hwndChild, LPARAM lParam)
  7. {
  8. RECT rcChildRect; ZeroMemory(&rcChildRect, sizeof(rcChildRect));
  9. DECLARE_STRING(sText)
  10. GetClassName(hwndChild, sText, MAX_PATH);
  11. if (wcsstr(sText, L"SysTreeView32") != NULL)
  12. {
  13. SetWindowRedraw(hwndChild, lParam);
  14. if (lParam == TRUE)
  15. {
  16. GetWindowRect(hwndChild, &rcChildRect);
  17. InvalidateRect(hwndChild, &rcChildRect, TRUE);
  18. }
  19. }
  20. return TRUE;
  21. }
Add Comment
Please, Sign In to add comment