This site is no longer active and is available for archival purposes only. Registration and login is disabled.

changing class members / background color


changing class members / background color

Postby Joerg » Apr 28, 2006 @ 11:11am

Joerg
 


PPL only for games?

Postby Joerg » May 19, 2006 @ 2:19pm

Hi Kornalius,

I am programming a little "database" program, to store personal data as accounts, insurance numbers etc., using the standard Windows controls as forms, tab and text controls, labels (statics), control bar and menus, list boxes, but also the integrated encryption functionality (that's a nice thing!). I'm doing that using PPL, because I wanted to try out it. All is working fine. It needed some time more as usually, because I was new in PPL and API programming.

Therefore I'm sure, that PPL is usefull not only for games, but even to create Windows "standard" programs w/o the game API.

But because I have only little experiences relating API programming, I have still one problem, which about I already asked in this forum (three weeks ago), but unfortunately didn't get an answer till now:

ALL ELEMENTS OF THE WINDOWS ARE ONLY WHITE.
How can I change the background color of a form and of a control?

In the internet I found out, how it works in C, and I think, I understand the principle. But I didn't understand till now, how I access class members in PPL, resp. how I create at first a window class with the needed members; is there any template, predefined structure etc.? Or is this the wrong way?

I think, I understand right, that the intention of PPL is programming games at first.
But I think, that other programms, as the example above, are important too, or not?

So it would be very nice, and I would be very, very glad, if you could help me with any suggestion or example, which shows me the right way to a colored background...
Please help!

Best regards from Berlin (Germany)
Joerg.
Joerg
 


Postby bmanske » May 19, 2006 @ 6:41pm

Jeorg,

We are very close to the launch time for 1.0 of PPL, so I suspect that Kornalius is busy getting ready for that event.

In answer to your question. Your are correct in that the WinClass structure is not exposed, so you can't change the background that way. The magic of the WinClass structure is that you can define a bruch that will be used to erase the background by the default WinProc, so it just happens for you.

The default WinProc does this in response to a WM_ERASEBKGND message. This message gets sent a rectangle to draw because it has been invalidated. You could service the message yourself and return a non zero value after painting the background.

I may try this myself this weekend and post an example.

bmanske
bmanske
pm Member
 
Posts: 117
Joined: Aug 26, 2004 @ 9:51pm


Postby kornalius » May 19, 2006 @ 11:21pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


What I tried till now...

Postby Joerg » May 22, 2006 @ 9:27am

Joerg
 


Postby bmanske » May 22, 2006 @ 4:22pm

bmanske
pm Member
 
Posts: 117
Joined: Aug 26, 2004 @ 9:51pm


Postby kornalius » May 22, 2006 @ 9:17pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby bmanske » May 22, 2006 @ 9:53pm

Here is a link with an example of using the WM_CTLCOLOR messages



I will take a stab at getting the WM_EraseBKGND to work.

bmanske
bmanske
pm Member
 
Posts: 117
Joined: Aug 26, 2004 @ 9:51pm


Postby kornalius » May 25, 2006 @ 1:23am

Thanks Brad.

Btw, there is a 64k limit in the editor.ppl. It's a Windows limitation of the standard Edit control. Do you think you can find a way to replace it by a RichEdit. I don't even know if it's possible on the PPC, just asking. Let me know how big of a job it will be too. I don't want you to start anything too big just before the release.
Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Return to Pocket Programming Language (PPL)


Sort


Forum Description

Discuss this new development tool.

Moderator:

kornalius

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron