CONST LVM_SETCOLUMN = 4122
CONST LVCF_FMT = 1
CONST LVCF_WIDTH = 2
CONST LVCF_TEXT = 4
CONST LVCF_SUBITEM = 8
CONST LVCFMT_LEFT = 0
CONST LVCFMT_RIGHT = 1
CONST LVCFMT_CENTER = 2
CONST LVCFMT_JUSTIFYMASK = 3
TYPE tLVCOLUMN
mask AS LONG
fmt AS LONG
cx AS LONG
pszText AS STRING * 16
cchTextMax AS LONG
iSubItem AS LONG
iImage AS LONG
iOrder AS LONG
END TYPE
DECLARE FUNCTION SM LIB "user32" ALIAS "SendMessageA" _
(BYVAL hwnd AS LONG, _
BYVAL wMsg AS LONG, _
BYVAL wParam AS INTEGER, _
BYVAL lParam AS LONG _
) AS LONG
DECLARE FUNCTION RedrawWin LIB "user32" ALIAS "RedrawWindow" _
(BYVAL hwnd AS LONG, _
lprcUpdate AS LONG, _
BYVAL hrgnUpdate AS LONG, _
BYVAL fuRedraw AS LONG _
) AS LONG
SUB QLValignment(Sender AS QLISTVIEW, ColAlign AS INTEGER, LeftCenterRight AS INTEGER)
DIM LvColumn AS tLVCOLUMN
LvColumn.mask = LVCF_FMT
LvColumn.fmt = LeftCenterRight
SM (Sender.Handle, LVM_SETCOLUMN, ColAlign, LvColumn)
RedrawWin (Sender.Handle, 0, 0, 1)
END SUB
|