Is there any way to just LOCK the column widths?

Code: Select all
Procedure WindowCallback(hWnd,uMsg,wParam,lParam)
Select uMsg
Case #WM_NOTIFY
*lpnm.NMHDR = lParam
If *lpnm\hwndFrom = GetWindow_(GadgetID(0),#GW_CHILD) And *lpnm\code = #HDN_BEGINTRACK
ProcedureReturn 1
EndIf
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
OpenWindow(0,0,0,320,240,"void",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
ListIconGadget(0,0,0,320,240,"Name",160)
AddGadgetColumn(0,1,"Type",80)
AddGadgetColumn(0,1,"Size",60)
SetWindowCallback(@WindowCallback())
While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend
Code: Select all
OpenWindow(0,0,0,320,240,"void",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
ListIconGadget(0,0,0,320,240,"Name",160)
AddGadgetColumn(0,1,"Type",80)
AddGadgetColumn(0,1,"Size",60)
header = SendMessage_(GadgetID(0),#LVM_GETHEADER,0,0)
Repeat
ev = WaitWindowEvent(1)
GetWindowRect_(header, @wr.rect)
If PtInRect_(wr, DesktopMouseX(),DesktopMouseY())
ShowWindow_(header, #SW_HIDE)
dc = GetDC_(GadgetID(0))
TextOut_(dc, 100,0, PeekS(?begin), 15)
ReleaseDC_(GadgetID(0),dc)
Else
ShowWindow_(header, #SW_SHOW)
EndIf
Until ev = #WM_CLOSE
DataSection
begin:
Data.q 7453301692552738114,9400190730641523
Code: Select all
BOOL PtInRect(
CONST RECT *lprc, // rectangle
POINT pt // point
);