Drop down list of combo box is not showing item added to it by SendMessage()
This is Dialog box which contains combo box
BOOL CALLBACK AddRuleDlgProc (HWND hAddRuleDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
const char *ComboBoxItem[] = {"All","TCP","UDP","ICMP"};
case WM_INITDIALOG :
for(i=0;i<3;i++)
{ SendMessage((GetDlgItem(hAddRuleDlg,IDC_COMBO4)),CB_ADDSTRING,0,reinterpret_cast<LPARAM>((LPCSTR)ComboBoxItem[i]));
}
return TRUE ;
}
This is resource of combo box
COMBOBOX IDC_COMBO4,81,151,44,49,CBS_DROPDOWNLIST | CBS_OWNERDRAWVARIABLE | WS_VSCROLL | WS_TABSTOP
Please help me asap