Click here to Skip to main content
15,849,129 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating Ico file Pin
Chernobog19-Nov-03 4:30
Chernobog19-Nov-03 4:30 
GeneralRe: Creating Ico file Pin
Ted Ferenc9-Nov-03 4:49
Ted Ferenc9-Nov-03 4:49 
GeneralRe: Creating Ico file Pin
Chernobog19-Nov-03 5:19
Chernobog19-Nov-03 5:19 
GeneralWhy EnumDisplaySettingsEx doesn't work Pin
w_yufeng9-Nov-03 1:13
w_yufeng9-Nov-03 1:13 
GeneralRe: Why EnumDisplaySettingsEx doesn't work Pin
vmaltsev9-Nov-03 4:52
vmaltsev9-Nov-03 4:52 
GeneralRe: Why EnumDisplaySettingsEx doesn't work Pin
w_yufeng9-Nov-03 15:19
w_yufeng9-Nov-03 15:19 
GeneralRe: Why EnumDisplaySettingsEx doesn't work Pin
Tim Smith9-Nov-03 15:41
Tim Smith9-Nov-03 15:41 
GeneralProblem with checkboxes in CListCtrl Pin
Dominik Reichl9-Nov-03 0:39
Dominik Reichl9-Nov-03 0:39 
Hi!

I am trying to use checkboxes in a CListCtrl. To simplify handling of the control, I've written the following short code:

void CGeneratorDlg::_SetCheck(int inxItem, BOOL bEnable)
{
  LV_ITEM _ms_lvi;
  _ms_lvi.stateMask = LVIS_STATEIMAGEMASK;
  _ms_lvi.state = (UINT)(((int)(bEnable) + 1) << 12);
  m_cList.SendMessage(LVM_SETITEMSTATE, (WPARAM)inxItem,
    (LPARAM)(LV_ITEM FAR *)&_ms_lvi);
}

BOOL CPwGeneratorDlg::_GetCheck(int inxItem)
{
  return ((((UINT)(m_cList.SendMessage(LVM_GETITEMSTATE, (WPARAM)inxItem,
    LVIS_STATEIMAGEMASK))) >> 12) - 1);
}
Those 2 functions seem to work nice but unfortunately when I call them in the OnInitDialog function they do nothing:
for(int i = 0; i < m_cList.GetItemCount(); i++)
  _SetCheck(i, TRUE);
This should check all checkboxes in the list. I do this in OnInitDialog function but it does just plain nothing. The checkboxes remain unchecked.

Any idea how to check the checkboxes in OnInitDialog? Confused | :confused:
Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)
(doesn't work on NT)

GeneralRe: Problem with checkboxes in CListCtrl Pin
Michael Dunn9-Nov-03 7:00
sitebuilderMichael Dunn9-Nov-03 7:00 
GeneralRe: Problem with checkboxes in CListCtrl Pin
Dominik Reichl9-Nov-03 7:13
Dominik Reichl9-Nov-03 7:13 
GeneralRe: Problem with checkboxes in CListCtrl Pin
peterchen9-Nov-03 11:39
peterchen9-Nov-03 11:39 
GeneralRe: Problem with checkboxes in CListCtrl Pin
Dominik Reichl10-Nov-03 2:17
Dominik Reichl10-Nov-03 2:17 
GeneralRe: Problem with checkboxes in CListCtrl Pin
peterchen10-Nov-03 2:27
peterchen10-Nov-03 2:27 
Generaldeleting directories with files Pin
r i s h a b h s8-Nov-03 23:54
r i s h a b h s8-Nov-03 23:54 
GeneralRe: deleting directories with files Pin
Dominik Reichl9-Nov-03 0:43
Dominik Reichl9-Nov-03 0:43 
GeneralPaint caption bar without flicker Pin
minhtriet8-Nov-03 22:49
minhtriet8-Nov-03 22:49 
GeneralRe: Paint caption bar without flicker Pin
Roger Allen10-Nov-03 2:10
Roger Allen10-Nov-03 2:10 
GeneralNeed help with SendMessage Pin
David Fleming8-Nov-03 20:48
David Fleming8-Nov-03 20:48 
GeneralRe: Need help with SendMessage Pin
Andrew Walker8-Nov-03 21:08
Andrew Walker8-Nov-03 21:08 
GeneralRe: Need help with SendMessage Pin
David Fleming9-Nov-03 17:40
David Fleming9-Nov-03 17:40 
GeneralRe: Need help with SendMessage Pin
User 66589-Nov-03 2:01
User 66589-Nov-03 2:01 
GeneralRe: Need help with SendMessage Pin
David Fleming9-Nov-03 17:48
David Fleming9-Nov-03 17:48 
GeneralRe: Need help with SendMessage Pin
Antti Keskinen10-Nov-03 9:27
Antti Keskinen10-Nov-03 9:27 
GeneralRe: Need help with SendMessage Pin
David Fleming10-Nov-03 19:05
David Fleming10-Nov-03 19:05 
GeneralHelp Me Please Pin
LOSTTWARE.com8-Nov-03 18:58
LOSTTWARE.com8-Nov-03 18:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.