Write your question here.
I have this function which is called when Property Sheet Page is initiated:
1 2 3 4 5 6 7
|
BOOL Handle_WM_INITDIALOG2(HWND dialog)
{
LCombo_Fill(dialog, IDC_T_UCLASS1, esdata.unitgroups.head(), L"All");
SendMessageW(GetDlgItem(dialog, IDC_T_UCLASS1), LB_ADDSTRING, 0, (LPARAM)"Testing string");
// UnitList_FillGroup(GetDlgItem(dialog, IDC_T_UCLASS1), NULL);
return TRUE;
}
|
The control is selection box and I wanted to add item to it. The first command LCombo_FIll adds one item ("All") but this function is not to add list to control... The second command does not add anything, why?
Edit: Yet I tried:
SendMessageW(GetDlgItem(dialog, IDC_T_UCLASS1), CB_ADDSTRING, 0, (LPARAM)"Testing string");
and also no success.
CB_ADDSTRING is used in the first function.
Another test:
1 2
|
LRESULT index = Combo_AddStringW(GetDlgItem(dialog, IDC_T_UCLASS1), L"TEST");
Combo_SetItemData(GetDlgItem(dialog, IDC_T_UCLASS1), index, NULL);
|
No success...
Yet the first command:
LCombo_Fill(dialog, IDC_T_UCLASS1, esdata.unitgroups.head(), L"All");
Should add not just "All" but many string, because when I debug it, it goes through loop like it were adding strings:
1 2 3 4 5 6 7 8 9 10
|
for (; list; list = list->next())
{
LRESULT index = Combo_AddW(combobox, list->name(), list);
if (list == select)
{
SendMessage(combobox, CB_SETCURSEL, index, 0);
ret = index;
}
}
|
but in the result nothing is displayed in the control...
Edit:
I solved the problem. It was too small height of combo box what restricted me to see complete list.