Click here to Skip to main content
16,005,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Error ??? Pin
BlackDice22-Oct-04 3:07
BlackDice22-Oct-04 3:07 
Generalmessage box problems in a dialog application Pin
Programmer_Chris22-Oct-04 1:59
Programmer_Chris22-Oct-04 1:59 
GeneralRe: message box problems in a dialog application Pin
V.22-Oct-04 3:20
professionalV.22-Oct-04 3:20 
GeneralRe: message box problems in a dialog application Pin
Programmer_Chris22-Oct-04 4:11
Programmer_Chris22-Oct-04 4:11 
GeneralRe: message box problems in a dialog application Pin
Tom Wright22-Oct-04 4:24
Tom Wright22-Oct-04 4:24 
GeneralRe: message box problems in a dialog application Pin
David Crow22-Oct-04 6:10
David Crow22-Oct-04 6:10 
GeneralMFC fetching value Pin
missnazar22-Oct-04 1:27
missnazar22-Oct-04 1:27 
GeneralRe: MFC fetching value Pin
David Crow22-Oct-04 3:35
David Crow22-Oct-04 3:35 
missnazar wrote:
(((CButton *)GetDlgItem(IDC_CHECK_SUBFOLDER))->GetCheck() == 1);

It's never a good idea to use hard-coded values like this. Compare against BST_CHECKED instead. That's not the cause of the access violation, however.

Rather than lump all that into one convoluted statement that makes debugging rather difficult, how about breaking it up into something like:

CButton *pButton = (CButton *) GetDlgItem(IDC_CHECK_SUBFOLDER);
if (NULL != pButton)
{
    if (pButton->GetCheck() == BST_CHECKED)
        ;
}
Now you can get a better idea as to where it's failing.


"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow


GeneralRe: MFC fetching value Pin
Malcolm Smart22-Oct-04 10:09
Malcolm Smart22-Oct-04 10:09 
GeneralRe: MFC fetching value Pin
David Crow22-Oct-04 10:14
David Crow22-Oct-04 10:14 
Generalowner drawn CEdit Pin
GDavy22-Oct-04 1:25
GDavy22-Oct-04 1:25 
GeneralRe: owner drawn CEdit Pin
Roger Allen22-Oct-04 7:17
Roger Allen22-Oct-04 7:17 
Generalethernet-card choice Pin
Musen8022-Oct-04 0:42
Musen8022-Oct-04 0:42 
GeneralRe: ethernet-card choice Pin
Alexander M.,22-Oct-04 10:09
Alexander M.,22-Oct-04 10:09 
GeneralRe: ethernet-card choice Pin
Musen8025-Oct-04 0:34
Musen8025-Oct-04 0:34 
QuestionBest approach for image work? GDI+, DirectX or something else? Pin
srev22-Oct-04 0:15
srev22-Oct-04 0:15 
AnswerRe: Best approach for image work? GDI+, DirectX or something else? Pin
David Chamberlain22-Oct-04 3:57
David Chamberlain22-Oct-04 3:57 
GeneralRe: Best approach for image work? GDI+, DirectX or something else? Pin
srev22-Oct-04 4:24
srev22-Oct-04 4:24 
GeneralRe: Best approach for image work? GDI+, DirectX or something else? Pin
David Chamberlain22-Oct-04 4:40
David Chamberlain22-Oct-04 4:40 
GeneralControl over the PopertySheet Pin
Cedric Moonen21-Oct-04 23:58
Cedric Moonen21-Oct-04 23:58 
GeneralRe: Control over the PopertySheet Pin
Blake Miller22-Oct-04 4:14
Blake Miller22-Oct-04 4:14 
Generalrelation between Mouse event and show in taskbar Pin
yu-yu21-Oct-04 23:52
yu-yu21-Oct-04 23:52 
Generaldisplay bitmap on a control botton. Pin
Ibana21-Oct-04 23:26
Ibana21-Oct-04 23:26 
GeneralRe: display bitmap on a control botton. Pin
Ivan Cachicatari22-Oct-04 3:44
Ivan Cachicatari22-Oct-04 3:44 
Questionhow to use wave file in vc++ Pin
vc-programmer-21-Oct-04 21:28
vc-programmer-21-Oct-04 21:28 

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.