🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by Christophe MINETTI Fri, 12 May 2006 05:51
TTrackBar and Event
#3654
Author: Christophe MINETTI
Date: Fri, 12 May 2006 05:51
10 lines
1143 bytes
Hi All,

I am using the function PeekMessage() to remove the huge amount of event
sent by the OnChange event of a TrackBar component. My question is: What
kind of Window message is sent when one changes the trackbar position
(the equivament of  WM_TIMER for a timer).

Many thanks in advance.

Christophe
Re: TTrackBar and Event
#3656
Author: Remy Lebeau (TeamB)
Date: Fri, 12 May 2006 08:12
21 lines
1673 bytes
"Christophe MINETTI" <cminetti@ulb.ac.be> wrote in message
news:4464226B.8A469DBC@ulb.ac.be...

> I am using the function PeekMessage() to remove the huge amount
> of event sent by the OnChange event of a TrackBar component.

Why are you doing that?

> What kind of Window message is sent when one changes the trackbar position

As specified in the Win32 API documentation, a TrackBar control sends
WM_HSCROLL and WM_VSCROLL messages to its parent window.  Since the parent
window is a VCL window in this situation, the VCL repackages the messages as
CN_HSCROLL and CN_VSCROLL and sends them back to the TTrackBar for handling.
Using Spy++, I also see WM_MOUSEMOVE, WM_NCHITTEST, WM_USER, WM_PAINT,
WM_CAPTURECHANGED and WM_SETCURSOR messages being sent to the TTrackBar as
well while the thumb is being dragged by the user.


Gambit
Re: TTrackBar and Event
#3655
Author: Christophe MINETTI
Date: Fri, 12 May 2006 08:30
8 lines
1231 bytes
> > I am using the function PeekMessage() to remove the huge amount
> > of event sent by the OnChange event of a TrackBar component.
>
> Why are you doing that?

Simply because the process called during the OnChange Event of the TrackBar is
quite long and I remove the queue of Events to avoid the application to be
blocked until all the events have been processed ...
Re: TTrackBar and Event
#3657
Author: Remy Lebeau (TeamB)
Date: Fri, 12 May 2006 09:55
12 lines
1430 bytes
"Christophe MINETTI" <cminetti@ulb.ac.be> wrote in message
news:446447B6.F0E4E7F4@ulb.ac.be...

> Simply because the process called during the OnChange Event of the
> TrackBar is quite long and I remove the queue of Events to avoid
> the application to be blocked until all the events have been processed ...

You should use a thread for that instead.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads