|
-
Sep 4th, 2002, 10:22 PM
#1
Thread Starter
Fanatic Member
Windows Programming
I read a book, it taught me programming in dos. How do i move it up to windows?
-
Sep 4th, 2002, 11:04 PM
#2
Frenzied Member
Programming Windows by Charles Petzold. Simply the best book on Windows programming I have read.
Or if you don't want to read a book with 1500 pages, then look at the winprog tutorial: www.winprog.org
-
Sep 5th, 2002, 05:43 PM
#3
Frenzied Member
theres an example in the faq
-
Sep 6th, 2002, 04:44 PM
#4
Let me in ..
Charles petzold is the best book on Visual C++, i guess.
Other good c++ concept book is, c++ inside out by bruce eckel.
-
Sep 7th, 2002, 02:12 PM
#5
Thread Starter
Fanatic Member
winprog.com is great, but i wanted c++, some of the stuff they use my compiler doesnt understand
-
Sep 7th, 2002, 02:50 PM
#6
Monday Morning Lunatic
Originally posted by Mushroom Realm
winprog.com is great, but i wanted c++, some of the stuff they use my compiler doesnt understand
winprog.org uses C I think, some of which won't compile as C++ (the type checking has been tightened).
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
-
Sep 9th, 2002, 06:17 AM
#7
But pure windows programming is in C like the SDK. You can use C++ yourself but you won't learn more about windows this way.
Hint: to make your compiler compile C examples put it into a .c file, not .cpp
This will make the compiler compile it as C.
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.
-
Sep 9th, 2002, 05:14 PM
#8
Thread Starter
Fanatic Member
i dont mind not learning more about windows, im already stressed abot school then throw in vb, and c++, im learning enough, i dont want to add the more complicated and less usefull c to the mix
-
Sep 10th, 2002, 03:59 AM
#9
What I mean is: you get no advantage in understanding windows from using C++ in favor of C. You'll get it later.
You don't need to learn C. The incompatibilities are minor syntactical issues, so you can simply copy and paste the examples to a .c file to compile them and see what they do and then recreate them with C++ to modify them and learn.
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.
-
Sep 10th, 2002, 05:55 PM
#10
Thread Starter
Fanatic Member
How do u call api in C++, ive been trying to use the ShowCursor api like this:
#include <windows.h>
#include <iostream.h>
int WinMain()
int command;
{
cout>>"Terminal Activated\n";
while(command!="end")
cin<<command;
if(command=="cursor")
ShowCursor("False");
if(command=="show")
ShowCursor("True");
loop
}
Im using a cheap, free compiler from borland, and it gives me 2 errors. One is a declaration syntax error, and the other is declaration terminated incorectly. What am i doing wrong?
-
Sep 10th, 2002, 06:05 PM
#11
Frenzied Member
just try
ShowCursor(false);
all lowercase no quotes needed
-
Sep 10th, 2002, 10:10 PM
#12
Thread Starter
Fanatic Member
Still gives me the same error
Is there any really good easily atainable books/sites that will teach me c++, I know a little, too much to the point where i dont want to spend $50 on a book thats beginner to advanced, and too little to understand winprog. Its just going right over my head.
-
Sep 10th, 2002, 10:35 PM
#13
Frenzied Member
cin uses >> and cout uses << you've got them backwards
-
Sep 10th, 2002, 10:55 PM
#14
Thread Starter
Fanatic Member
LOL im new to c++ ive been doing it for 3 weeks, and ive done this atleast once a day.
-
Sep 10th, 2002, 10:56 PM
#15
Thread Starter
Fanatic Member
hold up, its still not working.
-
Sep 11th, 2002, 03:23 AM
#16
int WinMain()
int command;
{
cout>>"Terminal Activated\n";
You have the
int command;
line before the start of the function body.
Don't use <iostream.h>, use <iostream> and
using namespace std;
This is the modern standard, the other is deprecated. If it doesn't work, download the newest free compiler from borland, I'm sure it supports the new STL.
Pass TRUE or FALSE to windows functions requiring a BOOL. Don't use quotes, and put it all in capitals.
If a bool is required somewhere, pass true or false (all lowercase).
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.
-
Sep 11th, 2002, 04:31 PM
#17
Thread Starter
Fanatic Member
My internet is slower than the speed that u would think possible. It takes me atleast a full 20 min to download a mb of data, and thats when its not busy. What would the advantages of using the none .h version be?
-
Sep 11th, 2002, 04:35 PM
#18
Monday Morning Lunatic
Originally posted by Mushroom Realm
My internet is slower than the speed that u would think possible. It takes me atleast a full 20 min to download a mb of data, and thats when its not busy. What would the advantages of using the none .h version be?
It's standard, and they're all templated so they fit in more neatly with the rest of the Standard Library.
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
|