Could someone give me a hint how to do a proper resizing, i?m always having problems
with that :~
Posted on 2002-12-24 06:02:06 by Allanon
source for it
Posted on 2002-12-24 06:03:08 by Allanon
Resize what?
Posted on 2002-12-24 13:56:22 by comrade
Do you mean the end of the third column doesn't extend to the edge of the window?
Posted on 2002-12-24 16:44:10 by Miko
Usually it is not supposed to, in order to leave space for scrollbar.
Posted on 2002-12-24 19:39:16 by comrade
nope i mean if i resize the 3.rd column everthin gets fu*** :~
Posted on 2002-12-25 05:59:55 by Allanon
i think he wants to make the column header not resizeble,
that way he wont get a fucked code when resizing the 3rd header,
mabye try o fix this fuck up with repaiting the window, or redrae the headers.
Posted on 2002-12-29 07:52:04 by wizzra
There are many good threads about list view, with many good sources. :)
Posted on 2002-12-29 08:09:01 by wicr0s0ft
wizzra hm nope it should be reziable that?s the problem ;O
i?m not sure how to do it :/

since i found no other way so far i was trying somethin like this in WM_NOTIFY

hHeader is a handle to header control used by the list-view control

mov edi,lParam
assume edi:ptr NMHEADER
mov eax,[edi].hdr.hwndFrom
.IF eax == hHeader
.IF [edi].hdr.code == HDN_ENDTRACKA || HDN_ENDTRACKW

and now ????
Posted on 2002-12-29 10:10:01 by Allanon

CreateColumns proc


mov lvc.imask,LVCF_WIDTH or LVCF_TEXT
mov lvc.fmt,LVCFMT_LEFT
mov lvc.lx,125
mov lvc.pszText,CTEXT("First Column")
mov lvc.iSubItem,0
INVOKE SendMessage, hListView,LVM_INSERTCOLUMN,0,addr lvc

mov lvc.iSubItem,1
mov lvc.pszText,CTEXT("Second Column")
INVOKE SendMessage, hListView,LVM_INSERTCOLUMN,1,addr lvc

mov lvc.iSubItem,2
mov lvc.pszText,CTEXT("Third Column")
INVOKE SendMessage, hListView,LVM_INSERTCOLUMN,2,addr lvc


CreateColumns endp
Posted on 2002-12-29 10:27:50 by lingo12
maybe to visualize my problem ...
as u can see the progressbar is somewhere else in the window
when i move one of the columns and not were it should be :(

thanx for ur tip lingo12 but i doesn?t solve my prob :~
Posted on 2002-12-29 14:48:27 by Allanon
the way i see it,
every time u Step the progress bar u need to calculate the differene between column 2 and 3, or when a user has decreased the size of the width (movef the header) and update the neccery variables.
because the problem is that the progress bar's width is static and not dynamic,
thats why u get this ugly draw every time u move the header.

btw, the source code u put above will not work in MASM unless u do little modifications, are you using that RadAdm thingi ?
i think Qeditor is fine along with VC editor!
Posted on 2002-12-29 15:41:51 by wizzra
The calculations for the new postition of the progressbar is already
inside your code. Just use the same calculation and use MoveWindow().
And update the progressbar everytime the user resizes the column header.
Look into the message LVM_GETCOLUMNWIDTH to replace the big calculation code.
[color=sienna].elseif uMsg==WM_NOTIFY

mov rc.left, LVIR_BOUNDS
INVOKE SendMessage,hListView,LVM_GETSUBITEMRECT,0,addr rc
mov eax, rc.right
mov edx, rc.bottom
sub eax, rc.left
sub edx,
invoke MoveWindow,hwndProgress1, rc.left,, eax, edx, 1[/color]
Posted on 2002-12-29 15:53:36 by natas


MoveProgress proc
push ebx
mov ebx, 2 ; you have two subitems
mov rc.left, LVIR_BOUNDS
lea ecx, [ebx-1]

INVOKE SendMessage,hListView,LVM_GETSUBITEMRECT, ecx,addr rc
mov eax, rc.right
mov edx, rc.bottom
sub eax, rc.left
sub edx,
mov ecx, [offset hwndProgress1+ebx*4-4] ; ecx->hwndProgress1 or hwndProgress2

INVOKE MoveWindow, ecx, rc.left,, eax, edx, 1
dec ebx
jnz K_Loop
INVOKE UpdateWindow, hListView
pop ebx
MoveProgress endp

.ELSEIF ..........


call MoveProgress

.ELSEIF ..........

Posted on 2002-12-29 16:50:05 by lingo12
Natas: nope sorry exactly that will not work in WM_NOTIFY ;) at least it didn?t work for me on WinXP
yes i use now Radasm, used before all the time only a makefile and got now tired of it ;)

lingo12: thank u i will have a look on it @ home and try to understand it
Posted on 2002-12-29 23:57:17 by Allanon

Natas: nope sorry exactly that will not work in WM_NOTIFY ;) at least it didn?t work for me on WinXP
That sounds a bit wierd since Microsoft says that the message is sent through
WM_NOTIFY. Anyway, I provided that as an example not as as the working source.
Posted on 2002-12-30 05:13:11 by natas