|
-
Sep 17th, 2002, 05:26 AM
#1
Thread Starter
Frenzied Member
No message for it?
i want to subclass NEtmeeting Chat window so that whenever new messages comes in.. the window starts flashing...
I surprised when i saw that there was no message posted when the contents of an Edit Window (Textbox etc) changed.. when i replaced the whole text WM_PAINT got posted...When I typed in the text WM_Char, WM_KEYXXX were posted...
If there is no message associated with the change of contents how come the Textbox implement a Change Event???
-
Sep 17th, 2002, 06:16 AM
#2
Thread Starter
Frenzied Member
-
Sep 17th, 2002, 06:26 AM
#3
Not all events are raised as a respons on a window message.
eg. If you would create an ActiveX control, you could raise a TextChanged event in the Property let procedure of the Text property. This way the event would be raised when the text property was changed in code as well.
Because windows does not need to send a message to the window when the text is changed programmatically (the window already knows it has changed, it did it itself), you can't intercept a windowmessage.
-
Sep 17th, 2002, 06:45 AM
#4
Thread Starter
Frenzied Member
Originally posted by Frans C
Not all events are raised as a respons on a window message.
eg. If you would create an ActiveX control, you could raise a TextChanged event in the Property let procedure of the Text property. This way the event would be raised when the text property was changed in code as well.
Ah!!! Agree! But maybe windows create a custom message for every event we create.. but your point is valid..
Because windows does not need to send a message to the window when the text is changed programmatically (the window already knows it has changed, it did it itself), you can't intercept a windowmessage.
DisAgree!! There should be some message so that the change in text could be known by other applications... If there isn't any message for that what am i supposed to do? Call the Police?
-
Sep 17th, 2002, 07:00 AM
#5
Events and window messages are two different things. Many events are raised as a reaction on a window message. This doesn't work the other way round (at least not automatically, you could send a window message when you raise an event though).
A message is send with a purpose. The sender likes to inform the recipient on something. There is no use in sending a message like:
Hey window, do you know you changed your own text.
With subclassing or a hook you can intercept these messages, or spy on them. Usually the window is not designed with this purpose. The messages are not send to inform a spy.
If you lack functionality, ask the developer to change it for you (I don't think the police will be very helpfull. At least not to you, maybe to the original developer, because you try to benefit from his code without paying for it).
Last edited by Frans C; Sep 17th, 2002 at 07:04 AM.
-
Sep 18th, 2002, 03:49 AM
#6
Thread Starter
Frenzied Member
It looks awkward to me that blinking of the cursor posts a message and change in contents doesn't. Well whatever.. i am in need to do something when the contents of an Edit windows get changed. And this Edit Window is outside of my application. How can i do this? if I intercept the WM_PAINT event it occurs whenever the window is painted.. any clue?
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
|