[ros-bugs] [Bug 1201] New: SetWindowOrgEx not handled correctly in various functions

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Sun Dec 25 19:55:47 CET 2005


http://www.reactos.org/bugzilla/show_bug.cgi?id=1201

           Summary: SetWindowOrgEx not handled correctly in various
                    functions
           Product: ReactOS
           Version: 0.2.9
          Platform: VMWare 4
               URL: http://www.ghisler.ch/reactostest/reactostest.htm
        OS/Version: ReactOS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Win32
        AssignedTo: ros-bugs at reactos.org
        ReportedBy: chris1 at ghisler.com
         QAContact: ros-bugs at reactos.org


When the display coordinates are displaved with SetWindowOrgEx, various Windows
functions don't behave correctly. The tested functions are DrawText,
ImageList_DrawEx and FillRect. The problem seems to be the clipping rectangle in
all 3 cases.

See the above URL for a sample C project and two images showing the problem.

Sample code:
	GetClientRect(hWnd, &rt);
	GetTextExtentPoint(hdc,szHello,strlen(szHello),&sz);
	GetModuleFileName(hInst,buf,sizeof(buf)-1);
	himl=(HIMAGELIST)SHGetFileInfo(buf,FILE_ATTRIBUTE_ARCHIVE,
		&sfi,sizeof(SHFILEINFO),SHGFI_SYSICONINDEX | SHGFI_LARGEICON |
 		SHGFI_USEFILEATTRIBUTES);
	hbrush=CreateSolidBrush(RGB(128,128,128));
		
	rt.top=0;
	rt.left=0;
	rt.right=sz.cx;
	rt.bottom=sz.cy;

	rt2.top=100;
	rt2.left=0;
	rt2.right=50;
	rt2.bottom=150;

	// normal drawing
	DrawText(hdc, szHello, -1, &rt, DT_LEFT);
	ImageList_DrawEx(himl,sfi.iIcon,hdc,0,50,32,32,0,0,
		ILD_TRANSPARENT);
	FillRect(hdc, &rt2, hbrush);
	SetWindowOrgEx(hdc,-100,0,NULL);

	// displaced drawing
	DrawText(hdc, szHello, -1, &rt, DT_LEFT);
	ImageList_DrawEx(himl,sfi.iIcon,hdc,0,50,32,32,0,0,ILD_TRANSPARENT);
	FillRect(hdc, &rt2, hbrush);
	DeleteObject(hbrush);

The displaced drawing does not display on ReactOS at all, but draws fine on
Windows 2000 or other Windows systems. This isn't just an academic problem,
because Delphi uses SetWindowOrgEx extensively!

-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.


More information about the Ros-bugs mailing list