Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - HOWTO: CXTPTaskDialog buttons using XAML markup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HOWTO: CXTPTaskDialog buttons using XAML markup

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: HOWTO: CXTPTaskDialog buttons using XAML markup
    Posted: 17 December 2008 at 10:15am
Hi;
I try to use XAML markup on CXTPTaskDialog buttons but it fails.
Here's my code
    
        CXTPTaskDialog dlg;
        dlg.EnableCommandLinks();
        dlg.EnableMarkup();
        dlg.EnableCancellation();
        dlg.SetWindowTitle("Changed Script Code");
        dlg.SetMainInstruction("<TextBlock Padding='3, 3, 3, 3' TextWrapping='Wrap' Foreground='#000000' FontWeight='Normal' FontSize='12' FontQuality='ClearType'>"
                                      "<Bold>Wollen Sie die vorgenommenen Änderungen speichern?</Bold>"
                                      "<LineBreak/>"
                                      "<LineBreak/>"
                                      "Sämtliche  Änderungen gehen verloren, wenn sie jetzt nicht gespeichert werden."
                                      "</TextBlock>");
       
        dlg.SetMainIcon(::LoadIcon(0, IDI_QUESTION));
        dlg.AddButton("<TextBlock Padding='3, 3, 3, 3' FontSize='12' FontQuality='ClearType'>Nicht speichern</TextBlock>", 30);
        dlg.AddButton("<TextBlock Padding='3, 3, 3, 3' FontSize='12' FontQuality='ClearType'>Abbrechen</TextBlock>", 32);
        dlg.AddButton("<TextBlock Padding='3, 3, 3, 3' FontSize='12' FontWeight='Bold' FontQuality='ClearType'>Speichern</TextBlock>", 31);
        dlg.SetCommonButtons(FALSE,FALSE, FALSE, FALSE, FALSE, FALSE);
        dlg.SetDefaultButton(31);
        if (dlg.DoModal()!=32) {
            ...
        }


Did I miss something, or isn't it implemented yet?
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2008 at 10:21am
Ok;
I've been too fast.
In the original code I set EnableCommandLinks() and it seems that this disables the markup feature of buttons...
Now the dialog looks a little bit different and I don't know how to switch it back to look as before but also use markup text for the buttons...

Is this a bug???

Any help is very welcome
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2008 at 6:38am
Hi,
Yes, Link buttons don't support markup. To swith it back just comment EnableCommandLinks line.
 
Checking if it can be extended for next release.
Thanks.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2008 at 8:51am
Hi Oleg;

Enabling markup for command links would be very fine...
Thanks in advance!
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
joep View Drop Down
Groupie
Groupie


Joined: 18 February 2004
Location: Netherlands
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote joep Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2014 at 11:45am
Hi, it seems markup in command links is still not possible. Is that correct and if so, will it be possible in a next release?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.