I need to resize my listview in function of the main window .. ?how? .. i try
.ELSEIF uMsg == WM_SIZE
invoke GetWindowRect, hWnd, ADDR rc
invoke GetWindowRect, hListView, ADDR rc2
mov eax, rc.bottom
sub eax, rc2.bottom
mov edx, rc2.bottom
add edx,eax
invoke SetWindowPos, hListView, 0, 1, 28, lParam, edx, SWP_NOACTIVATE or SWP_NOZORDER
but not work at all beacuse i need to "skip" the status bar ...
then i try:
sub edx,10 .. 20 . .30 . .40 ...
please help ... dont work at all...
.ELSEIF uMsg == WM_SIZE
invoke GetWindowRect, hWnd, ADDR rc
invoke GetWindowRect, hListView, ADDR rc2
mov eax, rc.bottom
sub eax, rc2.bottom
mov edx, rc2.bottom
add edx,eax
invoke SetWindowPos, hListView, 0, 1, 28, lParam, edx, SWP_NOACTIVATE or SWP_NOZORDER
but not work at all beacuse i need to "skip" the status bar ...
then i try:
sub edx,10 .. 20 . .30 . .40 ...
please help ... dont work at all...
ChangeListBoxSize proc lParam:DWORD
LOCAL StatusbarRect:RECT
LOCAL ListBoxRect:RECT
invoke GetWindowRect,hStatus,addr StatusbarRect
Mov ListBoxRect.left,0
mov ListBoxRect.top,0 ; no toolbar
mov eax,lParam ; low order of lParam = new width, high order = new height
and eax,0ffffh
mov ListBoxRect.right,eax
mov eax,lParam ; high order of lParam = new height
shr eax,16
mov edx,StatusbarRect.bottom ; bottom = new height - ((taskbar.bottom - taskbar.top)
mov ecx,StatusbarRect.top
sub edx,ecx ; edx=hoogte taskbar = 14h of 20d pixels
sub eax,edx ; nieuwe windowhoogte-hoogte taskbar
mov ListBoxRect.bottom,eax
invoke SetWindowPos,hListBox,NULL,ListBoxRect.left,ListBoxRect.top,ListBoxRect.right,ListBoxRect.bottom, SWP_NOZORDER
ret
ChangeListBoxSize endp