本文整理匯總了Golang中github.com/lxn/win.LVCOLUMN類的典型用法代碼示例。如果您正苦於以下問題:Golang LVCOLUMN類的具體用法?Golang LVCOLUMN怎麽用?Golang LVCOLUMN使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了LVCOLUMN類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: create
func (tvc *TableViewColumn) create() error {
var lvc win.LVCOLUMN
index := tvc.indexInListView()
lvc.Mask = win.LVCF_FMT | win.LVCF_WIDTH | win.LVCF_TEXT | win.LVCF_SUBITEM
lvc.ISubItem = index
lvc.PszText = syscall.StringToUTF16Ptr(tvc.TitleEffective())
if tvc.width > 0 {
lvc.Cx = int32(tvc.width)
} else {
lvc.Cx = 100
}
switch tvc.alignment {
case AlignCenter:
lvc.Fmt = 2
case AlignFar:
lvc.Fmt = 1
}
j := tvc.tv.SendMessage(win.LVM_INSERTCOLUMN, uintptr(index), uintptr(unsafe.Pointer(&lvc)))
if int(j) == -1 {
return newError("TableView.SetModel: Failed to insert column.")
}
return nil
}
示例2: getLVCOLUMN
func (tvc *TableViewColumn) getLVCOLUMN() *win.LVCOLUMN {
var lvc win.LVCOLUMN
lvc.Mask = win.LVCF_FMT | win.LVCF_WIDTH | win.LVCF_TEXT | win.LVCF_SUBITEM
lvc.ISubItem = int32(tvc.indexInListView())
lvc.PszText = syscall.StringToUTF16Ptr(tvc.TitleEffective())
lvc.Cx = int32(tvc.width)
switch tvc.alignment {
case AlignCenter:
lvc.Fmt = 2
case AlignFar:
lvc.Fmt = 1
}
return &lvc
}