WINAMP.COM | Forums > Developer Center > NSIS Discussion > nsDialogs, NSD_CreateBitmap, NSD_SetImage - JPEG support? |
Last Thread
Next Thread
|
| Author |
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
You could probably replace the LoadImage call in nsDialogs.nsh with a call to OleLoadPicturePath and then get the image handle from the interface this function returns. __________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
hehe.. well the "you" part in there is putting a lot of (misplaced) confidence in me - but I'll have a peek through MSDN and the System docs |
||
|
|
|
Takhir Major Dude
Registered: Feb 2004 |
This may help http://nsis.sourceforge.net/Embedded_Banner |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
yeah, unfortunately the various banner/etc. plugins all have their sets of limitations.. e.g. code: ...which I mostly see as using 'IID_IPicture' in examples - but where on earth that particular ID is coming from.. *puzzles* |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
IID_IPicture is a guid, {7BF80980-BF32-101A-8BBB-00AA00300CAB} i think, so: __________________ |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
see http://source.winehq.org/source/inc...tdole2.idl#L303 ...and remember, 0,1 and 2 are IUnknown, so the first method in IPicture is 3 (The system.dll readme has example code for calling COM objects) __________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
whhooooo... blimey. Nope, in way over my head - will give it another stab after the weekend |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
128=ERROR_WAIT_NO_CHILDREN and that makes no sense, maybe you should post some of your code __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
You can use err.exe to get information on pretty much every error code in Windows. __________________ |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
__________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
got off the vpn, but if I recall correctly - and yes, I know it's utterly wrong... even if I'm remembering and piecing this together right... code: which I think means... using the System plugin's Call routine, make a call to from oleaut32.dll's OleLoadPicturePath procedure with the arguments... - path or URL to the file - null - null - null - the guid - create a new 'pointer' which will hold the result, stick the pointer in $0 - stick the result of the call itself in $1 - get any error message, stick that on the stack ==== As for that err.exe thing - sounds useful, so I googled... http://www.microsoft.com/downloads/...;displaylang=en ( says Exchange but a MSDN blog noted that it'll do the Win32 errors as well ) |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
you need the types for every param, t for text (or w for wide strings) and i for DWORD/pointers __________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
cool, thanks - I'll review and try again monday |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
no, you can do "i,i,i" without specifying the actual value, or "i0,i0,i0" to show intent __________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
alright, just poking at this offline a bit more... code: It returns a pointer/reference/thing to the interface, the result is zero (which I think means 'ok') and no error code is returned (well, also zero). So now would come the time to get some data out of that interface. Instead of jumping straight into the deep that is the image handle, I figured I'd get the width of the bitmap first. However, I then of course get stuck again ![]() code: 6 = getWidth, as far as the VTable is concerned; http://msdn.microsoft.com/en-us/library/ms680761(VS.85).aspx At first I thought I was supposed to just call it as '->6()' and thus have the result in $1 . That crashes, though. However, specifying an out variable (i.r3) as a parameter doesn't do much either; code: Of course, that error code ($2 - 80) doesn't make sense.. again. But I might be reading err.exe's output wrong. Anyway, I tried ::Get as well, but that got me an error DMLERRsomethingorother .. I'll poke at it some more later -_- |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
the argument is a pointer to a OLE_XSIZE_HIMETRIC (whatever that is, lets hope its 4 bytes) so: __________________ |
||
|
|
|
Anders Major Dude
Registered: Jun 2002 |
code: if you need to resize the actual image control to fit the image, you need to call width and height and convert from himetric to pixels, I'm sure google can help out __________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
Thanks! |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
Alright - spent some time sunday to turn it into a header file, it's in the wiki (along with a new nsDialogs category), stuck it in the production script and voila... works beautifully - thanks again! |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Thanks for creating the nsDialogs category. It was really long due. All those other examples are really useful too. __________________ |
||
|
|
|
Animaether Major Dude
Registered: Jun 2001 |
|
||
|
|
|
Last Thread Next Thread
|
WINAMP.COM | Forums > Developer Center > NSIS Discussion > nsDialogs, NSD_CreateBitmap, NSD_SetImage - JPEG support? |
Forum Rules:
|