Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 1st April 2007, 05:56   #1
rsegal
Senior Member
 
rsegal's Avatar
 
Join Date: Feb 2003
Location: Toronto, Canada
Posts: 227
Getting window handle of radio button added to directory page

I'm trying to get the window handle from a control I've added using ResHacker on the directory page. Here is the details of the added controls...

code:

CONTROL "", 2000, BUTTON, BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 95, 243, 10



This part works great. I can see the radio button and interact with it. However I need to replace the text adjacent to the actual button and haven't had the best of luck doing that. Here's what I've attempted...

code:

Function DirectoryPageShow
GetDlgItem $R0 $MUI_HWND 2000
SendMessage $R0 ${WM_SETTEXT} 0 "STR:----"
FunctionEnd



Yet there is no change on the controls text. I'm certain this is an issue with how I am retrieving the window handle. Any help is greatly appreciated.
rsegal is offline   Reply With Quote
Old 1st April 2007, 10:31   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
code:
!include "WinMessages.nsh"

!define ITEM_ID "2000"

var DIR_HWND
var ITEM_HWND

Function DirectoryPageShow

FindWindow $DIR_HWND "#32770" "" $HWNDPARENT
GetDlgItem $ITEM_HWND $DIR_HWND ${ITEM_ID}
SendMessage $ITEM_HWND ${WM_SETTEXT} 0 "STR:----"

FunctionEnd


Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 2nd April 2007, 04:37   #3
rsegal
Senior Member
 
rsegal's Avatar
 
Join Date: Feb 2003
Location: Toronto, Canada
Posts: 227
Once again Red you have solved my problems. I am in your debt sir. It's been a while since I've visited the NSIS community and it's great to still see such fine ambassadors amongst it's ranks.
rsegal 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