Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 27th December 2005, 19:30   #1
Ender7584
Junior Member
 
Join Date: Aug 2005
Posts: 13
Send a message via AIM to Ender7584
Changing pictures due to color mode

Hey,

Basically I have this bit of code in my .oninit function:

System::Call 'user32::GetWindowDC(i $HWNDPARENT) i .r0'
System::Call 'gdi32::GetDeviceCaps(i $0, i 12) i .r1'

to tell what the color mode running is. Is there a way to get my images that are displayed in the installer to change based on this information? I'm using Modern UI. I don't think there is, since it seems like the images are added on compile, but if there is a way, it would be great to know it

Thanks
Ender7584 is offline   Reply With Quote
Old 27th December 2005, 19:49   #2
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
there is, by api functions.
LoadPicture and maybe some other functions should do it.

browse the msdn

there are also some threads in the forums where ppl discussed about setting pictures dynamically i think.

the search button is your friend
Comm@nder21 is offline   Reply With Quote
Old 3rd January 2006, 21:01   #3
Ender7584
Junior Member
 
Join Date: Aug 2005
Posts: 13
Send a message via AIM to Ender7584
I've been searching on the forums (and always try to before posting) but am still coming up blank. Unfortinatly I don't know how to use APIs well enough to write the line of code. The MSDN does have lots of code examples, but again me not being able to write an API I'm stuck
Ender7584 is offline   Reply With Quote
Old 4th January 2006, 12:08   #4
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
you need to do this:

- load a picture using its filename, get the handle
- get the handle of the control you want to change ("GetDlgItem" NSIS function)
- assign the picture to your control, using both handles

you just need to find the right functions at msdn

then if you don't know how to implement them, have a look at the system plugin readme, you need the command System.dll::Call ....
Comm@nder21 is offline   Reply With Quote
Reply
Go Back   Winamp 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