NsDialogs SetImageOLE: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(UxUODrwcfBKGRGhjTb)
m (Reverted edits by 91.214.44.182 to last version by Anders)
Line 1: Line 1:
Best Wishes!, http://soundcloud.com/tiffany-prom-dresses tiffany prom dresses online, 775235, http://soundcloud.com/see-through-dress Best see through dress, >:-)), http://soundcloud.com/sissy-husband-dress sissy husband dress here, %-D, http://soundcloud.com/designer-prom-dresses designer prom dresses online, 8[[, http://soundcloud.com/hannah-montana-dress-up hannah montana dress up,  %DDD, http://soundcloud.com/play-dress-up-games play dress up games here,  osx, http://soundcloud.com/ghetto-prom-dresses ghetto prom dresses now,  =OO, http://soundcloud.com/baby-easter-dresses baby easter dresses information,  8-[[, http://soundcloud.com/girls-easter-dresses Cheapest girls easter dresses,  135723, http://soundcloud.com/fun-dress-up-game Cheap fun dress up game,  jtd,
== Description ==
This header is an extension to the existing nsDialogs.nsh header file, and adds the ability to use most JPG, GIF and ICO files for bitmap controls created via ${NSD_CreateBitmap} via a new ${NSD_SetImageOLE} commandThis command also supports BMP and so could be used as a drop-in replacement, although this is not recommended as ${NSD_SetImage} is more appropriate for BMP resources.
 
== Attribution ==
This header is the result of the forum discussion "NSD_CreateBitmap, NSD_SetImage - JPEG support?" ( http://forums.winamp.com/showthread.php?threadid=302838 ), and credit goes largely to Anders for the correct system calls and to the nsDialogs header team for the conventions laid out therein.
 
== Header ==
* Main download link: <attach>NsDialogs_setImageOle.zip</attach>.
<br><font color="gray" size="1">MD5: 8bc171309240a9e4aec577b848d3c9be | Filesize: 1,019B </font>
 
== Example ==
<highlight-nsis>
outfile 'nsdialogs_setimageole.exe'
 
!include 'nsdialogs.nsh'
!include 'nsdialogs_setimageole.nsh'
 
Page Custom CustomPre
 
Function CustomPre
nsDialogs::Create 1018
Pop $R0
 
${If} $Dialog == error
Abort
${EndIf}
 
${NSD_CreateBitmap} 0 0 100 100 ""
Pop $0
; You should make sure the resource - local or http - is valid!
${NSD_SetImageOLE} $0 "http://nsis.sourceforge.net/mediawiki/skins/nsis/logo.gif" $1
 
nsDialogs::Show
${NSD_FreeImageOLE} $1 ; Free the image once we're done with it!
FunctionEnd
 
Section
SectionEnd
</highlight-nsis>
 
[[Category:Headers]] [[Category:Code Examples]] [[Category:nsDialogs Examples]]

Revision as of 10:58, 7 April 2010

Description

This header is an extension to the existing nsDialogs.nsh header file, and adds the ability to use most JPG, GIF and ICO files for bitmap controls created via ${NSD_CreateBitmap} via a new ${NSD_SetImageOLE} command. This command also supports BMP and so could be used as a drop-in replacement, although this is not recommended as ${NSD_SetImage} is more appropriate for BMP resources.

Attribution

This header is the result of the forum discussion "NSD_CreateBitmap, NSD_SetImage - JPEG support?" ( http://forums.winamp.com/showthread.php?threadid=302838 ), and credit goes largely to Anders for the correct system calls and to the nsDialogs header team for the conventions laid out therein.

Header


MD5: 8bc171309240a9e4aec577b848d3c9be | Filesize: 1,019B

Example

outfile 'nsdialogs_setimageole.exe'
 
!include 'nsdialogs.nsh'
!include 'nsdialogs_setimageole.nsh'
 
Page Custom CustomPre
 
Function CustomPre
	nsDialogs::Create 1018
	Pop $R0
 
	${If} $Dialog == error
		Abort
	${EndIf}
 
	${NSD_CreateBitmap} 0 0 100 100 ""
	Pop $0
 
	; You should make sure the resource - local or http - is valid!
	${NSD_SetImageOLE} $0 "http://nsis.sourceforge.net/mediawiki/skins/nsis/logo.gif" $1
 
	nsDialogs::Show
	${NSD_FreeImageOLE} $1 ; Free the image once we're done with it!
FunctionEnd
 
Section
SectionEnd