Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - TaskDialog XML problems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskDialog XML problems

 Post Reply Post Reply
Author
Message
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post Topic: TaskDialog XML problems
    Posted: 18 April 2007 at 1:26am
Hi
I like the new CXTPTaskDialog - but I have found a few problems.

Using the CreateFromResource for XML created by TDPad has a  these
problems:
  1. TDPad creates CommandLink with named button IDs <CommandLink ID="OK> - this does not work with CXTPTaskDialog
  2. Not specifying the Dialog Width creates the dialog with a different size when using ComCtl32.dll compared to fully emulated TaskDialog <Dialog Width="250" Name="Dialog000">
  3. Using *Error image does not work <MainInstruction Image="*Error">
  4. The Dialog property AllowCancel defaults to FALSE when using emulated TaskDialog and defaults to TRUE when using ComCtl32.dll - it should default to FALSE
hopefully we will get a few fixes in 11.1.1

Scott
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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 April 2007 at 9:27am
Hello,
 
1. Yes, you need to specify numbers - ID="100" or use <OK/> instead  <CommandLink ID="OK>
2. Thanks, will check
3. works for me, please try with our sample.
4. Thanks, checking
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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 April 2007 at 9:42am
Hi,
 
4. Actually also can't reproduce. Show code/xml you tried.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post Posted: 18 April 2007 at 9:28pm
Hi Oleg,

Here is the HTML XML resource I used (subtitute it for one in the sample resources)

3. This dialog does not parse correctly, I thought it was because I used *Error, but if I modify the WindowTitle, ExpandedInformation, or Explaination to make them shorter then it parses OK.  Editing this dialog to make it parse then correctly shows the Error icon.

4. using this dialog (edited to parse) on Vista in the sample and try toggling the "Use ComCtl32.dll (Vista Only)" option - the Cancel button will appear

  <Dialog Name="Dialog000">
    <WindowTitle>AAAAAAAAE License Security Key</WindowTitle>
    <MainInstruction Image="*Error">Error Initialising Security Key</MainInstruction>
    <Content>There has been a problem initialising the current Security Key type.</Content>
    <ExpandedInformation Footer="True">
      Unable to initialise local AAAA Security Key
      ErrorCode: 0 1001
    </ExpandedInformation>
    <Buttons Default="1">
      <CommandLink ID="1">
        <Text>Auto Search</Text>
        <Explanation>Allow AAAAAAAAE to search for a valid Security Key connected to your machine or network</Explanation>
      </CommandLink>
      <CommandLink ID="2">
        <Text>Edit Security Key options</Text>
        <Explanation>Edit the current Security Key options using the License Manager</Explanation>
      </CommandLink>
    </Buttons>
  </Dialog>




Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 19 April 2007 at 5:57am
Hi,
 
You  use ID="2" that is IDCANCEL.    For custom buttons better use ID from 10.
 
It's designed - if there is Cancel button in dialog, AllowCancel  parameter will be ignore.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2007 at 9:15am
Hi Oleg,

One more problem I have found. CXTPTaskDialog::CreateFromResource only loads the resources from AfxGetInstanceHandle, and not from AfxGetResourceHandle.

Could you make a change to allow checking both places for the resource:

BOOL CXTPTaskDialog::CreateFromResource(UINT nIDResource, LPCTSTR lpszDialog)
  {
  USES_CONVERSION;

  LPCTSTR lpszResourceName = MAKEINTRESOURCE(nIDResource);

  HINSTANCE hInst = AfxGetResourceHandle();
  HRSRC hRsrc = ::FindResource(hInst, lpszResourceName, RT_HTML);
  if (hRsrc == NULL)
    {
    hInst = AfxGetInstanceHandle();
    hRsrc = ::FindResource(hInst, lpszResourceName, RT_HTML);
    if (hRsrc == NULL)
      return FALSE;
    }
.....

And/or allow the resouce HINSTANCE handle to be passed in.

Thanks

Scott

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.