Click to See Complete Forum and Search --> : Experts must read!
prog_tom
Jul 16th, 2001, 01:52 AM
Hiya experts of C world!
Please help me with this... How to create a Window in VC++ using WINDOWS.H?
I'm confused about the .style, .cbClsExtra,.cbWndExtra
Can AnyEXPERT explain it?
Thanks any other ways of making a Window?
parksie
Jul 16th, 2001, 02:31 AM
You're familiar with C/C++? Good :)
http://msdn.microsoft.com/library/default.asp - look up the Platform SDK and then User Interface Services. It tells you everything you need to know.
There is only one (ok, two ;)) way of making a window, and that's CreateWindow[Ex] (with the API at least). You can use dialogue boxes (using the resource editor).
HarryW
Jul 16th, 2001, 06:47 AM
Or you could turn to the Dark Side and use MFC, but then you would be shunned by your peers. And rightly so.
prog_tom
Jul 16th, 2001, 07:59 AM
MFC is like using some Wizard or whatever, I don't like that... I just really having a hard time with the CREATING A SIMPLE WINDOW THing...
I mean in VB it isn't that complicated...
Do I have to memorize all the code that need to be doned for creating a Window??//????
HarryW
Jul 16th, 2001, 08:03 AM
You don't need to memorise it, you can just copy and paste it and then modify the 5% of the code that you want different for your current app. It's a good idea to make sure you understand what all the APIs are doing though.
prog_tom
Jul 16th, 2001, 08:05 AM
VC++ 6 is the most Confusing Language I've ever learned. I mean the Windows Console programming in VC++ is really easy, but when I get into the Win32 APP it's like.. ****!!!
int WINAPI WinMain(those can be see){
shjs
wefhdjh
s
d
ah I forgot!
}
ERROR: shjs UNKNOWN IDENTITY...bLAH BlAH!
gfiorani
Jul 16th, 2001, 08:08 AM
Try winprog (http://www.winprog.org/)'s tutorial. I found it very helpful when I first started with Win32 programming in C++.
To answer your question about .style, the window styles are sort of like the form properties in vb. There are a few different style constants you can OR (bitwise) together to make the window how you want it. Once you have the class registered, you can create a window based on the class, with even more style flags.
Hope this helps
prog_tom
Jul 16th, 2001, 08:13 AM
I know WinProg's Tutorial Already, but I am like confused on how to learn Win32 APP programming, I started the Console programming and fount it's very easy. But when I saw the code for creating a Window in Win32 APP it's like @#$@%#$!!!
Is it a problem with my age? Or anything else I'm doing it wrong? They said I don't have to memorize the code, but if I didn't I have to rely on the COPY PASTE... INstead of using it right off of my head... in VB it isn't that Complicated you know,,, Please anyone can tell me how to memorize or use the Code? I have the code, but it's so hard to understand it...
parksie
Jul 16th, 2001, 08:15 AM
It's actually a very simple methodology - it demands that you read the API documentation in the Platform SDK otherwise you've got no chance.
prog_tom
Jul 16th, 2001, 08:34 AM
Parksie, I know youare an expert, please tell me where the EXACT URL is...
parksie
Jul 16th, 2001, 08:38 AM
Well, I didn't bother because I've destroyed the keys 'M' 'S' 'D' and 'N' through excess typing ;)
I use the downloadable version so it involves going to MSDN on my slow connection every time someone needs the URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/hh/winui/winuserstart_88bp.asp
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.