Bug Report B30148
Visible to All Users

Skinning of InputBox and InputQuery is wrong

created 17 years ago

I thought one of the recent DX releases skinned the various Delphi popup forms. I'm not certain how you guys went about doing that, but dialogs.pas InputBox and InputQuery are not yet skinned. The label is not transparent.
cheers,
-randall

Show previous comments (1)
Serge (DevExpress Support) 17 years ago

    Hi Randall,
    Unfortunately, we cannot skin the InputBox and InputQuery forms due to a couple of reasons:

    1. By default, the form SkinController doesn't change the appearance of the standard TCustomLabel descendants.
    2. We change this rule only for the standard message dialogs created via the ShowMessage and MessageDlg procedures, because it's easy to identify such windows by their form class name (TMessageForm):
    Delphi
    dxSkinsForm.pas class function TdxSkinWinController.IsMessageDlgWindow(AHandle: HWND): Boolean; begin Result := AnsiSameText(GetWindowClass(AHandle), 'TMessageForm'); end;

    InputBox and InputQuery create TForm instances.
    Thanks,
    Serge

      Well, that leaves me with two choices: either write our own InputXXX routines, or subclass TdxSkinFormController. Considering that there are other Delphi dlgs that also have the same problem, such as the clientdataset reconsile form, or any of the default BDE error forms - it seems like our best approach then is to subclass something form DevExpress so we can expressly control it. In short, we'd always want to call InitializeMessageForm. And that would be simple enough by overriding the TdxSkinFormController consturctor
      I am not familiar with the skin classes at all. Can you confirm that if I subclass TdxSkinFormController I can accomplish our task? If so, what virtual method needs to be overriden to use our subclass?
      cheers,
      -randall

      Serge (DevExpress Support) 17 years ago

        Randall,
        Basically, you can create a TdxSkinFormController descendant and override its IsMessageDlgWindow method:

        Delphi
        class function TMydxSkinFormController.IsMessageDlgWindow(AHandle: HWND): Boolean; begin Result := True; end;

        However, it's necessary to:
         1) declare the IsMessageDlgWindow method as virtual;
         2) modify the dxSkinsWndProcHook hook to return the class of your custom TdxSkinWinControllerClass descendant:

        Delphi
        function dxSkinsWndProcHook(Code: Integer; wParam: WParam; lParam: LParam): LRESULT; stdcall; ... function GetSkinClassForWindow(AWnd: HWND): TdxSkinWinControllerClass; ... if AControl is TCustomForm then Result := TdxSkinFormController; ...

        So, I've created two new suggestions on your behalf, and our developers will implement them in the upcoming maintenance update:
         1) S19316 ("TdxSkinWinController - Make some methods virtual, to support custom Skin Controllers")
         2) S19317 ("Define the GetSkinClassForWindow function via a global function constant")
        Again, we thank you for drawing our attention to this issue. Your input helps us make our components smarter.
        Thanks,
        Serge

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.