WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > nsDialogs IP Address Control
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
Xokar
Junior Member

Registered: Jun 2008
From: UK

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

Quick Link | Report this post to a moderator | IP: Logged

Xokar is offline Old Post 01-17-2009 03:45 PM
Click Here to See the Profile for Xokar Click here to Send Xokar a Private Message Find more posts by Xokar Add Xokar to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

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

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 01-17-2009 08:04 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
Xokar
Junior Member

Registered: Jun 2008
From: UK

Smile

Thanks! It's working now

Quick Link | Report this post to a moderator | IP: Logged

Xokar is offline Old Post 01-20-2009 12:04 PM
Click Here to See the Profile for Xokar Click here to Send Xokar a Private Message Find more posts by Xokar Add Xokar to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 07:55 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > nsDialogs IP Address Control
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON