![]() |
#1 |
Junior Member
Join Date: Jun 2008
Location: UK
Posts: 9
|
nsDialogs IP Address Control
I'm trying to create an IP Address Control using nsDialogs and not having much luck.
No matter what I do I can't get a handle back other than 0, can someone let me know what I'm doing wrong? Here's the code: !define ICC_INTERNET_CLASSES 0x00000800 nsDialogs::Create 1018 Pop $Dialog StrCmp $Dialog "error" 0 Start Abort Start: System::Alloc 400 Pop $R0 StrLen $1 "${ICC_INTERNET_CLASSES}" System::Call "*$R0(i r1, i ${ICC_INTERNET_CLASSES})" System::Call 'comctl32::InitCommonControlsEx(iR0)i.R4' nsDialogs::CreateControl "WC_IPADDRESS" "${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_CHILD}" "0" 5% 88% 40% 12u "" Pop $1 messagebox mb_ok $1 System::Free $R0 nsDialogs::Show |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
its not StrLen, but the size in bytes of the structure, try:
System::Call "*$R0(i 8, i ${ICC_INTERNET_CLASSES})" also, WC_xxx is a define, so, make sure there is a define with that name and put ${ } around it, or just use "SysIPAddress32" IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jun 2008
Location: UK
Posts: 9
|
![]()
Thanks! It's working now
![]() |
![]() |
![]() |
![]() |
#4 |
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
Just cross-referencing this thread to a recent thread that discusses a font problem that can occur when using the SysIPAddress32 control 'as is'. Short summary: you must create a new font and set it on the IP address control before use to prevent corruption of your installer font.
http://forums.winamp.com/showthread.php?t=318497 - Problem of NSD_CreateIPAddress.nsh |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|