How to hook CBN_DROPDOWN and CBN_CLOSEUP ?
-
Hello, I've created a new class MyComboBox, derieved from CComboBox. I need to hook CBN_DROPDOWN and CBN_CLOSEUP messages and I do it in this way:
LRESULT MyComboBox::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case CBN_DROPDOWN:
fn1();
break;
case CBN_CLOSEUP:
fn2();
break;
}return CComboBox::WindowProc(message, wParam, lParam);
}
But that doesn't work. What can cause the problem?
-
Hello, I've created a new class MyComboBox, derieved from CComboBox. I need to hook CBN_DROPDOWN and CBN_CLOSEUP messages and I do it in this way:
LRESULT MyComboBox::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case CBN_DROPDOWN:
fn1();
break;
case CBN_CLOSEUP:
fn2();
break;
}return CComboBox::WindowProc(message, wParam, lParam);
}
But that doesn't work. What can cause the problem?
-
Hello, I've created a new class MyComboBox, derieved from CComboBox. I need to hook CBN_DROPDOWN and CBN_CLOSEUP messages and I do it in this way:
LRESULT MyComboBox::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case CBN_DROPDOWN:
fn1();
break;
case CBN_CLOSEUP:
fn2();
break;
}return CComboBox::WindowProc(message, wParam, lParam);
}
But that doesn't work. What can cause the problem?
Why are you not implementating handlers for
CBN_DROPDOWN
andCBN_CLOSEUP
? What version of Visual Studio are you using?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Why are you not implementating handlers for
CBN_DROPDOWN
andCBN_CLOSEUP
? What version of Visual Studio are you using?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
-
LRESULT MyComboBox::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch((int)LOWORD(wParam))
{
case CBN_DROPDOWN:
fn1();
break;
}return CComboBox::WindowProc(message, wParam, lParam);
}
I tried this already, but the problem still exists :(