|
-
Aug 9th, 2002, 10:41 AM
#1
Thread Starter
Ya ya Baby!!!Me is Back
Visual C++ question
I have read some of the tutorial at :http://www.winprog.org about Visual C++ and it show how to make a simple window but in 2 different way and I do not know wich one choose now.
The first one is bigger and look like this :
Code:
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
......................
And the other one is quite simple and it use the resource editor and I just write :
Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
return DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, DlgProc);
}
The problem is with the seconde way I cannot see how to add icon to my program.
Daok
-
Aug 9th, 2002, 10:48 AM
#2
Frenzied Member
Personally I would stay away from using the Dialog way to you learn how to do it the API way (first one). The other way can be trouble.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Aug 9th, 2002, 05:08 PM
#3
Member
hi,
you can use hIconSm mumber to select Icon to your program
this noot frm MSDN
PHP Code:
hIcon
Handle to the class icon. This member must be a handle of an icon resource. If this member is NULL, an application must draw an icon whenever the user minimizes the application's window.
-
Aug 9th, 2002, 05:25 PM
#4
Thread Starter
Ya ya Baby!!!Me is Back
I have read about 50% of the tutorial on winprog.org and I found the Visual part very complex. Do you think I should buy a book or read more tutorial and I will be fine ?
-
Aug 9th, 2002, 05:34 PM
#5
-
Aug 9th, 2002, 07:38 PM
#6
Frenzied Member
but unfortunately its very hard to find a book on pure API.
I went to the bookstore the other day and found 7 or so C++ programming books for newbies...all of them in MFC!
Is it really that hard to find an API book ???
-
Aug 10th, 2002, 11:42 AM
#7
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2002, 06:47 AM
#8
Programming Windows
by Charles Petzold
Microsoft Press
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 13th, 2002, 11:17 AM
#9
Frenzied Member
Can I use it with VC++ .NET???
-
Aug 13th, 2002, 11:19 AM
#10
Monday Morning Lunatic
Yes, but it won't help you for the .NET framework. VC++ 7 still supports normal programs.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2002, 11:22 AM
#11
Frenzied Member
Pew!! I just want to learn normal windows programming, so I shouldn't get any problems with VC.NET??
-
Aug 13th, 2002, 11:24 AM
#12
No problems, except that the reference is very crowded.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 13th, 2002, 11:25 AM
#13
Monday Morning Lunatic
Originally posted by CornedBee
No problems, except that the reference is very crowded.
Hmm, on the same scale that the Black Hole of Calcutta was a tad cramped.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2002, 11:25 AM
#14
Frenzied Member
-
Aug 13th, 2002, 11:34 AM
#15
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 13th, 2002, 11:36 AM
#16
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 14th, 2002, 08:29 AM
#17
The "Huh?" is to you. I don't understand your joke, lack of English knowledge, and what's the "black hole of calcutta"?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 14th, 2002, 11:45 AM
#18
Monday Morning Lunatic
You said the reference was crowded, which is an understatement on the same level as the Black Hole of Calcutta was a tad cramped:
http://www.sscnet.ucla.edu/southasia...sh/Blackh.html
I thought everyone knew the legend...
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 19th, 2002, 07:10 AM
#19
Never heard of that. But then, I never cared about India or the UK.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 19th, 2002, 07:13 AM
#20
Monday Morning Lunatic
Originally posted by CornedBee
Never heard of that. But then, I never cared about India or the UK.
Well, we don't really care about the UK either
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|