![]() |
TaskDialog XML problems |
Post Reply
|
| Author | |
scottp
Groupie
Joined: 16 October 2006 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
Topic: TaskDialog XML problemsPosted: 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:
Scott |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
scottp
Groupie
Joined: 16 October 2006 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
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> |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
scottp
Groupie
Joined: 16 October 2006 Status: Offline Points: 59 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |