IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Contribuez Delphi Discussion :

Windows 64 bits: Problème de redimensionnement des fenêtres


Sujet :

Contribuez Delphi

  1. #1
    Membre expérimenté

    Homme Profil pro
    Inscrit en
    Mars 2004
    Messages
    897
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Marne (Champagne Ardenne)

    Informations professionnelles :
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2004
    Messages : 897
    Points : 1 561
    Points
    1 561
    Par défaut Windows 64 bits: Problème de redimensionnement des fenêtres


    De plus en plus, nos clients migrent sur des architectures 64 bits et nous avons rencontré massivement un problème de redimensionnement des fenêtres de nos applicatifs initialement développés avec d'anciennes versions de Delphi pour Win32.

    J'ai trouvé une petite unité développée pas Andreas Hausladen qui règle le problème. Il suffit simplement de l'ajouter au projet puis de le recompiler.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    {******************************************************************************}
    {*                                                                            *}
    {* Control resize bugfix for kernel stack overflow due to WH_CALLWNDPROC hook *)
    {* Version 1.1 (2008-05-25)                                                   *}
    {*                                                                            *}
    {* (C) 2008 Andreas Hausladen (<a href="mailto:Andreas.Hausladen@gmx.de">Andreas.Hausladen@gmx.de</a>)                      *}
    {*                                                                            *}
    {******************************************************************************}
    {$A+,B-,C+,D-,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
    { Usage:
        Add the unit to the .dpr file's uses-list.
        Example:
          uses
            FastMM4, // optional memory manager
            ControlResizeBugFix,
            Forms,
            Unit1 in 'Unit1.pas';
     
        History:
          2008-05-25:
            - Added code to detect endless resizing controls.
            - Added experimental OPTIMIZED_RESIZE_REDRAW option for faster form resizing
          2008-05-24:
            - Initial release
    }
    unit ControlResizeBugFix;
    {.$DEFINE OPTIMIZED_RESIZE_REDRAW}
    { The OPTIMIZED_RESIZE_REDRAW option is experimental. It speeds up the resizing of forms
      by not redrawing each control when it is realigned but by invalidating them all after
      one align round is done. }
    {$UNDEF DEBUG} // undef any global DEBUG conditions
    {.$DEFINE DEBUG}
    { The DEBUG option activates the source code debugging of this unit. }
    interface
    {$IFDEF DEBUG}
      {$D+}
    {$ENDIF}
    implementation
    uses
      Windows, Messages, SysUtils, Classes, Controls;
    {$IFDEF CONDITIONALEXPRESSIONS}
      {$IF CompilerVersion >= 18.0}
       {$DEFINE DELPHI2006_UP}
      {$IFEND}
      {$IF CompilerVersion >= 17.0}
       {$DEFINE DELPHI2005_UP}
      {$IFEND}
    {$ENDIF}
    type
      TFixWinControl = class(TWinControl)
      private
        procedure AlignControl(AControl: TControl);
        procedure HandleAlignControls(AControl: TControl; var R: TRect);
      protected
        procedure WMSize(var Message: TWMSize); message WM_SIZE;
        procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
      end;
      TOpenWinControl = class(TWinControl);
    {$IFNDEF DELPHI2005_UP}
      TD5WinControlPrivate = class(TControl)
      public
        FAlignLevel: Word;
      end;
    {$ENDIF ~DELPHI2005_UP}
    threadvar
      AlignControlList: TList;
    procedure TFixWinControl.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
    var
      WindowPlacement: TWindowPlacement;
    begin
      if (ALeft <> Left) or (ATop <> Top) or
        (AWidth <> Width) or (AHeight <> Height) then
      begin
        if HandleAllocated and not IsIconic(WindowHandle) then
        begin
          if AlignControlList <> nil then
            SetWindowPos(WindowHandle, 0, ALeft, ATop, AWidth, AHeight,
              SWP_NOZORDER or SWP_NOACTIVATE or SWP_DEFERERASE)
          else
            SetWindowPos(WindowHandle, 0, ALeft, ATop, AWidth, AHeight,
              SWP_NOZORDER or SWP_NOACTIVATE);
        end
        else
        begin
          PInteger(@Left)^ := ALeft;
          PInteger(@Top)^ := ATop;
          PInteger(@Width)^ := AWidth;
          PInteger(@Height)^ := AHeight;
          if HandleAllocated then
          begin
            WindowPlacement.Length := SizeOf(WindowPlacement);
            GetWindowPlacement(WindowHandle, @WindowPlacement);
            WindowPlacement.rcNormalPosition := BoundsRect;
            SetWindowPlacement(WindowHandle, @WindowPlacement);
          end;
        end;
        UpdateBoundsRect(Rect(Left, Top, Left + Width, Top + Height));
        RequestAlign;
      end;
    end;
     
    procedure TFixWinControl.HandleAlignControls(AControl: TControl; var R: TRect);
      function AlignWork: Boolean;
      var
        I: Integer;
      begin
        Result := True;
        for I := ControlCount - 1 downto 0 do
          if (Controls[I].Align <> alNone) or
             (Controls[I].Anchors <> [akLeft, akTop]) then
            Exit;
        Result := False;
      end;
    var
      OwnAlignControlList, TempAlignControlList: TList;
      ResizeList: TList;
      ResizeCounts: TList; // of Integer
      Ctrl: TWinControl;
      I, Index: Integer;
    begin
      if AlignWork then
      begin
        OwnAlignControlList := nil;
        try
          if AlignControlList = nil then
          begin
            OwnAlignControlList := TList.Create;
            AlignControlList := OwnAlignControlList;
          end;
          AlignControls(AControl, R);
          if (OwnAlignControlList <> nil) and (OwnAlignControlList.Count > 0) then
          begin
            { Convert recursion into an iteration to prevent the kernel stack overflow }
            ResizeList := TList.Create;
            ResizeCounts := TList.Create;
            try
              { The controls in the OwnAlignControlList must be added to ResizeList in reverse order.
                Otherwise the OnResize events aren't fired in correct order. }
              AlignControlList := TList.Create;
              try
                repeat
                  try
                    for I := OwnAlignControlList.Count - 1 downto 0 do
                    begin
                      Ctrl := TWinControl(OwnAlignControlList[I]);
                      Index := ResizeList.IndexOf(Ctrl);
                      { An endless resizing component was stopped by the kernel stack overflow bug.
                        So we must catch this condition to prevent an endless loop. }
                      if (Index = -1) or (Integer(ResizeCounts[Index]) < 30) then
                      begin
                        Ctrl.Realign;
                        if Index <> -1 then
                          ResizeCounts[Index] := Pointer(Integer(ResizeCounts[Index]) + 1);
                        ResizeCounts.Add(Pointer(0)); // keep index in sync
                        ResizeList.Add(Ctrl);
                      end
                      else if Index <> -1 then
                      begin
                        {$WARNINGS OFF}
                        if DebugHook <> 0 then
                        {$WARNINGS ON}
                          OutputDebugString(PChar(Format('The component "%s" of class %s has an endless resize loop', [Ctrl.Name, Ctrl.ClassName])));
                      end;
                    end;
                  finally
                    OwnAlignControlList.Clear;
                    { Switch lists }
                    TempAlignControlList := AlignControlList;
                    AlignControlList := OwnAlignControlList;
                    OwnAlignControlList := TempAlignControlList;
                  end;
                until (OwnAlignControlList.Count = 0) {or EndlessResizeDetection};
              finally
                { Let another AlignControlList handle any alignment that comes from the
                  OnResize method. }
                FreeAndNil(AlignControlList);
              end;
              { Fire Resize events }
              for I := ResizeList.Count - 1 downto 0 do
              begin
                Ctrl := TWinControl(ResizeList[I]);
                if not (csLoading in Ctrl.ComponentState) then
                  TOpenWinControl(Ctrl).Resize;
              end;
            finally
              ResizeCounts.Free;
              ResizeList.Free;
            end;
            {$IFDEF OPTIMIZED_RESIZE_REDRAW}
            Invalidate;
            {$ENDIF OPTIMIZED_RESIZE_REDRAW}
          end;
        finally
          if OwnAlignControlList <> nil then
          begin
            AlignControlList := nil;
            FreeAndNil(OwnAlignControlList);
          end;
        end;
      end
      else
        AlignControls(AControl, R);
    end;
    procedure TFixWinControl.WMSize(var Message: TWMSize);
    begin
      {$IFDEF DELPHI2005_UP}
      UpdateBounds;
        {$IFDEF DELPHI2006_UP}
      UpdateExplicitBounds;
        {$ENDIF DELPHI2006_UP}
      {$ELSE}
      if HandleAllocated then
        Perform(WM_MOVE, 0, LPARAM(Left and $0000ffff) or (Top shl 16)); // calls the private UpdateBounds
      {$ENDIF DELPHI2005_UP}
      DefaultHandler(Message);
      if AlignControlList <> nil then
      begin
        if AlignControlList.IndexOf(Self) = -1 then
          AlignControlList.Add(Self)
      end
      else
      begin
        Realign;
        if not (csLoading in ComponentState) then
          Resize;
      end;
    end;
    procedure TFixWinControl.AlignControl(AControl: TControl);
    var
      Rect: TRect;
    begin
      if not HandleAllocated or (csDestroying in ComponentState) then
        Exit;
      {$IFDEF DELPHI2005_UP}
      if AlignDisabled then
      {$ELSE}
      if TD5WinControlPrivate(Self).FAlignLevel <> 0 then
      {$ENDIF DELPHI2005_UP}
        ControlState := ControlState + [csAlignmentNeeded]
      else
      begin
        DisableAlign;
        try
          Rect := GetClientRect;
          HandleAlignControls(AControl, Rect);
        finally
          ControlState := ControlState - [csAlignmentNeeded];
          EnableAlign;
        end;
      end;
    end;
    {---------------------------------------------------------------------------}
    type
      TInjectRec = packed record
        Jump: Byte;
        Offset: Integer;
      end;
      PWin9xDebugThunk = ^TWin9xDebugThunk;
      TWin9xDebugThunk = packed record
        PUSH: Byte;
        Addr: Pointer;
        JMP: Byte;
        Offset: Integer;
      end;
      PAbsoluteIndirectJmp = ^TAbsoluteIndirectJmp;
      TAbsoluteIndirectJmp = packed record
        OpCode: Word;   //$FF25(Jmp, FF /4)
        Addr: ^Pointer;
      end;
    function GetActualAddr(Proc: Pointer): Pointer;
      function IsWin9xDebugThunk(AAddr: Pointer): Boolean;
      begin
        Result := (AAddr <> nil) and
                  (PWin9xDebugThunk(AAddr).PUSH = $68) and
                  (PWin9xDebugThunk(AAddr).JMP = $E9);
      end;
    begin
      if Proc <> nil then
      begin
        if (Win32Platform <> VER_PLATFORM_WIN32_NT) and IsWin9xDebugThunk(Proc) then
          Proc := PWin9xDebugThunk(Proc).Addr;
        if (PAbsoluteIndirectJmp(Proc).OpCode = $25FF) then
          Result := PAbsoluteIndirectJmp(Proc).Addr^
        else
          Result := Proc;
      end
      else
        Result := nil;
    end;
    function CodeRedirect(Proc: Pointer; NewProc: Pointer): TInjectRec;
    var
      OldProtect: Cardinal;
    begin
      if Proc = nil then
        Exit;
      Proc := GetActualAddr(Proc);
      if VirtualProtect(Proc, SizeOf(TInjectRec), PAGE_EXECUTE_READWRITE, OldProtect) then
      begin
        Result := TInjectRec(Proc^);
        TInjectRec(Proc^).Jump := $E9;
        TInjectRec(Proc^).Offset := Integer(NewProc) - (Integer(Proc) + SizeOf(TInjectRec));
        VirtualProtect(Proc, SizeOf(TInjectRec), OldProtect, @OldProtect);
        FlushInstructionCache(GetCurrentProcess, Proc, SizeOf(TInjectRec));
      end;
    end;
    {---------------------------------------------------------------------------}
    function GetAlignControlProc: Pointer;
    var
      P: PByteArray;
      Offset: Integer;
      MemInfo: TMemoryBasicInformation;
    begin
      P := GetActualAddr(@TWinControl.Realign);
      if (P <> nil) and (VirtualQuery(P, MemInfo, SizeOf(MemInfo)) = SizeOf(MemInfo)) then
      begin
        if (MemInfo.AllocationProtect <> PAGE_NOACCESS) then
        begin
          Offset := 0;
          while Offset < $40 do
          begin
            if ((P[0] = $33) and (P[1] = $D2)) or   // xor edx,edx
               ((P[0] = $31) and (P[1] = $D2)) then // xor edx,edx
            begin
              if P[2] = $E8 then // call TWinControl.AlignControl
              begin
                Inc(PByte(P), 2);
                Result := PAnsiChar(P) + 5 + PInteger(PAnsiChar(P) + 1)^;
                Exit;
              end
              else if (P[2] = $8B) and (P[3] = $45) and (P[4] = $FC) and // mov eax,[ebp-$04]
                      (P[5] = $E8) then // call TWinControl.AlignControl
              begin
                Inc(PByte(P), 5);
                Result := PAnsiChar(P) + 5 + PInteger(PAnsiChar(P) + 1)^;
                Exit;
              end;
            end;
            Inc(PByte(P));
            Inc(Offset);
          end;
        end;
      end;
      Result := nil;
    end;
    function GetDynamicMethod(AClass: TClass; Index: Integer): Pointer;
    asm
      call System.@FindDynaClass
    end;
    var
      WinControl_AlignControlProc, WinControl_WMSize, WinControl_SetBounds: Pointer;
      BackupAlignControl, BackupWMSize, BackupSetBounds: TInjectRec;
    procedure Init;
    begin
      WinControl_AlignControlProc := GetAlignControlProc;
      WinControl_WMSize := GetDynamicMethod(TWinControl, WM_SIZE);
      WinControl_SetBounds := @TOpenWinControl.SetBounds;
      if (WinControl_AlignControlProc <> nil) and (WinControl_WMSize <> nil) then
      begin
        { Redirect the original function to the bug fixed version }
        BackupAlignControl := CodeRedirect(WinControl_AlignControlProc, @TFixWinControl.AlignControl);
        BackupWMSize := CodeRedirect(WinControl_WMSize, @TFixWinControl.WMSize);
        {$IFDEF OPTIMIZED_RESIZE_REDRAW}
        BackupSetBounds := CodeRedirect(WinControl_SetBounds, @TFixWinControl.SetBounds);
        {$ENDIF OPTIMIZED_RESIZE_REDRAW}
      end;
    end;
    procedure Fini;
    var
      n: DWORD;
    begin
      { Restore the original function }
      if BackupAlignControl.Jump <> 0 then
        WriteProcessMemory(GetCurrentProcess, GetActualAddr(WinControl_AlignControlProc),
                           @BackupAlignControl, SizeOf(BackupAlignControl), n);
      if BackupWMSize.Jump <> 0 then
        WriteProcessMemory(GetCurrentProcess, GetActualAddr(WinControl_WMSize),
                           @BackupWMSize, SizeOf(BackupWMSize), n);
      if BackupSetBounds.Jump <> 0 then
        WriteProcessMemory(GetCurrentProcess, GetActualAddr(WinControl_SetBounds),
                           @BackupSetBounds, SizeOf(BackupSetBounds), n);
    end;
    initialization
      Init;
    finalization
      Fini;
    end.

  2. #2
    Expert éminent sénior
    Avatar de Paul TOTH
    Homme Profil pro
    Freelance
    Inscrit en
    Novembre 2002
    Messages
    8 964
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 55
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Freelance
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2002
    Messages : 8 964
    Points : 28 457
    Points
    28 457
    Par défaut
    ah ok, je n'ai jamais constaté le pb :

    his is caused by having to many nested controls/windows. The stack size of 64bit Windows is smaller than on 32bit. This gets even smaller if there are global WH_CALLWNDPROC hooks. The WM_SIZE message event handling gets a stack overflow which the Windows kernel eats. See here and a fix here. Also see here for the same problem.
    http://stackoverflow.com/questions/7...-64-bit-window

  3. #3
    Membre expérimenté

    Homme Profil pro
    Inscrit en
    Mars 2004
    Messages
    897
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Marne (Champagne Ardenne)

    Informations professionnelles :
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2004
    Messages : 897
    Points : 1 561
    Points
    1 561
    Par défaut
    Paul, je t'ai mis en fichier joint deux vignettes illustrant ce problème de redimensionnement. [1] [2]

    Ce problème est lié au rafraîchissement des composants de type "container" si tu as de nombreux composants embarqués comme "des poupées gigognes".
    A priori, Windows 64 limite les appels récursifs (lors du rafraîchissement) à un niveau plus bas que sa version 32 bits ce qui produit ce petit désagrément.

  4. #4
    Expert éminent sénior
    Avatar de Paul TOTH
    Homme Profil pro
    Freelance
    Inscrit en
    Novembre 2002
    Messages
    8 964
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 55
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Freelance
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2002
    Messages : 8 964
    Points : 28 457
    Points
    28 457
    Par défaut
    Oui j'ai bien vu le problème, c'est bien pour cela que je ne l'ai jamais rencontré ^^

    sur ce type d'affichage je préfère de loin dessiner la grille plutôt qui de trimbaler des centaines de composants qui alourdissent le tout...et font souffrir W64

  5. #5
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 634
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 634
    Points : 25 352
    Points
    25 352
    Par défaut
    En même temps, ControlResizeBugFix est destiné pour quelle version ?
    D4 à D2006 ?
    En D2007, il a eu des corrections pour Vista
    En XE2, avec la gestion des thèmes, il y a eu d'autres corrections sur le Draw

  6. #6
    Membre expérimenté

    Homme Profil pro
    Inscrit en
    Mars 2004
    Messages
    897
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Marne (Champagne Ardenne)

    Informations professionnelles :
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2004
    Messages : 897
    Points : 1 561
    Points
    1 561
    Par défaut
    Arf, j'aurais du choisir un autre exemple car ce n'est pas la grille qui pose problème ici.
    En fait, c'est la structure du framework que nous avons développé pour nous permettre de se concentrer uniquement sur l'aspect métier et de ne pas perdre de temps sur l'aspect présentation.
    Une fenêtre hérite d'une fiche ancêtre qui embarque une frame. Par ailleurs, l'ancêtre embarque un pagecontrol et la fenêtre héritée dispose sur cet exemple d'un autre page control (dont tu peux voir les onglets).
    Ce sont toutes ces couches qui posent le problème et non la cxGrid (devExpress) que tu vois sur la vignette.

    Effectivement, Shai c'est développé sur Delphi 2005, le Framework et l'applicatif ont été développé à partir de l'année 2006.
    Nous ne l'avons pas encore migré vers une version plus récente de Delphi, c'est un gros boulot (Erp métier dans le domaine de l'industrie pharmaceutique).
    C'est à l'étude mais nous ne pouvons pas laisser nos clients avec ce bug

  7. #7
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 634
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 634
    Points : 25 352
    Points
    25 352
    Par défaut
    Citation Envoyé par Pascal Jankowski Voir le message
    Une fenêtre hérite d'une fiche ancêtre qui embarque une frame. Par ailleurs, l'ancêtre embarque un pagecontrol et la fenêtre héritée dispose sur cet exemple d'un autre page control (dont tu peux voir les onglets).
    Ah oui, je vois très bien, mon prédecesseurs a tenté de faire quelque chose de générique, vu tes images, je pensais qu'il s'était raté, en fait non, il s'est totalement raté
    il a pondu une horreur instable, tu touches la Frame mais la fenêtre elle ne bouge pas forcément parce que lors du passage de XP à Seven, l'IDE a bouger d'un Pixel, qui a bougé les Align ...

    souvent les frames font trop de chose, pas forcément c'est qui sont utiles ou alors ne propose les méthodes qui le serait, des frames qui ne sont pas pensées comme des classes à part entière comme des sortes de composants sans package qui dans leur code fonctionne différement selon la Form qui les possèdent

    Et l'héritage de fenêtre avec DFM, c'est pareil, on se retrouve dans les fenêtres avec des éléments inutiles que l'on masque ou dont on détourne l'utilisation !

    Je n'ai pas encore vu une exploitation élégante de tout cela !
    Un jour j'aurais peut-être cette chance !


    Citation Envoyé par Pascal Jankowski Voir le message
    Arf, j'aurais du choisir un autre exemple car ce n'est pas la grille qui pose problème ici.
    Ce sont toutes ces couches qui posent le problème et non la cxGrid (devExpress) que tu vois sur la vignette.

    Je n'ai même pas regardé tes images, je parlais de la VCL en général, en 2007 et XE2, il y a eu des évolutions pour gérer les nouveaux OS dont l'ordre de message type WM_PAINT, WM_NCPAINT, WM_DRAWITEM, ... ont changé et foutu un peu le bazard !

Discussions similaires

  1. Problème de gestion des fenêtres
    Par oligig dans le forum Windows 7
    Réponses: 6
    Dernier message: 23/02/2010, 13h23
  2. WINDOWS 64 Bit et le monitoring des jobs !
    Par wahab2052 dans le forum Installation, migration et administration
    Réponses: 8
    Dernier message: 29/12/2009, 16h31
  3. [WD14] Redimensionnement des fenêtres.
    Par AUZUR dans le forum WinDev
    Réponses: 23
    Dernier message: 18/09/2009, 11h31
  4. Réponses: 10
    Dernier message: 19/09/2006, 10h44
  5. Réponses: 3
    Dernier message: 05/07/2006, 23h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo