Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Definitive Document for gui controls

Definitive Document for gui controls

Discuss PocketC for CE (including Desktop Edition)

Postby mcrsnap on Sun Dec 21, 2003 10:36 pm

Does anybody have a definitive document that describes
gui controls in detail. I have gone to sundialsoft and reviewed the control tutorials, that was some help. Anybody have specifics docs on how to populate a combobox with dropdownlist?

I have tried cbaddstr(), and cbinsstr() to no avail even tried using the sendmsg() -- Help please.

sample code snippets would be a great help if there is no docs.

Mike
mcrsnap
 
Posts: 8
Joined: Wed Nov 19, 2003 7:09 pm
Location: USA

Postby mcrsnap on Mon Dec 22, 2003 9:01 pm

To those that are interested. I solved the problem that I was having with the combobox population. I did not build the control large enough to display the dropdown list elements. Here is a test code snippet:

<snip>
createctrl("COMBOBOX","Combotest",WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER|CBS_AUTOHSCROLL|CBS_DROPDOWNLIST,0,80,185,90,60,900);
cbinsstr(900,0,"Test0");
cbinsstr(900,1,"Test1");

<snip>

Mike
mcrsnap
 
Posts: 8
Joined: Wed Nov 19, 2003 7:09 pm
Location: USA

Postby wolfgang on Tue Jan 13, 2004 6:01 am

The best documentation about controls and messages comes with Guy Sprackland's PC Form (http://www.pcform.net). Get yourself the demo version, it has a long document about all that. You can also use the demo for 30 days to see how Guy does it (that's the way I learned GUI programming in PocketC - analyzing the PocketC code generated by PCForm). Or alternatively, if you want to do it the super-hard way, look in the Microsoft docs about messaging :-)

Wolfgang


Composing music on the PocketPC! - http://www.pdamusician.com
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby mcrsnap on Wed Jan 21, 2004 10:01 pm

Wolfgang,

do you know of anyway to set the background/foreground color in a control specifically a "command button". I followed your suggestions about reviewing the documents in pcforms, however this particular area does not seem to be covered.

Thanks in advance.

Mike
mcrsnap
 
Posts: 8
Joined: Wed Nov 19, 2003 7:09 pm
Location: USA

Postby wolfgang on Thu Jan 22, 2004 7:46 pm

Changing colors, font etc. of a control is not possible with PocketC's library functions. Workarounds are e.g. for command buttons:

- change text: use editset() function (works for all controls, not just edit boxes)

- enable/disable: you have to create 2 separate controls, one enabled and one disabled (set thye appropriate flag in the createctrl() parameters). To enable, show the active control and hide the disabled one (wndshow() function). To disable, do the opposite.

- different font, or different button shape/color/style: You need to build the button yourself, using 2 bitmaps, on for "button normal" and one for "button pressed". Draw the "button normal" bitmap. Then catch a "PEN DOWN" event for controlid 1 (the main screen) and check if it is within the control area (penx(), peny() functions). Draw the "button pressed" bitmap. Wait for a "PEN UP" event. The button has now been pressed and released. Draw the "button normal" bitmap again.

There are quite a few programs out that use those workarounds to create apps that look&feel like prefectly standard Windows applications. For a simple example, download the demo of MidNote from my site (http://www.pdamusician.com) and try the "Undo" button on the bottom of the screen.


Finally, I think you have access to button parameters through Guy Spracklands (http://www.pcform.net) API library. The downside of that is that it forces you to use PocketC V3 with all the known issues (slow, buggy, unstable compiler, slow, buggy, unstable code). That's why I can't give much help to this library, I still use exclusively PocketC V2.

Wolfgang



Composing music on the PocketPC! - http://www.pdamusician.com
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby mcrsnap on Thu Jan 22, 2004 8:55 pm

Wolfgang,

once again thank you for the information this helps a lot.

Mike
mcrsnap
 
Posts: 8
Joined: Wed Nov 19, 2003 7:09 pm
Location: USA


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 3 guests

cron