Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Explorer-style dialog
Sample dialog with toolbar, tree view, list view and status bar controls, with images.

Feb 15, 2007
Added custom draw.

Attached Files Image(s)

.qml   Dialog Explorer.qml (Size: 13.01 KB / Downloads: 993)
how to use the SysListView32 column titles for sorting the items ?
(click on column title to toggle ASC/DESC)
SysListView32, SysHeader32 in Dialog

download the second attachment
please give an example for toolbar actions (you left that blank)

Copy      Help
NMHDR* nh=+lParam
sel nh.idFrom
,case 3 ;;toolbar
,,sel nh.code
,,,case NM_RCLICK
,,,,out "which button clicked me ?"
Copy      Help
,case 3 ;;toolbar
,sel nh.code
,,case NM_RCLICK
,,NMMOUSE* mo=+nh
,,if(mo.dwItemSpec=-1) ret ;;not on button
,,out "right click on button %i" mo.dwItemSpec

note that different messages use different types, not necessary NMMOUSE. I cannot give all examples. Look in MSDN library.
WM_SETCURSOR's wParam and lParam contain some useful information. See MSDN library.
can you tell how to make it work, so that we have text color
for tb buttons.
or is it the wrong attempt ?

i ask, because my toolbar now has the taskbar background, but the text
labels are black. Confusedhock:

Copy      Help

sel cd.nmcd.dwDrawStage
,case CDDS_PREPAINT ret CDRF_NOTIFYITEMDRAW ;;yes, notify me to draw items
,,sel cd.nmcd.dwItemSpec
,,,case 1001 cd.clrText=0x222222;out "i am here"
,,,case 1002 cd.clrText=0x222222
,,,case 1003 cd.clrText=0xFF0000
,,,case else ret
You probably know from custom draw documentation that not everything works if XP visual styles are enabled. Either disable visual styles for tb, or draw text yourself, which is quite difficult but possible (qm toolbars do it).

Copy      Help
,SetWindowTheme id(3 hDlg) L"" L""
i do not understand.

i still don't know how to set the text color for my tb buttons.
and how to make the active button look like been pushed.
Your DEX_TBCustomDraw is correct. Maybe button ids are different in your app, but it works well if called from DEX_Dialog, when visual styles are disabled (SetWindowTheme called).

Quote:and how to make the active button look like been pushed

Don't know, see toolbar button states in MSDN.

Forum Jump:

Users browsing this thread: 1 Guest(s)