c++ - TreeView_SetExtendedStyle does not apply certain styles, what am I doing wrong? -


i wanted "play around" new extended styles, ones manipulate checkboxes.

the problem none of them seem work.

i can not determine if tvs_ex_doublebuffer works or not, because treeview small. haven't tested tvs_ex_richtooltip yet. apart that, no matter other style set, unable see effect.

here relevant snippet:

hwnd hwndtv = createwindowex(...); // first, add checkboxes dword dwstyle = getwindowlong(hwndtv, gwl_style); dwstyle |= tvs_checkboxes; setwindowlongptr(hwndtv, gwl_style, dwstyle); // add extended window styles hresult h = treeview_setextendedstyle(hwndtv,      tvs_ex_partialcheckboxes, tvs_ex_partialcheckboxes); // insert items... 

i have checked return value of treeview_setextendedstyle macro , did not fail, increases frustration more.

question:

can show me how apply extended styles? example, how set tvs_ex_partialcheckboxes or other?

thank you.

there's nothing wrong how you're setting style - it's when you're setting that's problem.

you need set tvs_ex_partialcheckboxes extended style before set tvs_checkboxes. because setting tvs_checkboxes triggers creation of state imagelist treeview, , imagelist includes "partial" images if partial style set @ time it's created. imagelist isn't recreated automatically if tvs_ex_partialcheckboxes set later on.

additionally, can't specify tvs_checkboxes in call createwindowex if want use partial checkboxes style, since there's no way set tvs_ex_partialcheckboxes until control has been created.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -