I used mdlLevelList_getLevelNamesWithAttributes to get the level listmodel,and passed it to my Combobox.
The problem is when i use mdlDialog_comboBoxSetPopupState to make my ComboBox dropdown listbox stay opening,I found it'll cause a fault.
I chick the second col to display my level like the system do. .
Here I use mdlDialog_comboBoxSetPopupState to make the dorpdown stay opening in hook with the message DITEM_MESSAGE_STATECHANGED.
Then I chick the system level combobox.
It actually shows my ComboBox dropdown.
I tracked the hook message,and found that there is no focusout in Toolbox.This maybe why the fault caused.
Here is my Rscs:
DialogBoxRsc DIALOGID_Operate =
{
DIALOGATTR_DEFAULT | DIALOGATTR_GROWABLE | DIALOGATTR_DOCKABLE,
0,0,
NOHELP,MHELP,
NOHOOK,
NOPARENTID,
"",
{
{{0,0,0,0},ToolBox,TOOLBOXID_PC,ON,0,"",""},
}
};
DItem_ToolBoxRsc TOOLBOXID_PC =
{
NOHELP, MHELPTOPIC, NOHOOK, NOARG, 0, "",
{
{{10,0.5*YC,12*XC,1.5*YC}, ComboBox, COMBOBOXID_DataLevel, ON, 0, "", ""},
}
};
//
DItem_ComboBoxRsc COMBOBOXID_DataLevel =
{
NOCMD, LCMD, NOSYNONYM, NOHELP, MHELP,
HOOKITEMID_DataLevel_ComboBox, NOARG,
128, "", "", "", "", NOMASK,
0, 12, 0, 28*XC, 0,
COMBOATTR_DRAWPREFIXICON | COMBOATTR_READONLY,
"",
"",
{
{12*XC, 128, ALIGN_LEFT, ""},
{4*XC, 128, ALIGN_LEFT, ""},
{4*XC, 128, ALIGN_LEFT, ""},
{4*XC, 128, ALIGN_LEFT, ""},
}
};
If someone have done something like this befor?