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 7642545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:13:01+00:00 2026-05-31T09:13:01+00:00

I am trying to do pretty much what is being asked here but due

  • 0

I am trying to do pretty much what is being asked here but due to the complexity of the syntax and shortage of time, I need someone to help me out on this.

I have spent a couple of hours try to get TWO checkboxes shown instead of one but I keep failing. The NSIS syntax is killing me and I can’t seem to get the params to the second USER32::CreateWindowEx right. I want to display the second checkbox below (or to the right) of the first one.

So far I have done the following modifications but this doesn’t seem to create the second checkbox (please see the original post for the rest of the code).

; ---<snip>---
System::Call 'USER32::CreateWindowEx(i0,t "Button",t "Some option",i ${__NSD_CheckBox_STYLE},ir6,ir7,ir8,ir9,ir0,i666,i0,i0)i.r2'
System::Call 'USER32::CreateWindowEx(i0,t "Button",t "Second option",i ${__NSD_CheckBox_STYLE},ir6+100,ir7,ir8,ir9,ir0,i667,i0,i0)i.r3'
SendMessage $0 ${WM_GETFONT} 0 0 $0
SendMessage $2 ${WM_SETFONT} $0 1
SendMessage $3 ${WM_SETFONT} $0 1
${NSD_SetState} $2 1 ;check it
${NSD_SetState} $3 1 ;check it
FunctionEnd

Function licleave
FindWindow $5 "#32770" "" $HWNDPARENT
GetDlgItem $0 $5 666
GetDlgItem $1 $5 667
${NSD_GetState} $0 $0
${NSD_GetState} $1 $1
MessageBox mb_ok "Checkbox=$0 $1"
FunctionEnd
  • 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-05-31T09:13:03+00:00Added an answer on May 31, 2026 at 9:13 am

    You cannot do math like ir6+100 in a system::call (You can only OR simple numbers), try IntOp $6 $6 + 100 before you create the second checkbox.

    Edit:

    The code from the other answer also gave the checkbox the same width as the dialog so any other control added to the right of it will appear behind it.

    You must adjust the size of the first checkbox as well:

    ...
    IntOp $8 $8 / 2 ; Use half the width
    System::Call 'USER32::CreateWindowEx(i0,t "Button",t "Some option",i ${__NSD_CheckBox_STYLE},ir6,ir7,ir8,ir9,ir0,i666,i0,i0)i.r2'
    IntOp $6 $6 + $8 ; Offset 2nd checkbox by the width of the first
    System::Call 'USER32::CreateWindowEx(i0,t "Button",t "Other option",i ${__NSD_CheckBox_STYLE},ir6,ir7,ir8,ir9,ir0,i667,i0,i0)i.r3'
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying out db4o (the java version) and I pretty much like what
I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular
I am in need of some help with trying to figure out how to
Due to recent events, i am trying to figure out how much debugging logs
Very rusty native C++ programmer here with pretty much zero experience with Visual Studio.
Im trying to get pretty.js to prettify code in CODE tags, using this js:
I'm trying to solve pretty easy problem. I want to establish connection to 2
I am trying to some pretty basic RMI: // Context namingContext = new InitialContext();
I'm trying to produce a pretty simple XML schema for an XML similar to
I encounter this issue pretty consistently when trying to merge a branch back into

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.