|
-
July 15th, 1999, 01:23 AM
#1
VERY EASY!!! BEGINNER :)
Ok, you will probably all laugh at this question but I'm confused. I've quite a bit of C++ programming and understand the language pretty good. But my problem is I've only worked on making DOS programs... Now what I really want to do is convert some of my card games that i've created in dos to run in windows. Does anyone know of a place that could lead me through doing this. Maybe I'm dumb, but in VC++ 6.0 I can't even figure out where to type in the code and stuff... Any type of help or guidance would really be appreciated! Thanks and you'll probably be seeing a lot of me on here, because I'm new. HAHA
-
July 15th, 1999, 01:37 AM
#2
Re: VERY EASY!!! BEGINNER :)
I'd suggest getting a "Using Visual C++ 6.0" book. I remember going from C++ DOS to Windows and wondering where the hell main() was as well! You have to learn about classes and there setup in a Windows programming environment. Believe me, it won't take very long to get used to this especially if you already have a lot of programming experience. Personally I think the MS Visual Studio approach is just excellent. Makes Windows programming a lot easier IMHO.
These "using" books are quite basic, however, I found it got me up to speed rather quickly. Next, I'd suggest a book on MFC. The book I have on MFC is invaluable.
Good luck.
--- Scott
-
July 15th, 1999, 02:01 AM
#3
Re: VERY EASY!!! BEGINNER :)
emm...if you mean you want to use visual c++ 6.0 to compile c++ "dos" program,
you can try to use console applicaiton.It need a main funtion and other thing same as dos program.
However, the console program must run under windows too.
Hello World!!!
-
July 15th, 1999, 08:28 AM
#4
Re: VERY EASY!!! BEGINNER :)
if you already used object-oriented programming to build your card games then it's very easy. You just have to create a MFC app using the AppWizard with New and Project tab and you could use exactly the same code but you will have a GUI and you'll have to treat the events of the user. The only thing would be to change the display of the card but using the OnDraw function of the CMyGameView class. If it's not a object-oriented program, I suggest you get used to object-oriented programming and then get use to VC++
-
July 15th, 1999, 10:32 AM
#5
Re: VERY EASY!!! BEGINNER :)
I'm actually looking for a book on MFC. Most of the books I've found are outdated or just plain not printed anymore. Can you give me some suggestions for a nice MFC book? I'm looking for a tutorial / reference type book as I've done plenty of C programming in Linux and a tad of C++, but windows programming is a different beast indeed. Thanks.
-
July 15th, 1999, 11:00 AM
#6
Re: VERY EASY!!! BEGINNER :)
I would like to add this: once you can get the card game program working, you can use the CARDS32.DLL that the FREECELL program uses to draw the cards and card faces. You don't have to draw your own deck!
Regards,
Paul McKenzie
-
July 15th, 1999, 11:52 AM
#7
Re: VERY EASY!!! BEGINNER :)
Yes!! Thank you!!! How can I get into the contents of a .dll file and maybe change the way they look? Any good programs... I can't believe how different this is than just DOS programming... Will be neat when it's done though!
-
July 15th, 1999, 12:23 PM
#8
Re: VERY EASY!!! BEGINNER :)
There are 14 card face types, but I'm not sure if you can use your own easily. However, there is one thing that you can do: make a copy of the DLL, call it something else.DLL, and load the new DLL in VC 6.0 as a resource. There you can edit one of the bitmaps of the card face. You then use your new DLL instead of the CARDS.DLL.
To get the DLL working, it's just a matter of calling the functions to draw the cards at a certain position in the window, as well as individual cards. A DLL is nothing more than a library of functions and resources that are loaded at runtime instead of linked into your program.
I would suggest that you get the logic of the card game working first. Use simple static text controls as the "cards". Once you get this part working, you can start a thread on using Cards.DLL (and using DLL's in general).
Or you can write a test program that uses CARDS32.DLL just to get used to DLL's, drawing on device contexts, etc. The rules of the game are no concern at this point, since all you want to do is get familiar with using the CARDS function interface.
Regards,
Paul McKenzie
-
July 16th, 1999, 04:28 PM
#9
Re: VERY EASY!!! BEGINNER :)
Well, I would suggest the latest Petzold book, Programming Windows. It is an excellent book.
Quia nominor leo.
-
July 16th, 1999, 08:30 PM
#10
Re: VERY EASY!!! BEGINNER :)
I have had good luck with the Que black softcover series. I use Mastering Visual C++ 4 for Windows programming. It covers general Windows/MFC programming with little handholding. Complete source code is at the end of each chapter and the examples provide a good basic framwork for more involved projects. This book covers graphics, text, dialog boxes, OLE, multithreading and a host of other things. You get lots of practice with the Class Wizard, Resource Editor and a balanced selection of MFC classes and templates. Full source and executable files are on a companion CD.
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
|