ToggleCheck(hWnd, dwIndex);
ToggleCheck(hWnd, dwIndex, gdwACFlag);
LRESULT CALLBACK NewListBoxWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){  DWORD       dwPosX;  DWORD       dwPosY;  DWORD       dwIndex;  switch(uMsg)  {    case WM_CHAR:      /* check for the space key */      if((TCHAR)wParam == 32)      {        dwIndex = SendMessage(hWnd,                              LB_GETCURSEL,                              0,                              0);        ToggleCheck(hWnd, dwIndex);      }      break;    case WM_LBUTTONDOWN:      if(wParam == MK_LBUTTON)      {        dwPosX = LOWORD(lParam); // x pos        dwPosY = HIWORD(lParam); // y pos        if((dwPosX > 1) && (dwPosX <= CX_CHECKBOX))        {          dwIndex = LOWORD(SendMessage(hWnd,                                       LB_ITEMFROMPOINT,                                       0,                                       (LPARAM)MAKELPARAM(dwPosX, dwPosY)));          ToggleCheck(hWnd, dwIndex);        }      }      break;  }  return(CallWindowProc(OldListBoxWndProc, hWnd, uMsg, wParam, lParam));}