Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Get a file icon for a given file type... Pin
Graham Bradshaw7-Sep-05 14:33
Graham Bradshaw7-Sep-05 14:33 
GeneralRe: Get a file icon for a given file type... Pin
Ian Bowler8-Sep-05 5:48
Ian Bowler8-Sep-05 5:48 
AnswerRe: Get a file icon for a given file type... Pin
David Crow8-Sep-05 3:22
David Crow8-Sep-05 3:22 
Questionprogram step into non defined area Pin
valerie997-Sep-05 12:25
valerie997-Sep-05 12:25 
AnswerRe: program step into non defined area Pin
zildjohn017-Sep-05 12:38
zildjohn017-Sep-05 12:38 
AnswerRe: program step into non defined area Pin
MailtoGops8-Sep-05 3:01
MailtoGops8-Sep-05 3:01 
QuestionAfxEndThread Pin
Anonymous7-Sep-05 12:23
Anonymous7-Sep-05 12:23 
AnswerRe: AfxEndThread Pin
ThatsAlok7-Sep-05 18:57
ThatsAlok7-Sep-05 18:57 
AnswerRe: AfxEndThread Pin
David Crow8-Sep-05 3:24
David Crow8-Sep-05 3:24 
Questiontemplates question Pin
zildjohn017-Sep-05 12:09
zildjohn017-Sep-05 12:09 
AnswerRe: templates question Pin
zildjohn017-Sep-05 15:34
zildjohn017-Sep-05 15:34 
QuestionIOCP & COM ports Pin
Member 18770927-Sep-05 11:32
Member 18770927-Sep-05 11:32 
QuestionCan I apply VC++6 code into VC++.NET code? Pin
uumeme7-Sep-05 9:50
uumeme7-Sep-05 9:50 
AnswerRe: Can I apply VC++6 code into VC++.NET code? Pin
Christian Graus7-Sep-05 13:15
protectorChristian Graus7-Sep-05 13:15 
QuestionAdding color to my dialog Pin
bugDanny7-Sep-05 9:02
bugDanny7-Sep-05 9:02 
AnswerRe: Adding color to my dialog Pin
Chris Losinger7-Sep-05 10:00
professionalChris Losinger7-Sep-05 10:00 
QuestionCalling All CListCtrl Experts Pin
Spoodles7-Sep-05 8:54
Spoodles7-Sep-05 8:54 
AnswerRe: Calling All CListCtrl Experts Pin
Mircea Puiu7-Sep-05 20:41
Mircea Puiu7-Sep-05 20:41 
GeneralRe: Calling All CListCtrl Experts Pin
Spoodles8-Sep-05 3:11
Spoodles8-Sep-05 3:11 
GeneralRe: Calling All CListCtrl Experts Pin
Mircea Puiu8-Sep-05 4:02
Mircea Puiu8-Sep-05 4:02 
QuestionUpdating CheckBoxes Pin
DanYELL7-Sep-05 5:08
DanYELL7-Sep-05 5:08 
AnswerRe: Updating CheckBoxes Pin
Mircea Puiu7-Sep-05 5:18
Mircea Puiu7-Sep-05 5:18 
GeneralRe: Updating CheckBoxes Pin
DanYELL7-Sep-05 5:57
DanYELL7-Sep-05 5:57 
One last question.

I put together this:

void SetCheckbox(int nID, bool state)
{
CButton *pCB = (CButton *)GetDlgItem(nID);
if (pCB)
pCB->SetCheck(state);

delete pCB;
}

and so I call:

SetCheckbox(IDC_CHECK20, 1);
SetCheckbox(IDC_CHECK21, 0);

But when I compile, I get this error:

error C2664: 'GetDlgItem' : cannot convert parameter 1 from 'int' to 'struct HWND__ *'

The function GetDlgItem takes 2-variables, int nID and HWND *phWnd. I tried using null for the 2nd variable (phWnd) but it
wont work. How can I clean this up to work?

Please, any response you can give me will be greatly appreciated.
I have alot of check boxes and need to condense.

Sincerely,
Danielle Brina (an overworked graduate student)
GeneralRe: Updating CheckBoxes Pin
bugDanny7-Sep-05 9:18
bugDanny7-Sep-05 9:18 
GeneralRe: Updating CheckBoxes Pin
Mircea Puiu7-Sep-05 20:09
Mircea Puiu7-Sep-05 20:09 

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.