Bad Skinning of Advanced Task Dialog in V7

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35035
    BytePlayer
    Participant

    I am using Alpha Skins 7.60 and when I try and use the Win Vista/7 TaskDialogIndirect procedure, the result is rather messed up. Here's basically the code and the result. I'm using a modified “Cold” skin…

    Code:
    ComCtlVersion := GetFileVersion('COMCTL32.DLL');
    ComCtlVersion := (ComCtlVersion shr 16) and $FF;

    if (verinfo.dwMajorVersion >= 6) and (ComCtlVersion > 5) then
    begin
    DLLHandle := LoadLibrary('comctl32.dll');
    if DLLHandle >= 32 then
    begin
    @TaskDialogIndirectProc := GetProcAddress(DLLHandle,'TaskDialogIndirect');

    if Assigned(TaskDialogIndirectProc) then
    begin
    FillChar(TaskDialogConfig, sizeof(TTASKDIALOGCONFIG),0);
    TaskDialogConfig.cbSize := sizeof(TTASKDIALOGCONFIG);

    TaskDialogConfig.hwndParent := Application.Handle

    SetLength(TBA, 3);
    SetLength(TBWS, 3);

    StringToWideChar(ConvertNL('Save File'), TBWS[0], sizeof(TBWS[0]));
    TBA[0].pszButtonText := TBWS[0];
    TBA[0].nButtonID := 100;

    StringToWideChar(ConvertNL('Save File As…'), TBWS[1], sizeof(TBWS[1]));
    TBA[1].pszButtonText := TBWS[1];
    TBA[1].nButtonID := 101;

    StringToWideChar(ConvertNL('Exit Without Savingn(will lose ALL changes)'), TBWS[2], sizeof(TBWS[2]));
    TBA[2].pszButtonText := TBWS[2];
    TBA[2].nButtonID := 101;

    TaskDialogConfig.cButtons := 3;
    TaskDialogConfig.pbuttons := @TBA[0];

    TaskDialogConfig.pszWindowTitle := PWideChar(WideString(ConvertNL('Attention')));
    TaskDialogConfig.pszMainInstruction := PWideChar(WideString(ConvertNL('You are about to exit this file…')));
    TaskDialogConfig.pszContent := PWideChar(WideString(ConvertNL('Save the current project?')));
    TaskDialogConfig.dwCommonButtons := TaskDialogConfig.dwCommonButtons or TDCBF_CANCEL_BUTTON;

    TaskDialogConfig.dwFlags := TDF_USE_COMMAND_LINKS or TDF_CALLBACK_TIMER or TDF_ALLOW_DIALOG_CANCELLATION OR MB_TOPMOST OR MB_SETFOREGROUND;
    TaskDialogConfig.hInstance := 0;
    TaskDialogConfig.hMainIcon := TD_ICON_QUESTION;

    TaskDialogConfig.pfCallBack := @TaskDialogCallbackProc;
    TaskDialogConfig.pData := Self;

    TaskDialogConfig.nDefaultButton := DefaultButton;
    TaskDialogConfig.nDefaultRadioButton := DefaultRadioButton;

    TaskDialogIndirectProc(@TaskDialogConfig, @res, @radiores, @verify);
    end;

    [attachment=5498:simple task dialog.JPG]

    [attachment=5499:multiOption Task Dialog.JPG]

    #47715
    roshfe
    Participant

    I am starting to receive similar reports from some of my customers about random “white areas” in various application forms as well ever since upgrading to 7.60

    'BytePlayer' wrote:

    I am using Alpha Skins 7.60 and when I try and use the Win Vista/7 TaskDialogIndirect procedure, the result is rather messed up. Here's basically the code and the result. I'm using a modified “Cold” skin…

    [attachment=5498:simple task dialog.JPG]

    [attachment=5499:multiOption Task Dialog.JPG]

    #47721
    BytePlayer
    Participant

    Sorry to harass the AlphaControls folks but this is a major show stopper for me. If this can't be fixed quickly, I need to know how to exclude this control from the skinning.

    #47741
    Support
    Keymaster

    Hello

    I'm working with this problem now, but I can't make a demo. You gave me a part of code only, seems.

    Can you help me with an issue reproducing?

    #47744
    BytePlayer
    Participant

    Here is a full project, and I used the built-in TaskDialog Control to make it even simpler.

    As the button in the form says, when you click it, it will FIRST show you the TaskDialog without AlphaSkins displaying so you can see how it should be displaying, then when you click any button to close the TaskDialog, it will automatically reopen the TaskDialog now WITH AlphaSkins, which should clearly show the problem.

    #47747
    Support
    Keymaster

    Thank you, I will research it now.

    You can disable a skinning of standard dialogs quickly in the sSkinManager1.SkinningRulez.srStdDialogs property.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.