View Issue Details

IDProjectCategoryView StatusLast Update
0017451LazarusWidgetsetpublic2013-03-31 14:01
ReporterDRIGUS GmbHAssigned ToFelipe Monteiro de Carvalho 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0017451: [WinCE] Regression: Wrong Painting of TPageControl and TGroupBox
DescriptionI tried a new daily snapshot but fallen back because of some regressions. See rev26658.png for revision 26658 and rev27409.png for revision 27409.

First, the tabs aren't showing any more, but there are still selectable. Second, the TGroupBox isn't painting correct and third, the label is displaced (again).

(I had manually set the ApplicationType to atDesktop because or device is wrongly detected as a PDA.)
Additional InformationLazarus 0.9.29 r27409 FPC 2.4.3 i386-win32-win32/win64 and
Lazarus 0.9.29 r26658 FPC 2.4.3 i386-win32-win32/win64

Windows CE Embedded 6.0 device.
Tagscliprect, wince
Fixed in Revision27433
LazTarget-
WidgetsetWinCE
Attached Files
  • rev26658.png (18,729 bytes)
    rev26658.png (18,729 bytes)
  • rev27409.png (17,106 bytes)
    rev27409.png (17,106 bytes)
  • Lazarus.zip (749,516 bytes)
  • wince-groupbox.patch (1,198 bytes)
    Index: wincewinapi.inc
    ===================================================================
    --- wincewinapi.inc	(revision 27372)
    +++ wincewinapi.inc	(working copy)
    @@ -148,9 +148,7 @@
         // * Windows control y position inside group box is too highe
         // See: http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes#Regressions
     
    -    LCLIntf.GetWindowOrgEx(PaintMsg.DC, @Point);
    -    LCLIntf.SetWindowOrgEx(PaintMsg.DC, 0, 0, nil);
    -//    MoveWindowOrgEx(PaintMsg.DC,-ClientBoundRect.Left,-ClientBoundRect.Top);
    +    MoveWindowOrgEx(PaintMsg.DC,-ClientBoundRect.Left,-ClientBoundRect.Top);
         try
           {$IFDEF DEBUG_WINCE_LABELS}
           DebugLn('Before CallDefaultWindowProc WindowOrg Temporarely set to 0,0');
    @@ -159,8 +157,7 @@
           CallDefaultWindowProc(Handle, WM_PAINT, PaintMsg.DC, 0);
         finally
           // restore DC origin
    -//      MoveWindowOrgEx(PaintMsg.DC, ClientBoundRect.Left, ClientBoundRect.Top);
    -      LCLIntf.SetWindowOrgEx(PaintMsg.DC, Point.X, Point.Y, nil);
    +      MoveWindowOrgEx(PaintMsg.DC, ClientBoundRect.Left, ClientBoundRect.Top);
         end;
         {$IFDEF DEBUG_WINCE_LABELS}
         DebugLn(Format('After CallDefaultWindowProc WindowOrg: %d,%d',
    
    wince-groupbox.patch (1,198 bytes)

Activities

2010-09-20 14:14

 

rev26658.png (18,729 bytes)
rev26658.png (18,729 bytes)

2010-09-20 14:15

 

rev27409.png (17,106 bytes)
rev27409.png (17,106 bytes)

2010-09-20 14:15

 

Lazarus.zip (749,516 bytes)

Zaher Dirkey

2010-09-20 22:11

reporter   ~0041241

Would you test it with this revisions
before 0027173 after rev 0027173, and after rev 0027244

may be related to
http://bugs.freepascal.org/view.php?id=17249

Zaher Dirkey

2010-09-20 23:13

reporter   ~0041244

Yes it is related to
http://bugs.freepascal.org/view.php?id=17249
when i undo the patch it worked it tested in WINCE5 and WM5
I feel there is a conflicted bugs, i will try to fix it, because i not like to lose ClipRect and ExcludeClipRect features.

2010-09-21 00:28

 

wince-groupbox.patch (1,198 bytes)
Index: wincewinapi.inc
===================================================================
--- wincewinapi.inc	(revision 27372)
+++ wincewinapi.inc	(working copy)
@@ -148,9 +148,7 @@
     // * Windows control y position inside group box is too highe
     // See: http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes#Regressions
 
-    LCLIntf.GetWindowOrgEx(PaintMsg.DC, @Point);
-    LCLIntf.SetWindowOrgEx(PaintMsg.DC, 0, 0, nil);
-//    MoveWindowOrgEx(PaintMsg.DC,-ClientBoundRect.Left,-ClientBoundRect.Top);
+    MoveWindowOrgEx(PaintMsg.DC,-ClientBoundRect.Left,-ClientBoundRect.Top);
     try
       {$IFDEF DEBUG_WINCE_LABELS}
       DebugLn('Before CallDefaultWindowProc WindowOrg Temporarely set to 0,0');
@@ -159,8 +157,7 @@
       CallDefaultWindowProc(Handle, WM_PAINT, PaintMsg.DC, 0);
     finally
       // restore DC origin
-//      MoveWindowOrgEx(PaintMsg.DC, ClientBoundRect.Left, ClientBoundRect.Top);
-      LCLIntf.SetWindowOrgEx(PaintMsg.DC, Point.X, Point.Y, nil);
+      MoveWindowOrgEx(PaintMsg.DC, ClientBoundRect.Left, ClientBoundRect.Top);
     end;
     {$IFDEF DEBUG_WINCE_LABELS}
     DebugLn(Format('After CallDefaultWindowProc WindowOrg: %d,%d',
wince-groupbox.patch (1,198 bytes)

Zaher Dirkey

2010-09-21 00:28

reporter   ~0041247

Last edited: 2010-09-21 01:34

Fixed with attached patch "wince-groupbox.patch"
I will test it with my projects.

EDIT:
I tested, and test "project1" in the attached, all work fine.

Felipe Monteiro de Carvalho

2010-09-21 12:43

developer   ~0041261

Do all the rest of the LCL controls keep working? Doesn't this reintroduce the previous bug?

Zaher Dirkey

2010-09-21 15:33

reporter   ~0041263

Before the patch, GroupBox and PageControl not worked, it is like as picture in attached.

After that, I test TPanel with TLabel, GroupBox with TLabel, and PageControl with label inside Page, And my project have controls used ClipRect...

Now, All work fine.
But need to retest in WINCE6 i not have it, I just tested in WINCE5.0 WM5 WM6

Felipe Monteiro de Carvalho

2010-09-22 11:47

developer   ~0041273

thanks, applied

DRIGUS GmbH

2010-09-23 09:14

reporter   ~0041281

Lazarus 0.9.29 r27442 FPC 2.4.3 i386-win32-win32/win64
Fixed, thanks.

Issue History

Date Modified Username Field Change
2010-09-20 14:13 DRIGUS GmbH New Issue
2010-09-20 14:13 DRIGUS GmbH Widgetset => WinCE
2010-09-20 14:14 DRIGUS GmbH File Added: rev26658.png
2010-09-20 14:15 DRIGUS GmbH File Added: rev27409.png
2010-09-20 14:15 DRIGUS GmbH File Added: Lazarus.zip
2010-09-20 22:06 Zaher Dirkey Tag Attached: wince
2010-09-20 22:11 Zaher Dirkey Note Added: 0041241
2010-09-20 23:13 Zaher Dirkey Note Added: 0041244
2010-09-21 00:28 Zaher Dirkey File Added: wince-groupbox.patch
2010-09-21 00:28 Zaher Dirkey Note Added: 0041247
2010-09-21 01:34 Zaher Dirkey Note Edited: 0041247
2010-09-21 10:49 Felipe Monteiro de Carvalho Status new => assigned
2010-09-21 10:49 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2010-09-21 12:43 Felipe Monteiro de Carvalho Note Added: 0041261
2010-09-21 15:33 Zaher Dirkey Note Added: 0041263
2010-09-22 11:47 Felipe Monteiro de Carvalho Fixed in Revision => 27433
2010-09-22 11:47 Felipe Monteiro de Carvalho LazTarget => -
2010-09-22 11:47 Felipe Monteiro de Carvalho Status assigned => resolved
2010-09-22 11:47 Felipe Monteiro de Carvalho Fixed in Version => 0.9.29 (SVN)
2010-09-22 11:47 Felipe Monteiro de Carvalho Resolution open => fixed
2010-09-22 11:47 Felipe Monteiro de Carvalho Note Added: 0041273
2010-09-23 09:14 DRIGUS GmbH Status resolved => closed
2010-09-23 09:14 DRIGUS GmbH Note Added: 0041281
2013-03-31 14:01 Zaher Dirkey Tag Attached: cliprect