Skip to content
⌘ NSIS Forum Archive

DetailPrint within plugin function

3 posts

noisehole#

DetailPrint within plugin function

hi,

i wonder what the best approach for writing text to the detail window from a plugin function is.

as there are no api callback functions, i guess the only chance is to use someting like this:


HWND handle = FindWindowEx (hwndParent, NULL, "#32770", "");
handle = GetDlgItem (handle, 1016);

int count = SendMessage (handle, LVM_GETITEMCOUNT, 0, 0);

LVITEM lvi;
memset (&lvi, 0, sizeof (lvi));
lvi.mask = LVIF_TEXT;
lvi.iItem = count;
lvi.pszText="testing text 123...";

SendMessage (handle, LVM_INSERTITEM, 0, (LPARAM) &lvi);
thats mui specific and pretty ugly (hardcoded classname and dialog item number)

better ideas?

thx
Afrow UK#
That is the only way. It will work with both Modern UI and Classic UI though because the control ID's are the same.

-Stu