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

Picking up Ctrl+roll in a TRichEdit

18 views
Skip to first unread message

Steve Thackery

unread,
Aug 1, 2008, 11:56:21 AM8/1/08
to
Colleagues,

I want to implement a 'zoom' feature in a TRichEdit, so that I can shrink or
grow the text by using the customary "Control key plus mouse wheel".

I guess it must be easy but at the moment I've got a mental block and am
completely stumped. I don't know how to detect the mouse wheel rolling, nor
how to test the state of the Ctrl key. Could anyone advise?

Thanks,

SteveT

Remy Lebeau (TeamB)

unread,
Aug 1, 2008, 1:20:57 PM8/1/08
to

"Steve Thackery" <nob...@nowhere.com> wrote in message
news:4893...@newsgroups.borland.com...

> I don't know how to detect the mouse wheel rolling

Most controls, including TRichEdit, have published OnMouseWheel... events
for that.

> nor how to test the state of the Ctrl key.

Look at the Win32 API GetKeyState() and GetAsyncKeyState() functions.


Gambit


Steve Thackery

unread,
Aug 1, 2008, 2:22:25 PM8/1/08
to
> Most controls, including TRichEdit, have published OnMouseWheel... events
> for that.

> Look at the Win32 API GetKeyState() and GetAsyncKeyState() functions.

Ah, thank you, Gambit/Remy! That should get me started.

Thanks again.

SteveT

0 new messages