Archive: DetailPrint within plugin function


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

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


damn, i was worried about someone saying that ;)

thx