Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Set keyboard focus to nsDialogs radio button (http://forums.winamp.com/showthread.php?t=316408)

ChocJunkie 20th January 2010 09:54

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

CrushBug 20th January 2010 16:24

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

Anders 20th January 2010 19:49

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 :) )


All times are GMT. The time now is 18:05.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.