nyke0 Posted September 8, 2014 Posted September 8, 2014 I don't mean a full row or column, a Item only. I found some splutions, but it seems they don't work anymore.
funkey Posted September 8, 2014 Posted September 8, 2014 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
nyke0 Posted September 11, 2014 Author Posted September 11, 2014 dont work for me, its just white background with black font color
jguinch Posted September 11, 2014 Posted September 11, 2014 Helping with Mikell's code >here : expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 350, 250, -1, -1) $ListView1 = GUICtrlCreateListView("Header|Header|Header", 0, 0, 350, 250) GuiCtrlCreateListViewItem('Black|Black|Black',$ListView1) GuiCtrlCreateListViewItem('Black|GREEN?|Black',$ListView1) GuiCtrlCreateListViewItem('Black|Black|Black',$ListView1) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") $hListView = GuiCtrlGetHandle($ListView1) Switch $hWndFrom Case $hListView Switch $iCode Case $NM_CUSTOMDRAW Local $tCustDraw = DllStructCreate($tagNMLVCUSTOMDRAW, $lParam) Local $iDrawStage = DllStructGetData($tCustDraw, "dwDrawStage") If $iDrawStage = $CDDS_PREPAINT Then Return $CDRF_NOTIFYITEMDRAW If $iDrawStage = $CDDS_ITEMPREPAINT Then Return $CDRF_NOTIFYSUBITEMDRAW Local $iSubItem = DllStructGetData($tCustDraw, "iSubItem") Local $iItem = DllStructGetData($tCustDraw, "dwItemSpec") Local $iColor, $iColor2 = RGB2BGR(0xFFFFFF) If $iItem = 1 and $iSubItem = 1 Then $iColor = RGB2BGR(0x00cc00) $iColor2 = RGB2BGR(0xcc00cc) EndIf DllStructSetData($tCustDraw, "clrText", $iColor) ; text color DllStructSetData($tCustDraw, "clrTextBk", $iColor2) ; background color Return $CDRF_NEWFONT EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func RGB2BGR($iColor) Return BitAND(BitShift(String(Binary($iColor)), 8), 0xFFFFFF) EndFunc ;==>RGB2BGR() Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now