Old 17th October 2008, 07:34   #1
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Ask System for current DialogColor, FontName, FontSize ??

Hi there,

we need some settings of our current platform. We need the DialogColor, the FontName and the FontSize. We tried to search these values in the registry but failed.
We also started with System::Call commands but after 3 hours we surrendered.

Is there a pro which can tell us how to get these values? We want to build a webpage with the current systemsettings (Font,Size,ColorOfBackground)?

Thanks you very much.

Best regards,
dbach
dbach is offline   Reply With Quote
Old 17th October 2008, 08:22   #2
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
We found out that we need to use GetStockObject (gdi32) but we don't know how to call it to get the var.

http://msdn.microsoft.com/en-us/library/ms533223(VS.85).aspx

Any ideas?
dbach is offline   Reply With Quote
Old 17th October 2008, 10:35   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
System::Call "gdi32::GetStockObject(i SomeNumberHere)i.r0
...but, GetStockObject is the wrong way to do this, to get a color you call GetSysColor or GetSysColorBrush. To get the font, you call SystemParametersInfo with NONCLIENTMETRICS

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump