1. Really, really, really, nit-picky....

Okay, no cause for alarm here...just found something in Win32lib that I 
would wager most of us have never tried (at least I never did).  Has 
anyone ever tried to change the appearance of Windows desktop and use a 
Win32lib program? What I mean is right-clicking in the desktop, 
selecting the "Properties" item from the pop-up, selecting the 
"Appearance" tab and changing the "Desktop" item scheme to something 
other than Windows Standard and then running a program that uses 
Win32lib?  Go ahead...try it...I'll wait...did you notice that your 
Win32lib program did not change the background color of labels, windows, 
checkboxes, etc.?  Not really a big thing but it would be noticed by 
users wanting to change their desktop colors.  

To that end I humbly submit the following code:

-- On a paint call check if the current button face color has changed
-- and if so set all label controls and windows to the correct 
background color
-- as well as the main window background color.
atom cur_color 
cur_color = 0

procedure MainWin_onPaint(atom x1, atom y1, atom x2, atom y2)
	object color 
	color = getSysColor(COLOR_BTNFACE)
	if color != cur_color then
		cur_color = color	
                -- Set all window controls background
		setWindowBackColor( MainWin, color )
                -- Set label background
		setWindowBackColor( CurProjLT, color )	
                -- Set group control backgrounds
		setWindowBackColor( PrintTypeGroupGC, color ) 
                -- Set radio button backgrounds
		setWindowBackColor( PrintDetailRB, color )

	end if
end procedure
onPaint[MainWin] = routine_id("MainWin_onPaint")

new topic     » topic index » view message » categorize

2. Re: Really, really, really, nit-picky....

This has been on the to-do list for ages. In fact I did get around to fixing
it at one stage but due to poor code management, I deleted that version by
accident. I recall that it took quite a bit of mucking about due to all the
hard-coded uses of control colors etc...

I guess you guys have just raised it up the list a notch or two.

----- Original Message -----
From: "sephiroth _" <euman2376 at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Really, really, really, nit-picky....


>
> changing the system colors while a win32lib program is running and the
> colors not changing has been a problem since day 1. i tried a little
> hack with my IniEdit program to work around this, but it didn't seem to
> work
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu