Archive: Descreption dependent on component caption


Descreption dependent on component caption
With following code, you can show a description for a component with a certain index:

FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1043 ; description item (must be added to the UI)

StrCmp $0 0 "" +2
SendMessage $R0 ${WM_SETTEXT} 0 "STR:first section description"

StrCmp $0 1 "" +2
SendMessage $R0 ${WM_SETTEXT} 0 "STR:second section description"

A better way for me would be a description for a component with a certain caption.

e.g.
-Languages
--German
--English

StrCmp $0 "German" 0 +2
SendMessage $R0 ${WM_SETTEXT} 0 "German language library"

StrCmp $0 "English" 0 +2
SendMessage $R0 ${WM_SETTEXT} 0 "English language library"

How can I do that?


Use SectionGetText.

-Stu