News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

A question on listviews

Started by clamicun, January 22, 2015, 01:19:16 AM

Previous topic - Next topic

clamicun

This is part of a listview...

"
"
.elseif wmsg == WM_INITDIALOG
call  InitListView

The listview is ready now...
           
.elseif wmsg == WM_NOTIFY
mov edi,lparam                 
mov eax,[edi.NMHDR].hwndFrom 

If I click on a column, it gets highlighted - good. I do not know why -maybe listviews do that.     
         
.if [edi.NMHDR].code == NM_RCLICK   
call ProcessFileName                                ;Right mouseclick opens a dialogbox
Column is not highlighted anymore !                                     

.elseif [edi.NMHDR].code == NM_DBLCLK   ;Doubleclick shows dir and filename
call ShowMessageBox   
Column is not highlighted anymore !       
.endif

The column should stay highlighted during the dialogbox or messagebox are shown

Any idea ?

fearless

Even if a listview has LVS_SHOWSELALWAYS style, when it loses focus (a dialog or messagebox are shown), your going to get a gray highlight on a selected listitem instead of the normal blue one.

clamicun

Thank you, fearless.
Gray would not be bad, but unfortunately the highlight goes off totaly. 

clamicun

Good evening fearless,
so - could you let some light in?

We know it is possible to let the column highlighted. Many searchprograms do it.
A hint, where I could investigate this?

clamicun

By coincidence I found this.

LVS_SHOWSELALWAYS

The column stays highlighted until you move over a different column.

WS_CHILD+WS_VISIBLE+LVS_SHOWSELALWAYS+LVS_REPORT+LVS_SINGLESEL