Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C# MAKEWPARAM

798 views
Skip to first unread message

Dan Malloy

unread,
Jun 25, 2003, 4:06:47 PM6/25/03
to
I'm trying to get the following functionality into C#:

SendMessage(hwnd, WM_COMMAND,
MAKEWPARAM( GetDlgCtrlID(hwnd), CBN_SELCHANGE ),
(LPARAM) hwndCombo);

I have SendMessage and GetDlgCtrlID working fine. What
can I do in C# to send the equivalent of WPARAM? If there
is another way to send CBN_SELCHANGE from C#, that would
be fine. CB_SETCURSEL changes the combobox selection, but
doesn't send the notification.

Thanks...Dan

Mattias Sjögren

unread,
Jun 26, 2003, 4:38:48 AM6/26/03
to
Dan,

int MAKEWPARAM(int l, int h)
{
return (l & 0xFFFF) | (h << 16);
}

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

0 new messages