Old 20th January 2010, 09:54   #1
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
Set keyboard focus to nsDialogs radio button

Hi,

Is it possible to set the kayboad focus to a nsDialogs radio button?
I've tried:
code:
SendMessage $HWNDPARENT ${WM_NEXTDLGCTL} $0 1 $R0
In this case '$0' is the HWND that has been returned by '${NSD_CreateRadioButton}'.
The installer crashes every time I'm trying this.
When setting the keyboard focus to a button, it works fine.

Thanks.

CJ
ChocJunkie is offline   Reply With Quote
Old 20th January 2010, 16:24   #2
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Sorry, I am not understanding what you mean by "keyboard focus". Do you just mean setting the focus, that is, the control is highlighted?

Anyways, why don't you just call nsDialogs's SetFocus command?
code:
${NSD_SetFocus} $0
CrushBug is offline   Reply With Quote
Old 20th January 2010, 19:49   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Because WM_NEXTDLGCTL is the proper way to do it, otherwise the dialog manager can get confused (And Raymond Chen will hunt you down and patch you )

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
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