Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2016, 09:33 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default EM_SETEVENTMASK Message

This is a little over my head I feel as I have never done anything like this.
Its because I do not understand C++ I gess.

EM_SETEVENTMASK on page: - https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

I have my TWinControl descendant is the parent with TRichEdit inside it (child object). And Delphi 7 Uses windows RichEdit32 or version 1.
I want to carry over my RichEdit scrollbars to my Parent TWinControl descendant.
I see this message used in ComCtrls.TRichEdit.CreateWnd for other uses.
The message uses the object's handle so do I use it in my Parent TWinControl descendant to activate the scrollbars in it or do I override
TRichEdit.CreateWnd;. Grab hold of TRichEdit.parent.handle and send the message.
What is the correct way to do this and why?
Reply With Quote
  #2  
Old 02-16-2016, 08:45 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default

If I understand correctly it should be something similar like this:
http://www.swissdelphicenter.ch/torr...de.php?id=1652

Instead of the ENM_LINK I think you need the ENM_SCROLL.
Reply With Quote
  #3  
Old 02-17-2016, 10:36 AM
lexd lexd is offline
Senior Member
 
Join Date: Feb 2015
Posts: 268
Default

Thats just not what I expected at all
I put on mental boundaries and you smashed them to pieces
may be I needed that.

I just have to give it a go and see what happens, as I have not used messages that much.
Reply With Quote
  #4  
Old 02-18-2016, 03:25 AM
Glenn1234 Glenn1234 is offline
Senior Member
 
Join Date: Aug 2009
Posts: 131
Default

Quote:
Originally Posted by lexd View Post
I just have to give it a go and see what happens, as I have not used messages that much.
FWIW, messages can simply best be thought of as a signal to an independent process or thread to do something - Windows literally entirely works this way. You send the message (or post it) and then the response (or parms for the message) comes through the last two parms. It works for other programs but also works for subprocesses, like what you're looking at, or threads. The easiest example is creating a thread - if you want to update a progress bar off of the work in the thread, you send a message to the main thread window with your progress bar value, main thread window receives it and changes the progress bar.
Reply With Quote
Reply

Tags
oop delphi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:17 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.