flat assembler
Message board for the users of flat assembler.

Index > Windows > keystrokes in richedit control

Author
Thread Post new topic Reply to topic
procyon



Joined: 07 Sep 2007
Posts: 12
procyon 07 Sep 2007, 21:58
Hi,

I have a window with a richedit control. I can load a file into the control with EM_STREAMIN and find required text with EM_FINDTEXTEX. My problem is that I want the program to be able to automatically modify parts of the loaded file, but cannot figure how to send keystrokes to the control. I have tried using:

invoke SendMessage, [ReCtlHnd], WM_NOTIFY, ReCtl, mylParam

and filling the NMHDR and MSGFILTER with the relevant info, but it does not generate a WM_NOTIFY message. i.e. I have an int3 in the WM_NOTIFY section of my WndProc and the above SendMessage does not go there.


How can I simulate keystrokes to a richedit control?

TIA

pro
Post 07 Sep 2007, 21:58
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 08 Sep 2007, 14:16
procyon,

You can use,

keybd_event

Use it once to send a key down event, and then again to send a key up event. You can also use this to send ALT-key and CTRL-key combinations by sending the ALT key down event, then the key down event, then the key up event, and finally the ALT key up event.

hth,

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 08 Sep 2007, 14:16
View user's profile Send private message Reply with quote
procyon



Joined: 07 Sep 2007
Posts: 12
procyon 09 Sep 2007, 12:05
Hi farrier,

Yes, it did indeed help Wink
Looks like I was trying to make things too complicated, lol

thanks

pro
Post 09 Sep 2007, 12:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.