en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en it en en en en nl en en en en en en en en it en en en it en en en en de fr en en en en nl en en ca en en en fr en en fr pt en en it en en en en nl en en en en en es en en en en it en en en it en en en en en en fr en en en en nl en en en en fr en en fr pt en en fr en en en en nl en en en en en en en fr en en fr pt en en it en en en en nl en en en en en en en en it en en en it en en en en en en en en de en en en fr en en en en en en en en en pt en en en en en en
By logging into your account, you agree to our Privacy Policy, personal data processing and storage practices as described therein.
Forgot password or user name?
Search in titles only Search in PowerBASIC for Windows only
You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
All Time Today Last Week Last Month
All Discussions only Photos only Videos only Links only Polls only Events only
25 Oct 2001, 07:36 PM
Hey guys, I am thinking about creating an app for a test purpose, no big thing at all, just a dialog box and one button to exit it...
Anyone got code for this that paints the background on the dialog box, say green, or red, or blue? Just one solid color....
True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi
Join Date: Aug 1998
25 Oct 2001, 07:46 PM
CALLBACK FUNCTION DlgCB LOCAL LB AS LOGBRUSH STATIC hBrushDlg AS LONG SELECT CASE CBMSG CASE %WM_INITDIALOG ' Dialog coloring LB.lbStyle = %BS_SOLID LB.lbColor = RGB(158,202,245) hBrushDlg = CreateBrushIndirect(LB) CASE %WM_CTLCOLORDLG ' Return pattern brush FUNCTION = hBrushDlg CASE %WM_DESTROY ' We are closing, so delete the brush object CALL DeleteObject(hBrushDlg) END SELECT END FUNCTION
Join Date: Aug 1998
25 Oct 2001, 10:06 PM
Except for one minor obstacle, your RGB gave me baby blue...
The green I wanted is:
But, couldn't I just use %GREEN instead of the RGB function??
True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi
Join Date: Aug 1998
25 Oct 2001, 11:11 PM
You asked for blue...
Join Date: Aug 1998
26 Oct 2001, 02:45 AM
PS: Regarding the %GREEN question:
Of course, provided you are referring to the %GREEN equate in WIN32API.INC, as that is a hard-coded RGB value.
Basically, an RGB value is a LONG or DWORD value that uses the internal format &H0xxBBGGRR, so the RGB function takes only a handful of clock cycles to create the actual value - The RGB function is internal to the compiled PB code; it's not an API function.
Therefore, the answer is yes: either approach will work fine.
Join Date: Aug 1998
26 Oct 2001, 06:07 AM
In fact I am going to make a green.exe (Done) and a red.exe, and a blue.exe
I am in a Win2k school so for practice I will use this for assigning/publishing with the AD global policy...what fun! (Not!)..
Thanks Lance, I will post it in the source code forum when I am done.
True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi
Copyright © 1998-2022 PowerBASIC Tools, LLC - All Rights Reserved.
Powered by vBulletin® Version 5.7.0
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
All times are GMT-5. This page was generated at 01:33 AM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.