can i send CBN_CLOSEUP message to COMBOBOX?

how to write code?
[18 byte] By [aneird] at [2007-11-20 11:39:21]
# 1 Re: can i send CBN_CLOSEUP message to COMBOBOX?
CBN_CLOSEUP is actually a notification sent by system.
your application must send CB_SHOWDROPDOWN message in order to show or hide dropdown list of a combobox.

//hide / close
SendMessge(HwndCombo, CB_SHOWDROPDOWN, (WPARAM)false, 0);

//show up
SendMessge(HwndCombo, CB_SHOWDROPDOWN, (WPARAM)true, 0);

regards
Ali Imran at 2007-11-9 13:32:56 >
# 2 Re: can i send CBN_CLOSEUP message to COMBOBOX?
oh,
i have a problem,would you help me?
i create a dialog that includes a COMBOBOX ,a BUTTON, the COMBOBOX has no member,when i click the COMBOBOX's down-arrow,then i want to click the BUTTON,but it can not click,because the focus is in COMBOBOX(the COMBOBOX show its members,although it is no members),so how can i resolve the problem,
aneird at 2007-11-9 13:33:55 >
# 3 Re: can i send CBN_CLOSEUP message to COMBOBOX?
the COMBOBOX show its members,although it is no members

I could not follow what you mean.
Ali Imran at 2007-11-9 13:34:52 >
# 4 Re: can i send CBN_CLOSEUP message to COMBOBOX?
case WM_COMMAND:
switch ( LOWORD( wParam )) {
case IDC_USER:
{
switch(HIWORD(wParam) )
{
case CBN_DROPDOWN:
{
HWND hwndComboBox;
int n=0;
hwndComboBox = GetDlgItem( hwndDlg, IDC_USER );
n = SendMessage( hwndComboBox, CB_GETCOUNT, 0, 0 );
/*if (n == 0)*/
{
int t=(int)LOWORD(wParam);
HWND h=(HWND)(lParam);
SendMessage( hwndComboBox, CB_SHOWDROPDOWN, FALSE, 0 );
}
break;
}

SendMessage( hwndComboBox, CB_SHOWDROPDOWN, FALSE, 0 ); it seems invalidly,it is not hide.
aneird at 2007-11-9 13:35:58 >
# 5 Re: can i send CBN_CLOSEUP message to COMBOBOX?
Why dont you disable until it gets populated ?

pleas post a screenshot
Ali Imran at 2007-11-9 13:36:56 >
# 6 Re: can i send CBN_CLOSEUP message to COMBOBOX?
i have resolved this problem,and handled WM_LBUTTONDOWN message in WindowProc.but also thank you.
aneird at 2007-11-9 13:37:55 >