Prev Previous Post   Next Post Next
Old 3rd October 2011, 15:58   #1
hphantom
Junior Member
 
Join Date: Apr 2011
Posts: 15
Endless Marquee in nsWindows popup

Hi everyone,

Am using the nsWindows plugin to create popups, and almost have the marquee working. My intention was to generate the marquee whenever some work is being done (function being called, etc), just so the user had some some that something was moving.

I managed to get the popup to show just fine, but the marquee itself is not - it's just blank.

This is the main page:
code:
Function OnClickLookup
EnableWindow $HWNDPARENT 1
${NSW_CreateWindow} $WINDOW "Look up your key" 1044
;set window size
${NSW_SetWindowSize} $WINDOW 400 200
${NSW_CenterWindow} $WINDOW $hwndparent

${NSW_CreateLabel} 40 90 80 20 "Email Address:"
Pop $0

${NSW_CreateText} 140 90 200 20 $email
Pop $emailTextBox

${NSW_CreateButton} 100 130 85 30 "&Find my key"
Pop $GETKEY
${NSW_OnClick} $GETKEY onClickGetKey

${NSW_Show}
FunctionEnd



This is the leave code (onClickGetKey):
code:
Function onClickGetKey
${NSW_GetText} $fullNameTextBox $fullName
${NSW_GetText} $emailTextBox $email

; We require a valid email address to verify the activation, for all users
push "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"
push $email
SFNSIUtil::regMatch
pop $R1 ;true/false
${IF} $R1 == "false"
${ORIF} $R1 == ""
Messagebox MB_OK|MB_ICONEXCLAMATION "Your email is invalid." IDOK errors
${ELSE}

call Timer

push $email
push $productcode
S:GetKey
pop $0
Push " " ;divider char
Push $0 ;input string
Call SplitFirstStrPart
Pop $R0 ;1st part ["string1"]

${IF} $R0 == "ERROR"
${ORIF} $R0 == "RPC"
call destroyTimerWindow
Messagebox MB_OK|MB_ICONEXCLAMATION "$0"
${ELSE}
call destroyTimerWindow
MessageBox MB_OK|MB_SETFOREGROUND "Your License Key has been sent to your email."
${ENDIF}
${ENDIF}

errors:
StrCpy $R9 "0"
Call RelGotoPage
FunctionEnd



And this is my timer code:
code:

Function Timer
${NSW_CreateWindow} $TIMER "Submitting" 1044
${NSW_SetWindowSize} $TIMER 250 50
${NSW_CenterWindow} $TIMER $WINDOW

${NSW_CreateProgressBar} 0 0 100% 100% "Submitting"
Pop $hwnd
${NSW_AddStyle} $hwnd ${PBS_MARQUEE}

${NSW_CreateTimer} NSW_Timer.Callback 10
${NSW_Show}
FunctionEnd

Function NSW_Timer.Callback
${NSW_KillTimer} NSW_Timer.Callback ; Kill the timer
SendMessage $hwnd ${PBM_SETMARQUEE} 1 50 ; start=1|stop=0 interval(ms)=+N
${NSW_Show}
FunctionEnd

Function destroyTimerWindow
${NSW_DestroyWindow} $TIMER
FunctionEnd



I've also attached a screencap of what am seeing. Am thinking I have the wrong Window?
Attached Thumbnails
Click image for larger version

Name:	popup.jpg
Views:	186
Size:	26.8 KB
ID:	49192  
hphantom is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump