|
-
May 26th, 2002, 11:40 AM
#1
Thread Starter
Frenzied Member
palm
I was thinking of taking another look at palm programming. Palm.com has been fairly helpful, but does anyone have a simple program that they could show me? I can't find actual code anywhere
-
May 26th, 2002, 12:43 PM
#2
Thread Starter
Frenzied Member
I've almost got it, but I can't find a list of functions available...I can do stuff in C, but can't figure out stuff like setting text to controls and stuff...thanks all!
-
May 26th, 2002, 01:32 PM
#3
Frenzied Member
I don't have the link any more.......but look up "Windows eMbedded Visual C++" on microsoft website. You can download the Visual C++ for Windows CE program for free and it gives samples and a free sdk with it.
I hope that is what you want?
-
May 26th, 2002, 01:42 PM
#4
Thread Starter
Frenzied Member
-
May 26th, 2002, 06:21 PM
#5
Frenzied Member
I've forgotten where to find out about Palm stuff (been a while since I looked into it) but there are a couple of major windowing systems around for PalmOS. You might want to search for them.
Not really that helpful I know, but it's the best I can do.
Harry.
"From one thing, know ten thousand things."
-
May 26th, 2002, 06:55 PM
#6
Thread Starter
Frenzied Member
I've found out how to set labels....but I don't understand how to get text...I've seen functions like FldGetTextHandle and FldGetTextPrt
don't understand the explanations though
-
May 26th, 2002, 07:03 PM
#7
Thread Starter
Frenzied Member
FldGetTextHandle
Purpose
Return a handle to the block that contains the text string of a field.
Prototype
MemHandle FldGetTextHandle (const FieldType* fldP)
Parameters
-> fldP
Pointer to a field object (FieldType structure).
Result
Returns the handle to the text string of a field or NULL if no handle has been allocated for the field pointer.
Comments
The handle returned by this function is not necessarily the handle to the start of the string. If you've used FldSetText to set the field's text to a string that is part of a database record, the text handle points to the start of that record. You'll need to compute the offset from the start of the record to the start of the string. You can either store the offset that you passed to FldSetText or you can compute the offset by performing pointer arithmetic on the pointer you get by locking this handle and the pointer returned by FldGetTextPtr.
If you are obtaining the text handle so that you can edit the field's text, you must remove the handle from the field before you do so. If you change the text while it is being used by a field, the field's internal structures specifying the text length, allocated size, and word wrapping information can become out of sync. To avoid this problem, remove the text handle from the field, change the text, and then set the field's text handle again. For example:
/* Get the handle for the string and unlock */
/* it by removing it from the field. */
textH = FldGetTextHandle(fldP);
FldSetTextHandle (fldP, NULL);
/* Insert code that modifies the string here.*/
/* The basic steps are: */
/* resize the chunk if necessary,*/
/* lock the chunk, write to it, and then */
/* unlock the chunk. If the text is in a */
/* database record, use Data Manager calls. */
/* Update the text in the field. */
FldSetTextHandle (fldP, textH);
FldDrawField(fldP);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|