|
-
Dec 30th, 2002, 12:38 AM
#1
Thread Starter
Fanatic Member
Calculation program
How long would a Win32 calculation program take? I mean, with no modification on the GUI other than the normal window style and a few textboxes and drop down menus for which you could choose the conversion.
And a few menus...
I was wondering why is it sooo hard and frustrating to create a working app in C++ than in VB..

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 30th, 2002, 09:25 AM
#2
Frenzied Member
Re: Calculation program
Originally posted by prog_tom
I was wondering why is it sooo hard and frustrating to create a working app in C++ than in VB..
That's not true... at first it seems a lot harder to create an app, but once you got a hang of it, it will become a second nature For people like parksie/CornedBee etc. it's as easy to create an app in C++ as it is for you in VB.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Dec 30th, 2002, 11:16 AM
#3
Frenzied Member
The reason why it takes so long is due to the fact that VB was made to do quick windows based applications where as C/C++ was not.
For me it would take an hour or two to do a program like that. But I would be kind of cheating in a way and I would recomend it to you an others.
I have 6 files that I have that are like a template for me. One is a main.cpp and a main.h which contain all of headers, defines, etc. and a basic window program already in them so I can just drop them into a project and be up an running in a few seconds. Then I have two other files that have some custom functions that I wrote that I use a lot, like logging, tracing, writing to an edit box, error messages, string functions, etc. Another file I have has examples of functions that are not too common but are handy to have around, like how to loop through a vector or list, how to change the text of a static, how to do a mutex, etc. The final file has examples of all of my VAR and Function naming, function notes, comments, etc so I can keep consistent on each program.
I keep this files in a safe place and keep track of all the changes I make to them. The files are very handy to have around because it keeps you from having to reinvent the wheel everytime you go to do something.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Dec 30th, 2002, 01:24 PM
#4
Thread Starter
Fanatic Member
what is the best way to create such programs?

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 30th, 2002, 01:36 PM
#5
Frenzied Member
what do you mean
-
Dec 30th, 2002, 01:43 PM
#6
Monday Morning Lunatic
Re: Re: Calculation program
Originally posted by Jop
That's not true... at first it seems a lot harder to create an app, but once you got a hang of it, it will become a second nature For people like parksie/CornedBee etc. it's as easy to create an app in C++ as it is for you in VB.
Well, it's been a while, since most of my stuff has been done with a proprietary closed-source graphics library at my old company (I still have a copy, but haven't looked at it for months). And now I'm not on Windows..... *shrug* Need to learn GTK 2 I think
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
-
Dec 30th, 2002, 07:13 PM
#7
If I am to pop out a very quick app I usually use MFC.
Needed a windows-based app to test my templated matrix code, so I created an MFC dialog app, was done in ~40 minutes.
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.
-
Dec 31st, 2002, 10:41 AM
#8
Thread Starter
Fanatic Member
OMG, so how did you guys start? And how long did it take you guys before approaching win32? and when you approach win32, which one did you learn first, winapi or mfc?

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 31st, 2002, 10:47 AM
#9
Fanatic Member
its not that hard.
the hardest part for me is positioning
so i cheat 
go into VB, arrange your form the way you want it, then save it. open the form in notepad, you'll have all of the coordinates, widths etc that you need for all of the controls
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Dec 31st, 2002, 10:50 AM
#10
Thread Starter
Fanatic Member
Originally posted by nabeels786
go into VB, arrange your form the way you want it, then save it. open the form in notepad, you'll have all of the coordinates, widths etc that you need for all of the controls  [/B]
I don't get it...

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 31st, 2002, 11:01 AM
#11
Fanatic Member
go into VB, and arrange your form like you want...llike text boxes, frames, buttons etc.
when you open the form in notepad (like form1.frm)
you'll get'
Code:
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Button!"
Height = 855
Left = 360
TabIndex = 1
Top = 720
Width = 1575
End
Begin VB.TextBox Text1
Height = 285
Left = 240
TabIndex = 0
Text = "This is a textbox"
Top = 240
Width = 3975
End
End
then you just plug the coord in when you create your controls
like to create the above textbox
Code:
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "Text1",
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL,
240, 240, 3975, 285, hwnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), NULL);
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Dec 31st, 2002, 11:20 AM
#12
Thread Starter
Fanatic Member

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 31st, 2002, 11:23 AM
#13
Thread Starter
Fanatic Member
i see now, you get all those layouts done in VB and sorta import it into C++ code, clever

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 31st, 2002, 11:23 AM
#14
Fanatic Member
Originally posted by prog_tom
i see now, you get all those layouts done in VB and sorta import it into C++ code, clever
yup saves alot of time
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Dec 31st, 2002, 11:23 AM
#15
Thread Starter
Fanatic Member
but why would you bother doing that? since you could use the resource editor in VC++ to layout the dialogs.

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 31st, 2002, 11:27 AM
#16
Fanatic Member
Originally posted by prog_tom
but why would you bother doing that? since you could use the resource editor in VC++ to layout the dialogs.
lol, how? i dont know how to use it, thats the prob
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Dec 31st, 2002, 12:25 PM
#17
Thread Starter
Fanatic Member
just #include "resource.h"

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Dec 31st, 2002, 01:06 PM
#18
Fanatic Member
that helps, lol.
i mean with making the forms, wndproc etc. i dont have the time now to learn it so i just use my method
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Dec 31st, 2002, 07:56 PM
#19
Hyperactive Member
Tom: Maybe you want to look at the sample provided in the MSDN documentation, just type MFCCALC in the index box and there you go!
-
Dec 31st, 2002, 11:28 PM
#20
I have to admit that I started right away into MFC. That's the reason why I'm so fierce in encouraging people to learn the language and the API first.
When I started C++ I did so with "Visual C++ 6 Step by Step". There you write a few console apps to demonstrate the basic C++ concepts, from if over loops and pointers to classes. Sad enough that the more advanced of those didn't work.
Then it briefly covers the API (VERY briefly) and then you start with MFC, writing a single app throughout the book.
It's not a good way to start programming...
After that I bought a really good book which sadly is only available in German.
When I was through that (and it took me a while) I bought The Petzold. With this I had a firm grip on the API.
My collection is rounded off by an advanced API programming book by Jeffrey Richter and The Prosise (the MFC equivalent to The Petzold).
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.
-
Dec 31st, 2002, 11:32 PM
#21
Fanatic Member
i started with MFC too, i like api more though for some reason..
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
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
|