Click here to Skip to main content
15,913,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCRichEdit and PreTranslateMessage Pin
Jahangir Jamshed26-Oct-03 21:20
sussJahangir Jamshed26-Oct-03 21:20 
GeneralRe: CRichEdit and PreTranslateMessage Pin
Steve S27-Oct-03 1:35
Steve S27-Oct-03 1:35 
GeneralRe: CRichEdit and PreTranslateMessage Pin
Anonymous27-Oct-03 8:56
Anonymous27-Oct-03 8:56 
GeneralCBitmap from file Pin
ImrShah Shehpori26-Oct-03 20:19
sussImrShah Shehpori26-Oct-03 20:19 
GeneralRe: CBitmap from file Pin
Jarek G26-Oct-03 23:40
Jarek G26-Oct-03 23:40 
QuestionHow to access mysql database using C Pin
samhita26-Oct-03 19:57
samhita26-Oct-03 19:57 
AnswerRe: How to access mysql database using C Pin
Florin Ochiana27-Oct-03 0:34
Florin Ochiana27-Oct-03 0:34 
QuestionCan anybody see what I'm doing wrong? Pin
Oinka26-Oct-03 18:30
Oinka26-Oct-03 18:30 
I'm using Visual C++ 6.0 SP5

I create a new MFC Appwizard project, I choose SDI with doc/view architecture support, then I leave everything at the defaults until it asks me How do you want your toolbars to look? and I choose Internet Explorer Rebars then finish.

In the resource editor under dialogs I edit the IDR_MAINFRAME dialog and add a button to it. I double click my newly created button to add an onclick handler. Classwizard pops up with a message saying IDR_MAINFRAME is a new resource... do you want to add a class for it? and I choose create a new class. Then I give this new class a name and leave everything at the defaults and push OK. Now I close Classwizard and go back to the resource editor and double click my button again to add the event handler. This time it prompts me for the name of the event handler and I just leave it as the default OnButton1. Then in the code for the event handler I just put something simple to test out the button like AfxMessageBox("bleah");

I run the program and the button is grayed out...

If I add an activex control to the dialog it will be enabled but the event handlers will be ignored.

anybody know why?

I am stumped...

since microsoft sucks I bet that the new dialog class it creates is somehow messed up but I'm a bit of a beginner so I can't really tell a messed up class from a good one and I can't tell a message map from my own butt.

Any ideas are appreciated.

-Oinka
AnswerRe: Can anybody see what I'm doing wrong? Pin
Roger Allen27-Oct-03 2:17
Roger Allen27-Oct-03 2:17 
GeneralThanks Roger! Pin
Oinka27-Oct-03 5:35
Oinka27-Oct-03 5:35 
GeneralDirectShow Problem: Error return 'E_INVALIDARG' when calling ICaptureGraphBuilder2::RenderStream Pin
Member 65339926-Oct-03 16:57
Member 65339926-Oct-03 16:57 
GeneralDesign question Pin
alex.barylski26-Oct-03 13:39
alex.barylski26-Oct-03 13:39 
GeneralRe: Design question Pin
Ravi Bhavnani26-Oct-03 13:57
professionalRavi Bhavnani26-Oct-03 13:57 
GeneralRe: Design question Pin
alex.barylski27-Oct-03 6:55
alex.barylski27-Oct-03 6:55 
GeneralCListCtrl DeleteItem Pin
Jarek G26-Oct-03 13:05
Jarek G26-Oct-03 13:05 
GeneralRe: CListCtrl DeleteItem Pin
Daniel132426-Oct-03 13:53
Daniel132426-Oct-03 13:53 
GeneralRe: CListCtrl DeleteItem Pin
Ravi Bhavnani26-Oct-03 13:54
professionalRavi Bhavnani26-Oct-03 13:54 
GeneralRe: CListCtrl DeleteItem Pin
Jarek G26-Oct-03 14:16
Jarek G26-Oct-03 14:16 
GeneralRe: CListCtrl DeleteItem Pin
Ravi Bhavnani26-Oct-03 14:39
professionalRavi Bhavnani26-Oct-03 14:39 
GeneralRe: CListCtrl DeleteItem Pin
Jarek G26-Oct-03 23:32
Jarek G26-Oct-03 23:32 
GeneralRe: CListCtrl DeleteItem Pin
Roger Allen27-Oct-03 2:21
Roger Allen27-Oct-03 2:21 
GeneralRe: CListCtrl DeleteItem Pin
David Crow27-Oct-03 4:46
David Crow27-Oct-03 4:46 
GeneralRe: CListCtrl DeleteItem Pin
Jarek G27-Oct-03 7:59
Jarek G27-Oct-03 7:59 
GeneralRe: CListCtrl DeleteItem Pin
Abin27-Oct-03 14:09
Abin27-Oct-03 14:09 
GeneralCPP question Pin
alex.barylski26-Oct-03 12:22
alex.barylski26-Oct-03 12:22 

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.