I realized my mistake regarding MFC being classes and all; my question now is how to make the basic text input window appear (just like it would in a simple Hello World program). MFC seems to prevent it from opening somehow.
Thanks!
Matt
User Profile
Collapse
-
When I started the project, 4 source files and 4 header files were created; most of that code has little meaning to me. I also could not find a main anywhere in the code. I have a running program already built, but I want to add mouse functionality to it. Do I just paste the main function in the MFC source file? Once I get that working, I would appreciate the exact code I can use in my functions to get the cursor coordinates.
Thanks!...Leave a comment:
-
Help Using MFC
I have used MFC in MSVC++ 6.0, but I am overwhelmed by what happens when I try to start a new MFC project in Visual Studio 2005.
My program is very simple and only needs to get the coordinates of the mouse in realtime as I position a box on the screen.
When I started a project in MSVC++ 6.0, the extra files could essentially be ignored. In Visual Studio, I try to create the simplest project possible using MFC, and... -
-
You will need two streams to read and write to the file, if memory serves correctly. However, you could use a string to store every line you read using getline and then use a length function to find the length of the string (# of characters). That eliminates one stream. Hope that helps.Leave a comment:
-
-
ProgrammerMatt replied to what will happen, if we forget to return ostream referance in operator<<() function ?in CEvery action in C++ has a result and a side-effect. The result of cout << 5; is to return the ostream variable (cout). The side-effect is to put 5 into the ostream. Returning the ostream variable permits chaining multiple similar commands together. Without chaining, 3+4+5 is not possible; neither is cout << 3 << 4 << 5; If you return the ostream variable, the compiler takes several steps, first executing cout <<...Leave a comment:
-
Strange char pointer error
I searched for a similar error, and I didn't find any helpful references, so I'm trying not to post a redundant thread.
I am programming for my summer job using Microsoft Visual C++ 6.0, and a program is having a strange error with char pointers.
The following code worked correctly:
[code=c]
int testInt = 11;
int* Ptr = &testInt;
cout << *Ptr << endl << Ptr;
[...
No activity results to display
Show More
Leave a comment: