Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making a win32 application

Status
Not open for further replies.

haktekvc

Technical User
Dec 30, 2000
17
0
0
GB
I try to make a win32 application and add a resource so i can add a dialog but when i right click on the dialog i click on classwizard and create a class for the dialog called COne. then it makes One.cpp &amp; One.h but when i build it it says cannot find file <ResourceName>.h
(<ResourceName> = file name of resource) so i add resource.h to the header folder and then i build again and it says it has 18 Errors. Why is this happening is there another why of making a class for the dialog if so please tell me the code and can whoever is answering this tell me how to open a dialog with code at the start of the main .CPP file.

A MILLION THANX TO ANY ANSWERS THAT WORK!!!!!!!!
 
> and add a resource so i can add a dialog

Not sure what that means. You should just go into the resource editor and add a 'new' dialog. Then proceed as you did with class wizard to create the class for the dialog.

I can't tell for sure but it sounds like you may have added a new resource file first. You don't need to do that there is already one in your project.

Hope this helps
-pete
 
Ok if you didn't understand what i said i'll try and make it a bit clearer i'm only 13.
I make a simple win32 application called &quot;Haktek&quot;
Then i make a resource called &quot;Haktek_r&quot;.
Then i add a dialog called IDD_DIALOG1.
Then i right click on IDD_DIALOG1 when in drag &amp; drop view.
And i click on Classwizard.
It says cannot find &quot;Haktek_r.clw&quot; would you like to create a new class i click yes.
Then a window comes up saying to choose a file so i click on the main file &quot;haktek.cpp&quot;
Then it opens up the classwizard.
So then i build the program &quot;haktek.exe&quot;
Then an error comes up saying cannot find &quot;Haktek_r.h&quot; no such file of directory.
So then i add the file resource.h to the header folder and rename it to Haktek_r.h&quot;
Then i build it again now that error saying cannot find &quot;Haktek_r.h&quot; has gone.
now 18 errors come up saying missing &quot;;&quot; ,undeclared function, undefined function and loads of other errors.
I don't want to make MFC application becuase they need a file called &quot;MFC42D.DLL&quot; And when i go into project setting the is a combo box called Microsoft Foundation Classes
with only one option &quot;Use MFC in a shared dll&quot; but does not give an option saying &quot;do not use MFC&quot;.
Is there a way of getting this option.
please help me on both questions.
 
> make it a bit clearer i'm only 13.

Your doing great for 13. This type of problem is very hard to chase down without being there, no matter how old you are.

> don't want to make MFC application because they need a file called &quot;MFC42D.DLL&quot;

That is not entirely accurate. You can make a static link MFC project which puts all of the mfc object code into your .exe and removes the dependency on the DLL. If that is your only reason for not using MFC then I would go back and start an MFC project.

Again, when you create an MFC App Wizard project it will already have a resource file included. When you want to add a dialog to your project DO NOT create a new resource file, just add a new dialog to the App Wizard generated resource by using the resource editor.

> Then i build it again now that error saying cannot find &quot;Haktek_r.h&quot;
> has gone. now 18 errors come up saying missing &quot;;&quot; ,undeclared function, undefined
> function and loads of other errors.

It does not sound as though all the errors are related to your previous problems with the resource file. In fact perhaps none of them are. They sound like common C++ syntax errors etc.

Having a missing ';' can cause the parser to report many other errors following the semicolon error. Fix that first and recompile.

How well do you know C++?

-pete
 
I don't know C++ that much i had it for christmas
I had VB5 for about 2 months before christmas
and before that i had delphi 3 which wasn't that bad
Back to the question
when you said there is already a resource there is not
i was makeing a win32 appwizard not MFC appwizard.
and could you explain how to make an MFC appwizard without the exe needing MFC42D.DLL.%-(

 
If you are using <> change to &quot;&quot; e.g.

include &quot;one.h&quot;

not

include <one.h>

Good luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top