Hi,
actually I'm migrating a V8i-MDL to Connect and had a problem, that my old Dialog Toolbox has an empty title.
I installed
ms10100023en_updt10.exe and
mssdk10100032en.msi
I was wondering, why this little flaw also is shown in the DialogBoxDemo Example delivered with the SDK?
Now I found the solution, that in my code, as well in the provided example, the title is defined in the wrong place:
It was defined in the DialogBoxRsc structure instead of the DItem_ToolBoxRsc structure, contained by the DialogBox.
This corrected code (part of dlogdemo.r) works for me now:
/*----------------------------------------------------------------------+
| |
| Tool Palette Dialog Box |
| |
+----------------------------------------------------------------------*/
DialogBoxRsc DIALOGID_DialogDemoPalette =
{
/* Recommended attributes for tool palette frame dialog boxes */
#if defined (MSVERSION) && (MSVERSION >= 0x550)
DIALOGATTR_TOOLBOXCOMMON,
#else
DIALOGATTR_DEFAULT | DIALOGATTR_NORIGHTICONS | DIALOGATTR_AUTOOPEN,
#endif
XC, YC, NOHELP, LHELPCMD, NOHOOK, NOPARENTID, "" /* old: TXT_Frame */,
{
#if defined (MSVERSION) && (MSVERSION >= 0x550)
{{0, 0, 0, 0}, ToolBox, ICONCMDFRAMEID_DialogDemo, ON, 0, "", ""},
#else
{{0, 0, 0, 0}, IconCmdFrame, ICONCMDFRAMEID_DialogDemo, ON, 0, "", ""},
#endif
}
};
/*----------------------------------------------------------------------+
| |
| Tool Palette Icon Command Frame |
| |
+----------------------------------------------------------------------*/
#if defined (MSVERSION) && (MSVERSION >= 0x550)
DItem_ToolBoxRsc ICONCMDFRAMEID_DialogDemo =
{
NOHELP, LHELPCMD, NOHOOK, NOARG, 0, TXT_Frame /* old: "" */,
{
{{ 0, 0, 0, 0}, IconCmd, ICONCMDID_DialogDemo1, ON, 0, "", "owner=\"DLOGDEMO\""},
{{ 0, 0, 0, 0}, ToolBox, TOOLBOXID_DialogDemo1, ON, 0, "", "owner=\"DLOGDEMO\""},
{{ 0, 0, 0, 0}, IconCmd, ICONCMDID_DialogDemo2, ON, 0, "", "owner=\"DLOGDEMO\""},
{{ 0, 0, 0, 0}, ToolBox, TOOLBOXID_DialogDemo2, ON, 0, "", "owner=\"DLOGDEMO\""},
{{ 0, 0, 0, 0}, IconCmd, ICONCMDID_DialogDemo3, ON, 0, "", "owner=\"DLOGDEMO\""},
{{ 0, 0, 0, 0}, IconCmd, ICONCMDID_DialogDemo4, ON, 0, "", "owner=\"DLOGDEMO\""},
}
};
#else
DItem_IconCmdFrameRsc ICONCMDFRAMEID_DialogDemo =
{
2, 3, NOHELP, LHELPCMD, "",
{
{IconCmd, ICONCMDID_DialogDemo1},
{IconCmdPalette, ICONCMDPALETTEID_DialogDemo1},
{IconCmd, ICONCMDID_DialogDemo2},
{IconCmdPalette, ICONCMDPALETTEID_DialogDemo2},
{IconCmd, ICONCMDID_DialogDemo3},
{IconCmd, ICONCMDID_DialogDemo4},
}
};
#endif
![]()
![]()
I hope this information is helpful for the community an Bentley too.
Regards,
Tom