Click here to Skip to main content
15,886,737 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating Ico file Pin
Chernobog19-Nov-03 3:30
Chernobog19-Nov-03 3:30 
GeneralRe: Creating Ico file Pin
Ted Ferenc9-Nov-03 3:49
Ted Ferenc9-Nov-03 3:49 
GeneralRe: Creating Ico file Pin
Chernobog19-Nov-03 4:19
Chernobog19-Nov-03 4:19 
GeneralWhy EnumDisplaySettingsEx doesn't work Pin
w_yufeng9-Nov-03 0:13
w_yufeng9-Nov-03 0:13 
GeneralRe: Why EnumDisplaySettingsEx doesn't work Pin
vmaltsev9-Nov-03 3:52
vmaltsev9-Nov-03 3:52 
GeneralRe: Why EnumDisplaySettingsEx doesn't work Pin
w_yufeng9-Nov-03 14:19
w_yufeng9-Nov-03 14:19 
GeneralRe: Why EnumDisplaySettingsEx doesn't work Pin
Tim Smith9-Nov-03 14:41
Tim Smith9-Nov-03 14:41 
GeneralProblem with checkboxes in CListCtrl Pin
Dominik Reichl8-Nov-03 23:39
Dominik Reichl8-Nov-03 23: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 6:00
sitebuilderMichael Dunn9-Nov-03 6:00 
GeneralRe: Problem with checkboxes in CListCtrl Pin
Dominik Reichl9-Nov-03 6:13
Dominik Reichl9-Nov-03 6:13 
GeneralRe: Problem with checkboxes in CListCtrl Pin
peterchen9-Nov-03 10:39
peterchen9-Nov-03 10:39 
GeneralRe: Problem with checkboxes in CListCtrl Pin
Dominik Reichl10-Nov-03 1:17
Dominik Reichl10-Nov-03 1:17 
GeneralRe: Problem with checkboxes in CListCtrl Pin
peterchen10-Nov-03 1:27
peterchen10-Nov-03 1:27 
Generaldeleting directories with files Pin
r i s h a b h s8-Nov-03 22:54
r i s h a b h s8-Nov-03 22:54 
GeneralRe: deleting directories with files Pin
Dominik Reichl8-Nov-03 23:43
Dominik Reichl8-Nov-03 23:43 
GeneralPaint caption bar without flicker Pin
minhtriet8-Nov-03 21:49
minhtriet8-Nov-03 21:49 
GeneralRe: Paint caption bar without flicker Pin
Roger Allen10-Nov-03 1:10
Roger Allen10-Nov-03 1:10 
GeneralNeed help with SendMessage Pin
David Fleming8-Nov-03 19:48
David Fleming8-Nov-03 19:48 
GeneralRe: Need help with SendMessage Pin
Andrew Walker8-Nov-03 20:08
Andrew Walker8-Nov-03 20:08 
GeneralRe: Need help with SendMessage Pin
David Fleming9-Nov-03 16:40
David Fleming9-Nov-03 16:40 
GeneralRe: Need help with SendMessage Pin
User 66589-Nov-03 1:01
User 66589-Nov-03 1:01 
GeneralRe: Need help with SendMessage Pin
David Fleming9-Nov-03 16:48
David Fleming9-Nov-03 16:48 
GeneralRe: Need help with SendMessage Pin
Antti Keskinen10-Nov-03 8:27
Antti Keskinen10-Nov-03 8:27 
GeneralRe: Need help with SendMessage Pin
David Fleming10-Nov-03 18:05
David Fleming10-Nov-03 18:05 
GeneralHelp Me Please Pin
LOSTTWARE.com8-Nov-03 17:58
LOSTTWARE.com8-Nov-03 17: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.