Click here to Skip to main content
15,905,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBeginning MFC (Prosise) Part III - Now What? :: C++ Pin
valikac1-Mar-02 14:49
valikac1-Mar-02 14:49 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 14:57
sitebuilderNish Nishant1-Mar-02 14:57 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 15:32
protectorChristian Graus1-Mar-02 15:32 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
valikac1-Mar-02 16:03
valikac1-Mar-02 16:03 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 16:19
protectorChristian Graus1-Mar-02 16:19 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 16:35
sitebuilderNish Nishant1-Mar-02 16:35 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
valikac1-Mar-02 17:34
valikac1-Mar-02 17:34 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 17:49
protectorChristian Graus1-Mar-02 17:49 
kuphryn wrote:
I will begin with one general issue. I am not exactly sure where to map command and command UI, but most important, messages in general.

Mainframe and documents can only handle command/UI messages. I cannot decide where to map command/UI mainframe, view, or documents.


Messages are generally mapped in the class that relates to them - in other words, map messages to do with loading and saving files in your document class, map paint messages in your view or dialog class. As far as internal messages go, it's a non-issue because the class wizard will only show you the messages you can use anyhow.

Command/UI messages should be mapped in the mainframe, because it's always there to process them, a view or document may not be.

kuphryn wrote:
The last issue I am not certain of is all the painting tools. Promise discussed a lot of core materials in the first five chapters. I lost sight of all th painting tools along the way.

Well, which paint tools do you need to know about ? Painting always occurs in OnEraseBackground, OnPaint, OnDraw, or OnPrepareDC, and I'd suggest all the different tools, such as ExtFloodFill, Polygon, etc. are stuff you can learn one by one as you need them.

kuphryn wrote:
Yes, I read everything very carefully. There were just too many new materials to remember without having any prior knowledge MFC to use each tool as Prosise present it. When I was learning C++, I was able to read the new material and immediately apply it in a real program. That is how I learn, and it is when I am at my best. With MFC, I learn that "k" is a letter, but that is it. I have no idea that "i" and "j" are before and after "k."

As an example, once you know that OnPaint is where a dialog is drawn, why can't you create a vanilla dialog app, override OnPaint and experiment, even though you have no idea how the framework gets to the point of processing that message ?

kuphryn wrote:
Now, the program I am working on has to do with read data from a text file, analyze the data, and output the modified data back to the file. For example, the program will read "a" and output "Letter: A."

I am not sure the exact CView I need (scroll, edit, etc.). I am not sure what message I need to consider and what to map them. In general, I am not ready to implement the win32 console program to windows using MFC.


First of all I would still use std iostreams to read the file, and then I would read it in and store it in a vector. The only bit you need to learn then is how to display it, and the right place for that is OnPaint, using the TextOut function.

Is there a CEditView ? A CView will be fine for starters, then you should try it with a scroll view to see how scrolling is implimented.

Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
valikac1-Mar-02 18:01
valikac1-Mar-02 18:01 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 19:53
protectorChristian Graus1-Mar-02 19:53 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 19:58
sitebuilderNish Nishant1-Mar-02 19:58 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 20:17
protectorChristian Graus1-Mar-02 20:17 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 20:25
sitebuilderNish Nishant1-Mar-02 20:25 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 20:26
sitebuilderNish Nishant1-Mar-02 20:26 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 20:27
protectorChristian Graus1-Mar-02 20:27 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 20:42
sitebuilderNish Nishant1-Mar-02 20:42 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
alex.barylski1-Mar-02 16:38
alex.barylski1-Mar-02 16:38 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 16:55
protectorChristian Graus1-Mar-02 16:55 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Paul M Watt1-Mar-02 20:44
mentorPaul M Watt1-Mar-02 20:44 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 21:03
protectorChristian Graus1-Mar-02 21:03 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
alex.barylski2-Mar-02 8:48
alex.barylski2-Mar-02 8:48 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Imran Farooqui1-Mar-02 20:21
Imran Farooqui1-Mar-02 20:21 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Christian Graus1-Mar-02 20:28
protectorChristian Graus1-Mar-02 20:28 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Imran Farooqui1-Mar-02 20:39
Imran Farooqui1-Mar-02 20:39 
GeneralRe: Beginning MFC (Prosise) Part III - Now What? :: C++ Pin
Nish Nishant1-Mar-02 20:47
sitebuilderNish Nishant1-Mar-02 20:47 

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.