Skip to content

nsDialogs: Add JPG/GIF/PNG support to NSD_SetImage/NSD_SetStretchedImage - #35

Open
poiru wants to merge 1 commit into
nsis-dev:masterfrom
poiru:ole-setimage
Open

poiru wants to merge 1 commit into
nsis-dev:masterfrom
poiru:ole-setimage

Conversation

@poiru

@poiru poiru commented Sep 14, 2026

Copy link
Copy Markdown

When LoadImage cannot load an image file, we now use OleLoadPictureFileEx and render the result into a standard HBITMAP, preserving existing handle cleanup and replacement behavior.

When LoadImage cannot load an image file, we now use
OleLoadPictureFileEx and render the result into a standard HBITMAP,
preserving existing handle cleanup and replacement behavior.
Comment thread Source/exehead/exec.c
V_BSTR(&filename) = SysAllocString(olepath);
if (V_BSTR(&filename))
{
hr = OleLoadPictureFileEx(filename, 0, 0, LP_DEFAULT, &dispatch);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear which Windows versions support this. It should be present on Windows XP according this this:
https://github.com/DeDf/winxp_source/blob/a2f6d7c93aa4f11efc51147566d5961c59a8ef89/Source/XPSP1/NT/base/win32/fusion/oleaut32/whistler/oleaut32.src#L485

If needed, I can change this to use GetProcAddress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant