I'm getting an error 1421 "Control ID Not Found" when adding a TAB Control to my dialog. If I delete the TAB Control from my dialog it works fine. All the IDC's seems to be fine.
I've tried to use SPY++ but the TAB Control never shows up there, all the other controls are fine.
Are you adding it through the resource editor? If so, I'd try deleting the corresponding .res and .aps files. Then recompile the resource files. These files are rebuilt each time. If these files get out of sync, they may casue such a problem.
I did get most of this code from a DX9 Sample Framework, so I know it works. The difference between the Sample Framework and my code is that wrapped it inside a DLL.
The wierd thing is that the Dialog seems to work fine without the TAB Control, but when I add the TAB Control it errors.
Is your dialog box template stored in the resource file? Also, what is the content of the pstrTemplate?
You may need to use MAKEINTRESOURCE to create your dialog box.
According to MSDN (emphasis added)
lpTemplate
[in] Specifies the dialog box template. This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier. You can use the MAKEINTRESOURCE macro to create this value.
Hope that helps.
Be sure to rate those who help!
-------------------------------------------------------------
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
I've attached a little sample app that illustrates my problem.
Try compiling it and then run it. The app will not display a dialog, but if you edit the dialog and delete the TAB Control leaving all the other controls there and then compile and run it, the dialog pops up fine.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.