Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie-where to start? 1

Status
Not open for further replies.

michaelkrauklis

Programmer
Dec 5, 2001
226
US
I have been programming in Cpp for years now, but I've never done any VCpp. I know Java very well but I am currently developing a project where speed is an isue so I've decided Cpp is the way to go. But... "and there's always a but," I need a GUI running on top of my program. I've done GUI in Java but it seems very different in VCpp. Is there a good place for me to start or are there any good tutorials out there? I haven't been able to find any and Microsoft has been anything but helpful. I just need to get my feet wet. Any help will be apreciated. MYenigmaSELF
myenigmaself@yahoo.com
 
If you don't mind buying books, I've found that the microsoft press books usually do a pretty good job. "Programming Visuall C++ fifth Edition", or later if the have it, is pretty good for getting your feet wet, although they tend to gloss over some pretty important stuff. "MFC Development using MVC++" is ok too, except the version I have is a little outdated.

On the net, I'm not so sure.

One tip, is use control variables at all times. If you don't know what I mean yet, when you write
CEdit * main_dlg;
main_dlg->GetDlgItem(IDC_EDIT_CONTROL);

you should instead write
CEdit c_edit;
and then under your DDX function write

DDX_Control(pDX, IDC_EDIT_CONTROL, c_edit);

if you don't understand what I mean yet, hopfully the first time you write GetDlgItem you will rememeber and then return to this post.

CJB
 
<i>Programming Windows</i> (third edition, I think) by Charles Petzold is what you might be looking for. It's considered to be one of *the* books on Windows programming. Since you've already had years of C++ experience, this would be your next logical step.
 
Programming Windows (third edition, I think) by Charles Petzold is what you might be looking for. It's considered to be one of *the* books on Windows programming. Since you've already had years of C++ experience, this would be your next logical step.

Edit: Oops ...
 
Petzold is one of the books, but it is also written in C. It will give you a very good understanding of what windows programming is, but for someone with C++ and Java background, I would recomend MFC. MFC is a pain at first, but you can save a lot of time.

CJB
 
Thanks to both of you for your input. I'm heading to the bookstore in just a few minutes. I'll just get both books if I can find them!(company dollar:)I) Thanks again for the help. MYenigmaSELF
myenigmaself@yahoo.com
 
As a bit of a newbie myself, can I ask what’s wrong with the GetDlgItem method. I’ve been using it without any problems. What am I missing?
 
There is nothing really wrong with it, it's just that using a control variable saved me tons of time. Part of it was that my control pointers were not member variables, so I was re-initilizing them everytime I want'ed to use the control, and my control variables were member variables.

Aside from that, using control variables with DDX_Control is just so much cleaner. It is a style choice, and someone turned me on to it, and I think it is a big improvment over GetDlgItem.

CJB
 
Why would you want to use MFC? Do you like add bloat to your programs? Be my guest.
 
Correct me if I'm wrong, but isn't the whole point of MFC, or any Library for that matter, to decrease app development time? Why write something yourself if it has already been written? Otherwise we'd all be programming in binary... that is if we were programming at all. I won't go into a theological history debate but we must use others as stepping stones in order to make any advancement. Not stealing, but building upon. And if you find a better way to do something then spread the word so that others may benefit from this as well. I'm pretty much completely off topic by now huh?=p MYenigmaSELF
myenigmaself@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top