Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EnumChildWindows(hWnd, SetChildRedraw, FALSE); //stopping redraw
- //... here you do your operations
- EnumChildWindows(hWnd, SetChildRedraw, TRUE); //restarting redraw
- #define DECLARE_STRING(str) TCHAR str[MAX_PATH]; ZeroMemory(str, sizeof(str));
- BOOL CALLBACK SetChildRedraw(HWND hwndChild, LPARAM lParam)
- {
- RECT rcChildRect; ZeroMemory(&rcChildRect, sizeof(rcChildRect));
- DECLARE_STRING(sText)
- GetClassName(hwndChild, sText, MAX_PATH);
- if (wcsstr(sText, L"SysTreeView32") != NULL)
- {
- SetWindowRedraw(hwndChild, lParam);
- if (lParam == TRUE)
- {
- GetWindowRect(hwndChild, &rcChildRect);
- InvalidateRect(hwndChild, &rcChildRect, TRUE);
- }
- }
- return TRUE;
- }
Add Comment
Please, Sign In to add comment