473,406 Members | 2,843 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,406 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 1510
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();
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.