Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » [bug report]problem about processing WM_PAINT message
Re: [bug report]problem about processing WM_PAINT message [message #29789 is a reply to message #29734] Wed, 17 November 2010 10:55 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
Interesting. I have not encountered a problem there during all these years with U++, but I guess there is no reason not to fix this.

Does this:

	case WM_PAINT:
		ASSERT(hwnd);
		if(hwnd) {
			PAINTSTRUCT ps;
			if(IsVisible())
				SyncScroll();
			HDC dc = BeginPaint(hwnd, &ps);
			fullrefresh = false;
			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
			}
			EndPaint(hwnd, &ps);
		}
		return 0L;


seem like appropriate fix?

Mirek

[Updated on: Wed, 17 November 2010 10:57]

Report message to a moderator

 
Read Message icon4.gif
Read Message
Previous Topic: How to split a sentence into words
Next Topic: why not StaticText::SetData != StaticText::SetText
Goto Forum:
  


Current Time: Sun Aug 24 22:23:52 CEST 2025

Total time taken to generate the page: 0.05824 seconds