Click here to Skip to main content
15,924,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralText Highlighting in CRichEditView Pin
Anonymous13-Jul-03 22:10
Anonymous13-Jul-03 22:10 
GeneralList controls with check boxes Pin
YaronNir13-Jul-03 21:56
YaronNir13-Jul-03 21:56 
GeneralRe: List controls with check boxes Pin
Ryan Binns13-Jul-03 23:06
Ryan Binns13-Jul-03 23:06 
GeneralRe: List controls with check boxes Pin
YaronNir13-Jul-03 23:12
YaronNir13-Jul-03 23:12 
GeneralRe: List controls with check boxes Pin
Ryan Binns13-Jul-03 23:21
Ryan Binns13-Jul-03 23:21 
GeneralRe: List controls with check boxes Pin
YaronNir14-Jul-03 1:07
YaronNir14-Jul-03 1:07 
GeneralRe: List controls with check boxes Pin
YaronNir14-Jul-03 1:07
YaronNir14-Jul-03 1:07 
GeneralRe: List controls with check boxes Pin
Ryan Binns14-Jul-03 1:38
Ryan Binns14-Jul-03 1:38 
I'll have a go Smile | :)
LRESULT CMyDlg::OnListItemChanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
   NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pnmh;

   HWND hwndLV = pnmh->hwndFrom;  // List view handle

   // Get the current check state
   int iState = ListView_GetCheckState(hwndLV, pNMListView->iItem);

   // Loop through the selected items
   int iItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
   while(iItem >= 0)
   {
      ListView_SetItemState(hwndLV, iItem, INDEXTOSTATEIMAGEMASK(iState+1), LVIS_STATEIMAGEMASK);
      iItem = ListView_GetNextItem(hwndLV, iItem, LVNI_SELECTED);
   }

   return 0;
}
Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralRe: List controls with check boxes Pin
YaronNir14-Jul-03 1:46
YaronNir14-Jul-03 1:46 
GeneralRe: List controls with check boxes Pin
Ryan Binns14-Jul-03 1:49
Ryan Binns14-Jul-03 1:49 
Question??? Pin
DaveE9th13-Jul-03 21:08
DaveE9th13-Jul-03 21:08 
AnswerRe: ??? Pin
Cedric Moonen13-Jul-03 21:51
Cedric Moonen13-Jul-03 21:51 
AnswerRe: ??? Pin
jhwurmbach13-Jul-03 22:02
jhwurmbach13-Jul-03 22:02 
GeneralRe: ??? Pin
DaveE9th13-Jul-03 22:25
DaveE9th13-Jul-03 22:25 
AnswerRe: ??? Pin
Miszou14-Jul-03 9:58
Miszou14-Jul-03 9:58 
GeneralRe: ??? Pin
Anthony_Yio15-Jul-03 1:07
Anthony_Yio15-Jul-03 1:07 
GeneralIR data entry system Pin
teanomilk13-Jul-03 20:32
teanomilk13-Jul-03 20:32 
GeneralRe: IR data entry system Pin
jan larsen14-Jul-03 2:34
jan larsen14-Jul-03 2:34 
GeneralCallBack Function Pin
rohit.dhamija13-Jul-03 19:46
rohit.dhamija13-Jul-03 19:46 
GeneralRe: CallBack Function Pin
Tibor Blazko13-Jul-03 19:59
Tibor Blazko13-Jul-03 19:59 
GeneralRe: CallBack Function Pin
Ryan Binns13-Jul-03 22:51
Ryan Binns13-Jul-03 22:51 
General!strcmp Pin
DaveE9th13-Jul-03 19:37
DaveE9th13-Jul-03 19:37 
GeneralRe: !strcmp Pin
Tibor Blazko13-Jul-03 20:03
Tibor Blazko13-Jul-03 20:03 
GeneralRe: !strcmp Pin
Xander8013-Jul-03 20:10
Xander8013-Jul-03 20:10 
GeneralRe: !strcmp Pin
DaveE9th13-Jul-03 21:04
DaveE9th13-Jul-03 21:04 

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.