简体   繁体   English

NSIS,点击后如何在文本控件上保留标签?

[英]NSIS, how to keep a label over a text control after it is clicked?

I got this code,我得到了这个代码,

nsDialogs::Create 1018
Pop $0

; Link
${NSD_CreateLabel} 292, 301, 71, 18 "click here!"
Pop $0
SetCtlColors $0 0x0000FF 0xFFFFFF ; Blue on white
${NSD_OnClick} $0 on_click_link

; Text area
nsDialogs::CreateControl /NOUNLOAD ${__NSD_Text_CLASS} ${DEFAULT_STYLES}|${WS_CLIPCHILDREN}|${WS_TABSTOP}|${ES_WANTRETURN}|${ES_MULTILINE} ${__NSD_Text_EXSTYLE} 5 220 660 115 ''
Pop $1
SendMessage $1 ${EM_SETREADONLY} 1 0
SetCtlColors $1 0x000000 0xFFFFFF ; Black on white
${NSD_SetText} $1 "A label(hyperlink) is put over this text area"

nsDialogs::Show

I went the label to stay on top of the text control.我去标签留在文本控件的顶部。 When I click on the text area of the text control, the label disappear.当我点击文本控件的文本区域时,标签消失。 Is there a way to tell the label to stay over the text control ?有没有办法告诉标签留在文本控件上?

Please help !请帮忙 !

Try setting Z-order of label with SetWindowsPos function call.尝试使用SetWindowsPos函数调用设置标签的 Z 顺序。

Use HWND_TOPMOST to set max Z-order of label, here is API: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx使用 HWND_TOPMOST 设置标签的最大 Z 顺序,这里是 API: http : //msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM