Page 1 of 1

PostPosted: Fri Aug 23, 2002 5:19 pm
by joh.becker
Does anybody know how to use a trackbar? I wanted to use a scrollbar, but learned here that this is not working.But some recommended to use the trackbar instead.
I did not find any reference to trackbars. How are they created and moved? How can I check the position, what message do I get when the user moves it?

Johannes

PostPosted: Fri Aug 23, 2002 11:06 pm
by KOU
---------------------------------------------------------------------
The other place you could go for examples of using the CE API from PocketC are the example programs that install with the libraries. There's a program sbtest.pc that creates scrollbars and sets them up with the SetScrollInfo() function.

The example programs get installed into My Documents. The readme file has a list of these programs. Look for ceapireadme.txt in the My Documents folder.

--------------------------------------------------from guy's old post

Sorry guy.
Be sure to use guy's wonderful CEAPI interface.

Somewhere there is more post on this.

KOU

PostPosted: Fri Aug 23, 2002 11:08 pm
by KOU
I forgot to say.

It is in
http://www.pcform.net
guy's PCForm page.

PostPosted: Sat Aug 24, 2002 7:16 am
by ianf
<font face='Tahoma'>I have written some PocketC articles including one on Track Bars. My main documentation page is:-
http://www.sundialsoft.freeserve.co.uk/sddocs.htm
and the Track Bar article is here:-
http://www.sundialsoft.freeserve.co.uk/sddoc002.htm</font id='Tahoma'>

Note: my docs are for PocketC V2 for CE/PocketPC

PostPosted: Sat Aug 24, 2002 3:45 pm
by joh.becker
Thanks Ian, will try it tomorrow.

Johannes

PostPosted: Sun Aug 25, 2002 2:44 pm
by joh.becker
OK, the trackbar works, I can set the position and retrieve it.
But how do I get a message that informs me when the user moves the slider?
I assumed that I would get PM_COMMAND messages, but I just get them with msg[0] = 1, low(msg[2] = 2), hi(msg[2] = 1024). But they seem not to be related to the trackbar.

Does anyone know how to catch messager from the trackbar????

Johannes

PostPosted: Mon Aug 26, 2002 1:10 pm
by wolfgang
I have the same problem in my current development - I get no messages from the trackbar. I was hoping it would at least be transparent so I would get messages from the main window (guiid = 1) instead, but no. I ended up by setting up a 500ms timer to check the trackbar position in regular intervals to see if it has changed, it works, but needless to say I am not thrilled about my solution.

Wolfgang

Composing music on the PocketPC! - http://www.pdamusician.com

PostPosted: Mon Aug 26, 2002 6:17 pm
by guy
I use a timer for my trackbar handling in normal PocketC (from pre CEAPI days).

The best solution would be to use CEAPI and to create the trackbar or scrollbar in the execution thread then get real windows messages.

Unfortunately I don't have a good solution for letting the PocketC part of the application have all of the windows messages. I still need Kevin's callable VM interface to make this work. The various kludges I have tried don't achieve the right result.


Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum

PostPosted: Tue Aug 27, 2002 5:14 am
by joh.becker
OK, I stick with the timer approach by now. CEAPI does not work for me, because I constantly run out of tablespace.

Johannes

PostPosted: Tue Aug 27, 2002 11:15 am
by guy
The symbol table problem may have been increased because of some typing errors in the header files. You could try updating your copies of the header files to see whether you still get the symbol problem.

There is not yet a clean way of handling real windows messages in CEAPI.


Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum