I have toyed with HTML, VB, and C++ in the past. I am making a commitment now to learn Visual C++ with Learn Visual C++ 6 in 21 Days, seeing as I have a good copy of MSVC++ 6 Standard for myself. I have read these Learn to programming books by SAMS publishing before and they are nice books. Just never got the time to make the commitment. Last night I finished my first day in this book, which was actually pretty comfortable and enjoyable, I was left with 3 questions to myself. Here they are:
1.) The first program in the book is a dialog-box program, which starts me off with an ok and cancel button. After completing the first lesson I wanted to add a third push button aside from the ok and cancel ones that originally came with it. After adding a push button to my main program window, then renaming the ID in properties to IDHEY, and the caption to Hey, all goes well up to there. Then I want to make it so when the user clicks the button, a message window pops up with a small message. I have done it for the OK that comes with the dialog-box when you create it by right clicking the ok button, going to class wizard, then selecting the IDOK and selecting BN_CLICKED and selecting add function and then editing the code MessageBox("Hello, you've clicked ok"); or whatever I would put in there... I want to do the same for a button I added myself to the program, but when I go to class wizard for the button I added, the object ID isn't there, which would be IDHEY... So what do I have to do?
2.) After I have come to a point in the development of my program, I want to save all of my work to this point to a backup location, just incase I decide to wander and expiriment with my programming and I do create some errors, I can just load up the last working point for my project. I've tried doing a save as before to a backup folder I made and I think it just saved the .cpp file and when I did screw up and got 2 errors I wanted to go back to where I last saved.. but when I did that it wouldn't all open.. it was giving me some error like all of the parts couldn't be found or something, I ended up doing my whole project over, and luckily in the beginning of the book they are small projects. So basically I need to know how to save at a certain point in my project so if I screw up I can just close that all and open back up to where I was.
3.)I had finished building, compiling and testing an exe for my first program. It came out simple and nice. No errors or warnings, and I even went along the tutorial changing things to my own ideas to expiriment. I wanted to send the .exe to a friend of mine through a file transfer, and I did. When he opened it, there was a .dll missing error and he couldn't get in the program. I figured there would be some .dll's or something that I would probably have to like put in a zip file with the executable and send to my friend, seeing as most programs you download aren't just the executable, usually they include some kind of .dlls or .ocx or some sort of library files. How do I find out the necessary files to include with my program?
I sortof thought maybe just because this is the first chapter/day in the book maybe what I am asking wasn't covered yet, but these questions don't seem too far off from where I am, so I figured I would try getting answers to them to clear my head before I start day 2 in the book. I tried reading over the first day and just couldn't figure out the answers. I appreciate the help/tips.
Thanks,
Dan
1.) The first program in the book is a dialog-box program, which starts me off with an ok and cancel button. After completing the first lesson I wanted to add a third push button aside from the ok and cancel ones that originally came with it. After adding a push button to my main program window, then renaming the ID in properties to IDHEY, and the caption to Hey, all goes well up to there. Then I want to make it so when the user clicks the button, a message window pops up with a small message. I have done it for the OK that comes with the dialog-box when you create it by right clicking the ok button, going to class wizard, then selecting the IDOK and selecting BN_CLICKED and selecting add function and then editing the code MessageBox("Hello, you've clicked ok"); or whatever I would put in there... I want to do the same for a button I added myself to the program, but when I go to class wizard for the button I added, the object ID isn't there, which would be IDHEY... So what do I have to do?
2.) After I have come to a point in the development of my program, I want to save all of my work to this point to a backup location, just incase I decide to wander and expiriment with my programming and I do create some errors, I can just load up the last working point for my project. I've tried doing a save as before to a backup folder I made and I think it just saved the .cpp file and when I did screw up and got 2 errors I wanted to go back to where I last saved.. but when I did that it wouldn't all open.. it was giving me some error like all of the parts couldn't be found or something, I ended up doing my whole project over, and luckily in the beginning of the book they are small projects. So basically I need to know how to save at a certain point in my project so if I screw up I can just close that all and open back up to where I was.
3.)I had finished building, compiling and testing an exe for my first program. It came out simple and nice. No errors or warnings, and I even went along the tutorial changing things to my own ideas to expiriment. I wanted to send the .exe to a friend of mine through a file transfer, and I did. When he opened it, there was a .dll missing error and he couldn't get in the program. I figured there would be some .dll's or something that I would probably have to like put in a zip file with the executable and send to my friend, seeing as most programs you download aren't just the executable, usually they include some kind of .dlls or .ocx or some sort of library files. How do I find out the necessary files to include with my program?
I sortof thought maybe just because this is the first chapter/day in the book maybe what I am asking wasn't covered yet, but these questions don't seem too far off from where I am, so I figured I would try getting answers to them to clear my head before I start day 2 in the book. I tried reading over the first day and just couldn't figure out the answers. I appreciate the help/tips.
Thanks,
Dan