PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Where i can download ListView, TreeView, WinSock examples?

Where i can download ActivX: ListView, TreeView, WinSock examples?

listview_lib.ppl compiler errors:
PPL compiler v.0.9.5
** (listview_lib.ppl=9584byte) Syntax error at 'LVM_SETCOLUMNORDERARRAY' (22,2)
sendMessage(LV_Handle$, LVM_SETCOLUMNORDERARRAY, ColArraySize$, &ColArray$);
** (listview_lib.ppl) Invalid number of output arguments (0) at '=' (180,18)
lvColumn.mask$ = LVCF_TEXT;

Why i can't add TreeView.Node.item by:
n$ = GetProperty(o$, "Nodes");
Invoke(n$,"add(0,0,0,'root',0,0)");

PS:
I don't see attached links in forum, and where registration form?

email: irc.ru(at)mail.ru
Code:
#include "common.ppl"


in your code.

As for using the ListView as an ActiveX component, I never used it like this, I cannot help you here.

To add a column, use ListView_AddColumn().
To add a row, use ListView_Add().

Much easier this way.
Aragost · 01 Feb 2006, 06:49 UTC — need samples
Thanks, compiled, but next problem: i'm not see any visual object on the OLE window:
tc$ = "nam";
ListView_AddColumn(o$,-1,t$,-1,-1);
tr$ = "row1";
ListView_Add(o$, tr$);
Included demo ActiveX.ppl with GridCtrl not show this:
SetProperty(o$, "Cols", 5);
SetProperty(o$, "Rows", 5);
Maybe on Windows CE 4.20 not tested or unsupported ActiveX?
What simple ActiveX visual object to test?

ps:
Still need register in forum.
You will need to download the WM2003 version of PPL. Somehow the PPC2000 version doesn't work well with ActiveX.

http://www.pocketmatrix.com/forums/view ... hp?t=22909
Aragost · 04 Feb 2006, 21:07 UTC — register problem solved
this forum remember me somewhere (cokies deleted), and show "register" link only first time i come here. next time's i don't see them :)
now i take all, i needed. thanks.
Aragost · 05 Feb 2006, 09:34 UTC — Can't see tree.
Used many code combinations, compiled, but see only one empty rectangle, for example:
n$ = GetProperty(o$, "Nodes");
r$ = Invoke(n$,"add(0,0,0,'root',0,0)");
p$ = TreeView_AddItem(n$, 'par', r$, 1);
Need help: treeview sample with screenshot showed results (visual tree).
The invoke line is definately wrong. You need to pass the function name and then all parameters seperated by commas.

Code:
Invoke(n$, "add", 0, 0, 0, "root", 0, 0);


This should work if your syntax is alright.
Aragost · 06 Feb 2006, 07:15 UTC — why need to rerun ppl?
Thanx! This worked.
But now i don't understand: why needed rerun ppl compiler every time, to rerun program(elsewhere items not added).
Maybe i foget free(someobject)? (freeactivx(a$) exist)

ps: how to add subitem?
after code:
n$ = GetProperty(o$, "Nodes");
r$ = Invoke(n$, "add", 0, 0, 0, "root", 0, 0);
i try to add sub item:
1) i1$ = TreeView_AddItem(o$, "item1", r$, 0);
//that not worked
2) i1$ = Invoke(n$, "add", 0, 0, 0, "item1", 0, 0);
//and that not worked (tryed to replace every 0 with r$)
but that 2 methods add next item.
Thank for your time.
TreeView_AddItem() doesn't work with COM/ActiveX handles. It only works with window handles created with NewControl().