Quote (justar)
Можно ли это сделать в сабже?
Code
#Include "window9.bi"
Dim Shared As HWND LWHwnd
Function windowproc(hwnd As HWND,msg As UINT,wParam As WPARAM,lParam As LPARAM) As Integer
Select Case msg
Case WM_NOTIFY
Dim nmlcd As LPNMLVCUSTOMDRAW = Cast(LPNMLVCUSTOMDRAW,lParam )
If nmlcd->nmcd.hdr.code = NM_CUSTOMDRAW Then
If nmlcd->nmcd.hdr.hWndFrom = LWHwnd Then
Select Case nmlcd->nmcd.dwDrawStage
Case CDDS_PREPAINT
Return CDRF_NOTIFYITEMDRAW
Case CDDS_ITEMPREPAINT
If nmlcd->nmcd.dwItemSpec = 0 Then
nmlcd->clrText = &h00ffff
nmlcd->clrTextBk = &h000FF0
ElseIf nmlcd->nmcd.dwItemSpec = 1 Then
nmlcd->clrText = &hFF0000
nmlcd->clrTextBk = &hFF00FF
EndIf
End Select
EndIf
EndIf
End Select
End Function
Var hwnd=OpenWindow("ColorLW",10,10,190,120)
Var Style= LVS_EX_FULLROWSELECT Or LVS_EX_GRIDLINES
LWHwnd=ListViewGadget(1,10,10,150,53,Style,,,0)
AddListViewColumn(1, "Столбец",0,1,150)
AddListViewItem(1,"1 строка",0,0,0)
AddListViewItem(1,"2 строка",0,1,0)
SetWindowCallback(@windowproc())
Do
Var event=WaitEvent()
If Event=EventClose Then End
Loop