Hi,
Interesting problem. Sorry I missed this one. I looked at the source and at one point a test string is found in a list of structures and stc.name is returned and it is added to the list box. Normally, getting a string from a structure requires it to be derefferenced (as in "showmessage(@str.name);") but in passing it to the sendmessage function to add it to the listbox this is not done on the desktop. It looks like this:
- Code:
tmpStr$ = GenStyleIdToName(GenStyleArray$[i$]);
showmessage(@tmpStr$);
SendMessage(GENSTYLES$, LB_ADDSTRING, 0, tmpStr$);
For this to work on the PPC, I had to add a '@' to the sendmessage call. So now it looks like this:
- Code:
tmpStr$ = GenStyleIdToName(GenStyleArray$[i$]);
#ifdef _WIN32_WCE
SendMessage(GENSTYLES$, LB_ADDSTRING, 0, @tmpStr$);
#else
SendMessage(GENSTYLES$, LB_ADDSTRING, 0, tmpStr$);
#endif
Is this because of the implicit call to WIDE to convert the string to wide chars for the PPC API call?
Can something be done to make this the same on both platforms or should we take care of the details in ListBox_lib.ppl?
I hope that you are enjoying your break Kornalius. I was surprised to see that you answered the question so quickly. You must be missing your project.
matteo thanks for pointing this out. I, like yourself, am interested in programming on the PPC so I have offered to help out Kornalius with some of the code for the VFB. Here is a quick status report of the still pending items.
- accelerator key support pending on PPL supporting this feature
- Some controls (listbox, combobox, treeview, header...)
- Code Generation still needs work
- Font support (font lib for getting name & size values)
- some styles on existing controls could be wrong
Go ahead and report other errors and I'll try to fix them. Right now I'm working on being able to select a font in the control properties.
I'm attaching a new version that should display the properties in the listbox correctly on the PPC and on the desktop.
bmanske