I do not want to misguide anyone responding, I am a newbie to the C++ arena.
I am just doing little starter programs to figure things out, but for the life of me I don't get the whole hInstance thing.
The objective I have is to learn C++, write a program for windows that will connect to and use an SQL server database.
My confusion starts in the
int WinMain (??, ??, ??) function...
So could someone explain in newbie english for me, thanks.
twooften 0 Newbie Poster
Recommended Answers
Jump to PostIf you need help with some code, it would help a lot if you would post an example of the code you are having problems with. Otherwise, I don't see how anyone can help you!
Hoppy
Jump to PostThe program you are discussing is a Windows program which uses Win32 API library.
In resource.h you may get error if you havn't left a blank line at the end.
If you dont know what hInstance or WinMain is, then I doubt you know nothing in Windows programming, …
Jump to Post>> am a newbie to the C++ arena
attempting to write a windows program is NOT a good way to learn c++ language because it is too advanced. Start with something a lot simpler and work your way up from there.
Jump to Postremove the #include of the resource script from your main.cpp
//main.cpp #include <windows.h> #include "resource.h" //#include "Untitled.rc" // ...
Jump to Postare you doing this on your own or are you reading some tutorial? Read chaper 5 of this tutorial for help on how to include resource files in a project.
All 17 Replies
hopalongcassidy 35 Junior Poster
twooften 0 Newbie Poster
hopalongcassidy 35 Junior Poster
twooften 0 Newbie Poster
twooften 0 Newbie Poster
hopalongcassidy 35 Junior Poster
twooften 0 Newbie Poster
hopalongcassidy 35 Junior Poster

GreenDay2001
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
twooften 0 Newbie Poster
vijayan121 1,152 Posting Virtuoso
twooften 0 Newbie Poster
twooften 0 Newbie Poster
twooften 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
twooften 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.