Archived

This topic is now archived and is closed to further replies.

Skiller

Simple Q's about MSVC++ 6

Recommended Posts

Skiller    122
I am currently working on a game but since i am fairly new to C++ (done a fair bit of programming in VB before tho) I''ve decided that it would be best if i program the editing suite first so i am more familiar with C++ when i get around to programming the game. Unfortuanatally the object oriented programming in MSVC++ is no where near as simple as in VB so i''ve got a few probs that i need help with. 1. I want to create the following design for the dialog scripter:
|---------------------------------------------------------| 
|[]Title Bar                                              | 
|---------------------------------------------------------| 
|File  Help  Etc.                                         | 
|---------------------------------------------------------| 
|[toolbar] [] [] [] [] [] [] []                           | 
|---------------------------------------------------------| 
|Tree View       |Text document                           | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|                |                                        | 
|---------------------------------------------------------| 
|Status Bar                                      |CAPS OVR| 
|---------------------------------------------------------| 
 
but when i hit maximise the controls stay the same size so i would like to know how to change the size/position of them(particularly the status bar(it activeX control, microsoft status bar (SP4))) i know where to put the code just not what it is. 1.1 also i tried doing this design using MDI childs (or whatever it is that enables multiple document windows within a parent window) but couldn''t get a tree view on the side, is it possible? and how? 2. Reading and writing to files, whats the best/fastest way read/write an ini file? 3. I have tried to use scrollbars in the random map plotting util i''ve made but can''t get them to work. it wont scroll for some reason, i can change it with code but i can''t get it scroll with the mouse. is there anything special i have to do to get them to work? 4. Are there any tutorials for people like me changing from VB to C++? coz my programming knowledge is useless if i cant figure out what the equivelant functions/methods are, it took me a bloody week to find out that the equivelant of select case was switch (at the time i wasn''t using forums just the msdn help files) BTW if u know of a tutorial or something that covers what i wnat to know please post a link to it -Skiller

Share this post


Link to post
Share on other sites
Kylotan    10010
quote:
Original post by Skiller
Unfortuanatally the object oriented programming in MSVC++ is no where near as simple as in VB so i've got a few probs that i need help with.

Editing graphical dialogs is not what 'object oriented programming' is, by the way.

quote:
but when i hit maximise the controls stay the same size so i would like to know how to change the size/position of them(particularly the status bar(it activeX control, microsoft status bar (SP4))) i know where to put the code just not what it is.

The short answer is either stick with VB, or get Borland C++ Builder.

The long answer is that you probably need to open up ClassWizard, find some sort of WM_SIZE message, double-click that to create an event handler function, then add code in there to change all your controls.

quote:
1.1 also i tried doing this design using MDI childs (or whatever it is that enables multiple document windows within a parent window) but couldn't get a tree view on the side, is it possible? and how?

Sure, it's possible, but I doubt you're going to get a short and easy answer.

quote:
2. Reading and writing to files, whats the best/fastest way read/write an ini file?

'Best': GetPrivateProfileString/WritePrivateProfileString. (Look them up on MSDN.)
Fastest: http://www.codeguru.com/data-misc/HighPerformanceIni.html
Perhaps easiest: http://www.codeguru.com/files/INI.html

quote:
4. Are there any tutorials for people like me changing from VB to C++? coz my programming knowledge is useless if i cant figure out what the equivelant functions/methods are, it took me a bloody week to find out that the equivelant of select case was switch (at the time i wasn't using forums just the msdn help files)

I'd honestly recommend you pick up a book. There's nothing to equal a rigorous text on the subject, and it also helps you learn the aspects of C++ which have no parallel in VB (eg. templates).

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]


[edited by - Kylotan on April 29, 2003 6:30:37 AM]

Share this post


Link to post
Share on other sites
Skiller    122
bugger , but at least it''ll take less time to make in VB. pitty C++ isn''t as easy as VB but if it were it would probably have the same limitations. o well, thanks any how

-Skiller

Share this post


Link to post
Share on other sites