|
-
April 15th, 2008, 08:56 PM
#1
Windows Messaging in Common Controls
Hello Everybody,
These days I have been trying to look deep into Windows while I debug an application. I see that especially in Common Controls messaging (SendMessage / PostMessage) is used to complete a operation say GetItemData for Combo Box ends with sending a message CB_GETITEMDATA.
My question is why such an approach used? Is it not feasible to call the message handler directly? If not how do you reach the message handler in such a case?
One's mistake cannot be your excuse!
-
April 16th, 2008, 05:22 AM
#2
Re: Windows Messaging in Common Controls
I'm not perfectly sure if i'm getting the essense of your doubts, but everything in windows controls' operation invocation typically ends in sending a proper message. This is the way the Windows API does the things. And MFC (or any other OOP wrapper library) just obscures/incapsulates the actual low-level details.
Is it not feasible to call the message handler directly?
There is no way to obtain item data directly. This is the underlying control window who actually returns the information, and sending that message is the only way to instruct the control about doing that.
Best regards,
Igor
-
April 17th, 2008, 10:05 AM
#3
Re: Windows Messaging in Common Controls
Thanks again Igor, I see how now
One's mistake cannot be your excuse!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|