Click here to Skip to main content
       

C / C++ / MFC

 
AnswerRe: can i use mem_fun like this? Pingroupgoumuli2-Dec-12 7:21 
AnswerRe: can i use mem_fun like this? PinmemberStefan_Lang3-Dec-12 3:14 
AnswerRe: can i use mem_fun like this? PinmemberStefan_Lang3-Dec-12 4:45 
GeneralRe: can i use mem_fun like this? PinmemberFalconapollo4-Dec-12 15:43 
Questionclient server for running the program Pinmemberdanielsutopo1-Dec-12 16:09 
AnswerRe: client server for running the program PinmemberAlbert Holguin1-Dec-12 18:22 
QuestionLimiting selected checkbox items in a CListCtrl Pinmembersoftwaremonkey1-Dec-12 2:40 
SuggestionRe: Limiting selected checkbox items in a CListCtrl PinmemberDavidCrow1-Dec-12 4:51 
softwaremonkey wrote:
because in changing the state of an item, it causes OnItemchangingLoadingValues() to be called again.
But the parameters (i.e., state) passed each time are different.
 
Rather than use a for() loop each time an item's state changes, simply check the state passed and use a counter. Then in OnItemchangingLoadingValues(), you could have something like:
 
void CSpecimenLoadingDialog::OnItemchangingLoadingValues(NMHDR* pNMHDR, LRESULT* pResult)
{
    if (nCheckedItems < 2)
    {
        if (pNMHDR's new state equals checked)
            nCheckedItems++;
        else
            nCheckedItems--;
    }
}

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


AnswerRe: Limiting selected checkbox items in a CListCtrl PinmemberJochen Arndt2-Dec-12 0:56 
GeneralRe: Limiting selected checkbox items in a CListCtrl Pinmembersoftwaremonkey2-Dec-12 23:45 
QuestionUsing VISUAL C++ 6.0 with OLE PinmemberForNow30-Nov-12 10:06 
AnswerRe: Using VISUAL C++ 6.0 with OLE Pinmemberjschell30-Nov-12 11:46 
SuggestionRe: Using VISUAL C++ 6.0 with OLE PinmemberDavidCrow30-Nov-12 15:24 
GeneralRe: Using VISUAL C++ 6.0 with OLE PinmemberForNow4-Dec-12 14:48 
AnswerRe: Using VISUAL C++ 6.0 with OLE PinmemberStephen Hewitt2-Dec-12 5:54 
AnswerRe: Using VISUAL C++ 6.0 with OLE PinmemberCristian Amarie3-Dec-12 9:52 
QuestionDll injection and hooking Pinmemberminiman0630-Nov-12 8:47 
AnswerRe: Dll injection and hooking Pinmemberminiman061-Dec-12 20:01 
Questionsimple program in linux doesnt work Pinmembera1_shay29-Nov-12 23:59 
AnswerRe: simple program in linux doesnt work PinmemberGraham Breach30-Nov-12 1:24 
GeneralRe: simple program in linux doesnt work Pinmembera1_shay30-Nov-12 2:43 
AnswerRe: simple program in linux doesnt work Pinmemberjschell30-Nov-12 11:49 
QuestionRead binary File Pinmemberyogeshs29-Nov-12 0:05 
AnswerRe: Read binary File PinmvpRichard MacCutchan29-Nov-12 0:14 
AnswerRe: Read binary File PinmemberFreak3029-Nov-12 0:18 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 23 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid