mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: WM_PAINT now deos BeginPaint even if !IsVisible
git-svn-id: svn://ultimatepp.org/upp/trunk@2849 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5dcdb036b0
commit
92578926b0
3 changed files with 1478 additions and 1475 deletions
|
|
@ -619,9 +619,13 @@ void Ctrl::DrawCtrl(Draw& w, int x, int y)
|
|||
{
|
||||
GuiLock __;
|
||||
w.Offset(x, y);
|
||||
|
||||
SystemDraw *ws = dynamic_cast<SystemDraw *>(&w);
|
||||
if(ws)
|
||||
UpdateArea(*ws, GetRect().GetSize());
|
||||
|
||||
// CtrlPaint(w, GetSize()); _DBG_
|
||||
|
||||
w.End();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,31 +102,30 @@ LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
|||
#endif
|
||||
case WM_PAINT:
|
||||
ASSERT(hwnd);
|
||||
if(IsVisible() && hwnd) {
|
||||
if(hwnd) {
|
||||
PAINTSTRUCT ps;
|
||||
SyncScroll();
|
||||
if(IsVisible())
|
||||
SyncScroll();
|
||||
HDC dc = BeginPaint(hwnd, &ps);
|
||||
fullrefresh = false;
|
||||
SystemDraw draw(dc);
|
||||
#ifndef PLATFORM_WINCE
|
||||
HPALETTE hOldPal;
|
||||
if(draw.PaletteMode() && SystemDraw::AutoPalette()) {
|
||||
hOldPal = SelectPalette(dc, GetQlibPalette(), TRUE);
|
||||
int n = RealizePalette(dc);
|
||||
LLOG("In paint realized " << n << " colors");
|
||||
if(IsVisible()) {
|
||||
SystemDraw draw(dc);
|
||||
#ifndef PLATFORM_WINCE
|
||||
HPALETTE hOldPal;
|
||||
if(draw.PaletteMode() && SystemDraw::AutoPalette()) {
|
||||
hOldPal = SelectPalette(dc, GetQlibPalette(), TRUE);
|
||||
int n = RealizePalette(dc);
|
||||
LLOG("In paint realized " << n << " colors");
|
||||
}
|
||||
#endif
|
||||
painting = true;
|
||||
UpdateArea(draw, Rect(ps.rcPaint));
|
||||
painting = false;
|
||||
#ifndef PLATFORM_WINCE
|
||||
if(draw.PaletteMode() && SystemDraw::AutoPalette())
|
||||
SelectPalette(dc, hOldPal, TRUE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef _DEBUG
|
||||
painting = true;
|
||||
#endif
|
||||
UpdateArea(draw, Rect(ps.rcPaint));
|
||||
#ifdef _DEBUG
|
||||
painting = false;
|
||||
#endif
|
||||
#ifndef PLATFORM_WINCE
|
||||
if(draw.PaletteMode() && SystemDraw::AutoPalette())
|
||||
SelectPalette(dc, hOldPal, TRUE);
|
||||
#endif
|
||||
EndPaint(hwnd, &ps);
|
||||
}
|
||||
return 0L;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue