In my STRINGTABLE I have the following:
In my code where I use TaskDialogIndirect I can hover over AFX_IDS_APP_TITLE:
I understand this much ... if the resource can't be found it defaults to the executable name. At the moment that is what I am getting:
Yet, when I use the CTaskDialog constructor I get the correct caption:
For TaskDialogIndirect I am using:
sConfig.hInstance = AfxGetInstanceHandle();
I have also tried:
sConfig.hInstance = AfxGetResourceHandle();
Why is this happening?




When you look at the definition of
HINSTANCEin theTASKDIALOGCONFIGit says:The hinst was when it stated pszWindowTitle! Whilst I was loading the
AFX_IDS_APP_TITLEinto aCStringI was not assigning it in the structure. I needed:And now it is fine: