When I create a gui program with vixen, one of your functions is WapiSetText. Why is it that the following code works: WapiSetText (#lblTotal, "0.00") WapiSetText (#lblDue, "0.00") However, this doesn't... WapiSetText (#lblTotal, total$) WapiSetText (#lblDue, taxdue$) Please excuse me if this is a stupid question. I don't really use Windows much anymore and have not had to much experience with the Windows API.
Oh dear, let me re phrase... It seems to me the problem lies with the STATIC control. It doesn't appear to be editable? I'm used to being able to edit a label in VB6, Gambas & also Xbasic so this comes as a bit of a surprise to me? Is there a way to make a static control editable or should I use an Editbox. What I need is a non user editable control that can display a calculation, much like a calculator... Any thoughts?
Nope, not working either. Though somehow I figure it should... I have changed the STATIC control to EDIT and now it works... Only problem is that the result is editable. WapiSetText is a function created by vixen to make it easier to set the text in the editbox. If Guy does get around to the forum, I'm sure he will be checking in on this, once he reads/ if he gets to read it. And knowing me, the answer is somewhere in the code, ready to bite me on the nose...
Anyway, thanks. I had forgotten about SendMessageA.
I decided that static fields would keep their initial value; so viXen does not generate a global handle.
1.You can override viXen's default behaviour by checking menu option Options/Generation/All Handles Global 2.You can also use WinAPI SetDlgItemTextA (hwndDlg, $$..., &text$) 3.My prefered solution is to add an edit field and to prevent any User Entry with style $$ES_READONLY
PS. I reversed your XBLite code to a viXen project that I can post for you here if you'd like to review it.