|
-
Jun 22nd, 2001, 12:10 AM
#1
Thread Starter
Conquistador
Quick Q about Pointers and a prog to try?
1stly:
PHP Code:
CEdit* pEdit1 = (CEdit*)GetDlgItem(IDC_EDIT_FIRST);
pEdit1->LimitText(20);
why do I have to declare the edit box as a pointer before I can manipulate it?
why can't i just do:
GetDlgItem(IDC_EDIT_FIRST)->LimitText(20);
also
I am very new to Visual C++ and was wondering if anyone could give me some easy program ideas to try??
-
Jun 23rd, 2001, 09:22 PM
#2
Thread Starter
Conquistador
Thanks
What do you use then?
-
Jun 24th, 2001, 05:34 AM
#3
Monday Morning Lunatic
I use the API I made the mistake of half-learning C, then trying to use MFC. I got part-way, then found it incredibly hard to work out all the gibberish with MESSAGE_MAP and all that, before I decided to scrap it, learn C++ properly. After that, I made some good stuff, but I didn't understand half the code it produced, so I looked at MSDN to see if there was any other way of making Windows programs...to find the Platform SDK waiting for me 
And the rest, as they say, is history
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
-
Jun 24th, 2001, 12:10 PM
#4
Member
parksie, i dont understand you when you say that MFC is evil...i think its better to use "precreated" classes with wide support than write classes self - i think if you want to write large projz, you will have to write "some" classes...
-
Jun 24th, 2001, 12:26 PM
#5
Monday Morning Lunatic
The thing with MFC is, it's an "all-or-nothing" affair a lot of the time. If you bring one part in, it grabs most of the rest as well. Also, a lot of MFC has equivalents in the STL, which is smaller, faster, and *standard*.
Yes, I agree it's often better to have something that's widely accepted, but in most cases...why? You can write a small set of classes in an evening to simplify making a window, and it hardly adds any extra code. Also, MFC hides most of the underlying execution from you, which I don't like.
When I say MFC is evil, that's my opinion (which I'm entitled to ).
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
|