Rect flickrs outside of the the app area
Graphics
2
Posts
1
Posters
2
Views
1
Watching
-
Hello, I have the following problem: I painted a rectangle with a text outside of my app on the screen in the WM_PAINT message. The Problem is that it flickrs very hard. The code I use:
hdc = GetDC(NULL); SelectObject(hdc, GetStockObject(WHITE\_BRUSH)); RoundRect(hdc, 10, 10, 100, 40, 9, 9); rc.left = 10; rc.top = 10; rc.right = 100; rc.bottom = 40; SetBkColor(ps.hdc, RGB(255,255,255)); DrawText(hdc,L"Hello",5, &rc, DT\_CENTER | DT\_VCENTER | DT\_SINGLELINE); ReleaseDC(hWnd,hdc);
I also tried using the WM_NCPAINT message but the it destroys the complete app frame. Thanks for help. bye, gabbana
-
Hello, I have the following problem: I painted a rectangle with a text outside of my app on the screen in the WM_PAINT message. The Problem is that it flickrs very hard. The code I use:
hdc = GetDC(NULL); SelectObject(hdc, GetStockObject(WHITE\_BRUSH)); RoundRect(hdc, 10, 10, 100, 40, 9, 9); rc.left = 10; rc.top = 10; rc.right = 100; rc.bottom = 40; SetBkColor(ps.hdc, RGB(255,255,255)); DrawText(hdc,L"Hello",5, &rc, DT\_CENTER | DT\_VCENTER | DT\_SINGLELINE); ReleaseDC(hWnd,hdc);
I also tried using the WM_NCPAINT message but the it destroys the complete app frame. Thanks for help. bye, gabbana