Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8839673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:17:23+00:00 2026-06-14T10:17:23+00:00

I’m using the plugin macro NSD_SetImageOLE from http://nsis.sourceforge.net/NsDialogs_SetImageOLE – And I would like add

  • 0

I’m using the plugin macro NSD_SetImageOLE from http://nsis.sourceforge.net/NsDialogs_SetImageOLE – And I would like add another macro NSD_SetStretchedImageOLE the same way nsDialog.nsh works.

But I’m not sure is it’s even possible, I’ve found that the resizing of an IPicture can be done by getting the “HBITMAP, BITMAP and BITMAPINFO” and resizing it (quoted from http://www.mofeel.net/958-microsoft-public-vc-mfc/12516.aspx). Anyway, I’m kind of lost trying to covert these methods to NSIS’s System::Call style.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:17:26+00:00Added an answer on June 14, 2026 at 10:17 am
    !ifndef IID_IPicture
        !define IID_IPicture {7BF80980-BF32-101A-8BBB-00AA00300CAB}
    !endif
    !define SRCCOPY 0xCC0020
    !include nsDialogs.nsh
    
    !define IMAGEPATH "$sysdir\migwiz\PostMigRes\Web\base_images\Documents.gif" ;"C:\Windows\Web\Wallpaper\Windows\img0.jpg"
    !define NEWSIZEW 200
    !define NEWSIZEH 100
    
    Page Custom mypagestretchcreate_GDI ; GDI resize
    Page Custom mypagestretchcreate_CTL ; Simple control resize
    
    
    Function mypagestretchcreate_GDI
    nsDialogs::Create 1018
    Pop $0
    System::Call 'oleaut32::OleLoadPicturePath(w "${IMAGEPATH}",i0r2,i0,i0,g"${IID_IPicture}",*i.r9)i.r1'
    ${If} $1 = 0
        System::Call 'user32::GetDC(i0)i.s'
        System::Call 'gdi32::CreateCompatibleDC(iss)i.r1'
        System::Call 'gdi32::CreateCompatibleBitmap(iss,i${NEWSIZEW},i${NEWSIZEH})i.r2'
        System::Call 'user32::ReleaseDC(i0,is)'
        System::Call $9->3(*i.r3)i.r4 ; IPicture->get_Handle
        ${If} $4 = 0
            System::Call 'gdi32::SetStretchBltMode(ir1,i4)'
            System::Call '*(&i40,&i1024)i.r4' ; BITMAP / BITMAPINFO
            System::Call 'gdi32::GetObject(ir3,i24,ir4)'
            System::Call 'gdi32::SelectObject(ir1,ir2)i.s'
            System::Call '*$4(i40,i.r6,i.r7,i0,i,i.s)' ; Grab size and bits-ptr AND init as BITMAPINFOHEADER
            System::Call 'gdi32::GetDIBits(ir1,ir3,i0,i0,i0,ir4,i0)' ; init BITMAPINFOHEADER
            System::Call 'gdi32::GetDIBits(ir1,ir3,i0,i0,i0,ir4,i0)' ; init BITMAPINFO
            System::Call 'gdi32::StretchDIBits(ir1,i0,i0,i${NEWSIZEW},i${NEWSIZEH},i0,i0,ir6,ir7,is,ir4,i0,i${SRCCOPY})'
            System::Call 'gdi32::SelectObject(ir1,is)'
            System::Free $4
        ${EndIf}
        System::Call 'gdi32::DeleteDC(ir1)'
        System::Call $9->2() ; IPicture->release()
    ${EndIf}
    ${NSD_CreateBitmap} 1u 1u ${NEWSIZEW} ${NEWSIZEH} ""
    Pop $9
    ;Not required when the control size matches: ${NSD_AddStyle} $9 ${SS_CENTERIMAGE}
    SendMessage $9 ${STM_SETIMAGE} ${IMAGE_BITMAP} $2
    nsDialogs::Show
    System::Call 'gdi32::DeleteObject(ir2)'
    FunctionEnd
    
    Function mypagestretchcreate_CTL
    nsDialogs::Create 1018
    Pop $2
    ${NSD_CreateBitmap} 0 1u 70% 50% ""
    Pop $3
    ${NSD_AddStyle} $3 ${SS_REALSIZECONTROL}
    File "/oname=$PLUGINSDIR\image.bmp" "${NSISDIR}\Contrib\Graphics\Header\win.bmp"
    ${NSD_SetImage} $3 "$PLUGINSDIR\image.bmp" $1
    nsDialogs::Show
    ${NSD_FreeImage} $1
    FunctionEnd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I would like to count the length of a string with PHP. The string
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.