Re: CComboBox behaviour
- From: "Yannick ROUSSEAU" <ryannick@xxxxxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 17:56:01 +0200
I think you are actually right. I thought the drop list didn't gain capture
again because there were no WM_CAPTURECHANGED messages sent that would show
that. It seems that it misled me.
I finally wrote my left button handler this way :
void MyClass::OnLButtonDown(UINT nFlags, CPoint point)
{
// this part deals with translating NC message
CPoint screenPoint = point;
ClientToScreen(&screenPoint);
LRESULT res = SendMessage(WM_NCHITTEST, NULL, MAKELONG(screenPoint.x,
screenPoint.y));
if (res != 0)
{
ReleaseCapture();
if (!SendMessage(WM_NCLBUTTONDOWN, res, MAKELONG(screenPoint.x,
screenPoint.y)))
SetCapture();
return;
}
// my own custom treatment
...
ParentClass::OnLButtonDown(nFlags, point);
}
And I added a "if (GetCapture() != this) SetCapture();" in the VSCROLL
handler, and it seems to work correctly so far, and also seems to dispatch
messages the same way ComboLBox does.
I hope I didn't miss some issue, and that this can be helpful to someone
else.
Thank you for your help.
"Jeff Partch [MVP]" <jeffp@xxxxxxxx> a écrit dans le message de news:
%23NleabfZFHA.1368@xxxxxxxxxxxxxxxxxxxxxxx
> "Yannick ROUSSEAU" <ryannick@xxxxxxxxxxxxxx> wrote in message
> news:429c66cf$0$169$a3f2974a@xxxxxxxxxxxxxxxxxxxxxxx
>> The message tracking report doesn't suggest that. Plus I don't see how
>> one
>> would detect being just before message processing.
>
> Sorry for wasting your time, Yannick.
> --
> Jeff Partch [VC++ MVP]
>
>
.
- Prev by Date: Re: ComboBox DropDown Size: Design vs Run Time?
- Next by Date: Re: ComboBox DropDown Size: Design vs Run Time?
- Previous by thread: disabling all menu and its sub menus
- Next by thread: Edit Box
- Index(es):