473,385 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 I get several files that I don't understand. I also don't want the MFC window to appear when I run my application (not at this stage, at any rate). I would great appreciate some help in getting this going either in MFC or with another another library in C++.
Thanks!
-Matt
Jul 13 '07 #1
5 1509
weaknessforcats
9,208 Expert Mod 8TB
There is not requirement to show any of your windows. Just call ShowWindow() using your window handle and SW_HIDE. Check your docset for more options.

What files are don't you understand?

Any Windows application will have a stdafx.h, a resource.h, the resources themselves will be in a .rc file plus you will have various .cpp files for your source code.

Any other files are Visual Studio files used to manage your project.
Jul 13 '07 #2
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!
-Matt
Jul 13 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
Read this for information about your main().

Also, do you have a copy of "Programming Windows using MFC" by Jeff Prosisi?

Most of MFC is a wrapper of Win32, so you may want to get "Programming Windows" by Charles Petzold.

Most of your MFC classes have a HitTest() method you can use to see of the control has been clicked.
Jul 13 '07 #4
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
Jul 13 '07 #5
weaknessforcats
9,208 Expert Mod 8TB
You need Prosisi's book.
Jul 14 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: mattigiat | last post by:
Sorry for being such a newbie in this respect, but here's my question: I have Visual Studio, with VB6 ent., with msdn help installed. Is there any way to downgrade to just using the VB5 help, on...
2
by: Patrick Lim | last post by:
Here is the problem: I have written a non-modal frame class in Java for displaying help text when a user is using an application. It works as desired in that if the user selects "help" again,...
10
by: Jacek Generowicz | last post by:
Where can I find concise, clear documentation describing what one has to do in order to enable Python's internal help to be able to provide descriptions of Python keywords ? I am in a situation...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
12
by: Christo | last post by:
borland c++ 5.01 character constant must be one or two characters long get this when compiling my first c++ program can anyone out there help? it is highlighting this line as the problem ...
5
by: Steve Teeples | last post by:
Can someone point me to a document that clearly identifies the steps of creating a good help system for an application? I have a test tool that I'd like to add help to so that others will know how...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
5
by: sajin | last post by:
Hi All.. We are using VB .Net 2005 for implementing an API. API needs to generate events. For this client wants us to use Windows Callback (delegate implementation). The intention of using...
6
by: priyajohal | last post by:
#include<fstream.h> #include<process.h> #include<stdlib.h> #include<conio.h> #include<string.h> #include<dos.h> #include<ctype.h> #include<stdio.h> void setup() void help();
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.