Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29251 Discussions

How to address properties of dialog items during runtime

tropfen
New Contributor I
575 Views
Hello,

i would like to change the property of an dialog item during run time.
two examples :
- LVS_NOSORTHEADER on/off
- LBS_MULTIPLESEL on/off
is this possible?

Thanks in advance
Frank

i am using the following configuration
- IVF 10.1.024
- xeffort 1.2.24



0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
575 Views
Ostensibly,

XSetWindowStyle(XGetWindow(GetDlgItem(Dlg%hWnd, ID)))

However, I don't think it will work at all. Most control styles are settable only on creation, and subsequent change is ignored, or even misbehaves (XSetWindowStyle calls SetWindowLong). You can try it though.

For LBS_MULTIPLESEL, there should be a relatively easy workaround (keep it activated, but handle selection change and retain only the last selected item). For LVS_NOSORTHEADER, define your own CTL_COLUMNCLICK callback which does nothing -- it does not remove the arrow though.
0 Kudos
Reply