|
-
Apr 19th, 2001, 09:27 AM
#1
Thread Starter
Junior Member
I am in the process of learning C++ and I can't seem to figure this out.
I apologize if this has already been asked, but I couldn't find anything about this using the forum's search feature.
Anyways I am making a program, it has an explorer style interface, a tree view control on the left and a list view control on the right.
My question is how do I add/remove items in these controls, I can't seem to figure out how I edit the items in them.
Any help would be appreciated,
Thanks
Damicatz - http://catclub.2y.net (Under Construction)
-
Apr 19th, 2001, 10:06 AM
#2
Frenzied Member
What type of program is it? MFC or API?
With API you can just use SendMessage to the objects hWnd.
With MFC the objects should have an add and remove in their classess
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

-
Apr 19th, 2001, 10:47 AM
#3
Thread Starter
Junior Member
I think it's MFC, I used the MFC Wizard to create the application.
-
Apr 19th, 2001, 12:00 PM
#4
Frenzied Member
Ok, then did you create your views on a form/dialog?
If you did then you should attach them to a class, using MFC Class Wizard
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

-
Apr 19th, 2001, 12:06 PM
#5
Monday Morning Lunatic
The reason you didn't find much in your search is because this is a C++ forum, not MFC 
Once you've put the controls onto the dialogue using the resource editor, right click on it and choose "Class Wizard".
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
-
Apr 20th, 2001, 09:37 AM
#6
Thread Starter
Junior Member
What's the difference between MFC and C++, I am rather new to the whole thing.
-
Apr 20th, 2001, 09:48 AM
#7
Frenzied Member
MFC is kinda like VB (notice I said KINDA), where more things are graphically orientated, lots of functions and things are hidden and its built more around classes and modules. Where C++ (API) you do more things manually.
Have you done any normal C++ programming?
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

-
Apr 20th, 2001, 09:51 AM
#8
Thread Starter
Junior Member
I have done a little DOS programming before, with COUT, CIN, etc.
Will MFC Code work on Macs too? It's a long story but I orginally developed this program in Visual Basic and then the Mac users wanted a Mac version, so I am learning C++ So I can write it in C++ and have someone port it over to the Mac.
-
Apr 20th, 2001, 09:55 AM
#9
Frenzied Member
I am pretty sure that MFC will not work with MACs. I believe that you could manually program something using API to work with MAC, but I have never done that before.
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

-
Apr 20th, 2001, 10:00 AM
#10
Thread Starter
Junior Member
I looked up porting in the help file. It says I can port it to RISC processors by opening the workspace up on the kind of computer I want to port it to, is this for MFC too?
Visual C++ for Alpha and PowerPC is designed to be portable between both RISC platforms and Intel platforms. MFC is designed to make C++ code universal on all these platforms, and applications should port easily.
-
Apr 20th, 2001, 10:02 AM
#11
Frenzied Member
I dunno you are a bit out of my league on this. Try posting a new message about C++ and MACs and see if someone else has done this before. Parksie might know this one.
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

-
Apr 20th, 2001, 10:10 AM
#12
Thread Starter
Junior Member
I tried using the insert command and now it says "Debug Assertion Failed"
-
Apr 20th, 2001, 10:23 AM
#13
Frenzied Member
This server is too busy is REALLY GETTING OLD
Any way, you were using the insert command for what?
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

-
Apr 20th, 2001, 10:25 AM
#14
Thread Starter
Junior Member
This is the code I used after making a class for it using the class wizard :
m_TreeLister.InsertItem("Hello World",IDC_MainFrame,IDC_MainFrame,TVI_ROOT,TVI_LAST);
-
Apr 20th, 2001, 10:31 AM
#15
Frenzied Member
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

-
Apr 20th, 2001, 10:48 AM
#16
Thread Starter
Junior Member
It's an Icon
I fixed it, It was in the wrong procedure, it was in DoDataExchange, I meant for it to be in the form's OnINIT procedure.
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
|