|
Does SetItemData put hidden information in ? I don't recall seeing anything similar to that. I know for items that are visible you need to create a new instance of an item or subitem and then pass it in, but I don't think it has a data field.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
Blast!!!
Say I have a listbox with the following stuff
apple
orange
grapes
orange
banana
apple
Notice how apple and orange appear twice.
Now to internally differentiate these items [because they are the textual casts of a more complex actual object] I'd need to associate an id with each.
apple [ap1]
orange [or1]
grapes [grp]
orange [or45]
banana [bnna]
apple [ap6]
See?
How do I do that???
Regards
Nish
p.s. The intention is this. If the guy has selected an item that appears multiple times, I should be able to get the id associated with it!
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Dude, what's with the large fonts? Don't tell me your vision is going now...
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
Shog9 wrote:
Dude, what's with the large fonts? Don't tell me your vision is going now...
Alright, alright! I am not allowed to feed the lions, I am not allowed to sing aloud. Other people get to use big fonts, I never get to do anything. I am sulking. Hey, I tho I tho a puthy cath...... I deedh, I deedh tho a puthy cath...
[Sigh] This list box issue is frustrating me Shog
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hey, it's ok by me if you want to feed the lions.
Nishant S wrote:
Hey, I tho I tho a puthy cath...... I deedh, I deedh tho a puthy cath
What?!? (w0t) *you're* Tweety now?
Nishant S wrote:
This list box issue is frustrating me
Admittedly, i know nothing about anything, but - can't you just create a class containing two data items, add a toString member, & be done with it? Should still be fairly concise i should think. Or am i missing the point.
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
Shog9 wrote:
Admittedly, i know nothing about anything, but - can't you just create a class containing two data items, add a toString member, & be done with it? Should still be fairly concise i should think. Or am i missing the point.
Shog!!!!
Has anyone ever told you that you are a miraculous genius whose existence on this planet is truly an unbelievable phenomenon of astonishing proportions?
Nish!!
p.s. It bloody damn well worked!!!
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
I should see if i can't get some money out of MS for a testimonial:
"Has anyone ever told you that you are a miraculous genius whose existence on this planet is truly an unbelievable phenomenon of astonishing proportions? Buy MSDN, and hear it daily!"
Nishant S wrote:
It bloody damn well worked!!!
Kewl
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
I am guessing that you do eat a lot of fish, eh Shog? Nothing else could explain this
By the way I have added the missing "are" in my post, but by the time I had done that you had already replied and quoted the sentence.
I usually never correct typo errors, this time I did it, just in case MSDN or Dundas decides to use you as their model
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishant S wrote:
I am guessing that you do eat a lot of fish, eh Shog?
Smoked salmon count?
Nishant S wrote:
I usually never correct typo errors, this time I did it, just in case MSDN or Dundas decides to use you as their model
Hey, if i'd get to meet that summer bikini model i'd go for it
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
I dunno, given that the Win32 boxes do it, you'd think it was possible. If not, could you put the data in another column and hide it, by forcing it to be 0 pixels wide ?
I'll be home in two hours, if there's no other answer by then, I can check in Petzold.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
The ListBox control can contain any Object derived class, not simply strings. To display a value, ListBox calls the Object::ToString(), which you can override on your own types.
This means that you can insert items that contain more than 32bits of "Item Data".
Note for ListViews, use the ListItem "Tag" property to store user-information (of any type).
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
|
|
|
|
|
|
Nishant S wrote:
CMapStringToString
Argh - please tell me this is a joke ? MFC container classes are such crap, why would they specialise such a thing ?
Anyhow, the answer is dictionarybase, a class you need to derive from in order to create a dictionary which is strongly typed. There's heaps of docs in MSDN, basically the derived class gets access to a member called Dictionary, if you derive a class from DictionaryBase, and then type Dictionary., the autocomplete makes the rest of it pretty self explanatory. It is NOT a multimap though, if you use the put method and try to put a key that already exists, it will blow up, and if you use the [] notation, the new value will overwrite the old one.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
Christian Graus wrote:
Argh - please tell me this is a joke ?
Huh? Nope! I won't cater to your STL-is-better-than-MFC whims! No way!!!
Anyway thanks for that tip on dictionary objects. I did a quick look-up and ended up with the HashTable class which is just what I wanted
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishant S wrote:
Huh? Nope! I won't cater to your STL-is-better-than-MFC whims! No way!!!
That's fine, I guess someone has to be stuck with doing things the hard and ugly way
Nishant S wrote:
Anyway thanks for that tip on dictionary objects.
Glad to help - I spent some time last night implimenting a typed dictionary if XmlNodes to paths and values, so it was perfect timing.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
I'm still debating this one, I'd like to keep going with doing MFC development (since I think that is likely to do me better with regard to future employment after graduation etc.).
I was originally going to do some data access code in ATL, as well as a few Office add-ins. I am now considering writing these in C#. The add-ins were going to use the data access code to read and write to a data store. Originally, the data access code would've been written in ATL as a COM server, but I am now considering writing it as a .NET assembly registered in the GAC. Thus enabling the same data library to be used by all constituent parts.
The other part is a regular client. At first thought the whole thing was going to be C# based, but I am now considering doing a mixture, with the add-ins and data access code in C# and the main client in Managed C++ -- predominantly MFC but making use of the managed extensions to access the data access code (which will be deployed in the GAC).
Does this sound like a decent thing to do? I'm really keen on developing the client with MFC and was originally going to just dive in with ATL and see where I surfaced. However, if I can accomplish the same thing in C# by using .NET assemblies (with a tiny learning curve) why not?
Considering the majority of the client code will be regular C++ based, with only bits for data access using the managed extensions, will I get almost regular performance, and would this ever be a concern anyway?
Thanks,
Paul
|
|
|
|
|
Paul Ingles wrote:
with the add-ins and data access code in C# and the main client in Managed C++ -- predominantly MFC but making use of the managed extensions to access the data access code
That's precisely what I did in my N-Track work-time tracking system. That way you can use MFC for all the GUI stuff and you can also use your __gc classes to access the .NET stuff
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Paul Ingles wrote:
Does this sound like a decent thing to do?
It ofcourse depends on the type of application and the intended audience. If you are doing for fun you can do whatever you want to. If only dataaccess componenets are to be written in managed c++ have a look at ADO (or OLEDB consumers templates). If the majority of code is unmanaged and only a small majority is managed I will prefer to have a fully unmanaged solution. However if extensibility is a consideration managed solution may be considered.
Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9
|
|
|
|
|
It is going to serve a couple of purposes, firstly give me more experience developing a proper software application (as opposed to programming/software development theory that I've covered at Uni.
Originally, the idea for the application came from my Uncle, who wanted to do something, but didn't know of any existing software package that would do what he needed -- so I took it up as a bit of a part-time project.
I'd imagine that the majority of the code would be unmanaged, and ideally I'd just go with MFC and ATL. However, developing COM servers in ATL appears a little daunting, so I thought about delving into Managed C++.
I prefer the UI functionality in MFC, as well as the stricter Doc/View architecture. However, the .NET framework encompasses all the "other stuff" pretty well (from what I've seen through developing the odd C# app and ASP.NET app), so it seems an ideal solution.
All I've got to do now is pick up a copy of VS
|
|
|
|
|
I've been writing C/C++ for over 20 years now, and never heard the term "Managed C++" until the last few months. What is it? Maybe something to do with .NET? I've been able to manage my C++ code quite well all along now, with archiving the projects onto other computers, using programs like PVCS, etc.
|
|
|
|
|
It has *everything* to do with .NET. .NET provides a managed environment, known as the CLR (common language runtime?), to which every language must be adapted in order to be considered "managed". The CLR provides services such as garbage colletion, etc.
I'm with you, however. In nearly 20 years of C/C++ I've never encounterd a problem with memory management. Memory related bugs are about the most easy to find and to fix. My feeling is that anyone who can't do that is simply going to find some other way to screw up an application even with the CLR holding their hand. I can understand why an application exposed to the internet would need to be more carefully managed memory wise, but otherwise, I don't see much use in it.
"Human imagination has been sculpted by the universe within which it was born" Hmmmm...
|
|
|
|
|
Reverend Stan wrote:
My feeling is that anyone who can't do that is simply going to find some other way to screw up an application even with the CLR holding their hand
LOL well to be honest, without MC++, the app I am writing would have tanked my computer countless times with un-managed memory "leaks"
I am so used to the VB and even the C# way of declare, use and forget.
Lets hope my MC++ app is not screwed up in some other way huh?
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
|
hi all,
I am confused about the concept of mixing MC++ with normal C++.
If I want to produce a C++ application that is compatible with the .NET framework and compiles to IL and so on .. can I by ANY MEANS use unmanaged C++ in it ? either by wrapping, by just putting it there, by using __nogc, or by any other way ?
if there is/are way/s .. plz. state them.
this is one, the other thing is : is there any free IDE available on the internet that can compile MC++ ? (either has a compiler or uses cl.exe from M$ .NET framework) -- something like SharpDevelop for C# but to use with MC++
thanx
|
|
|
|
|
Anonymous wrote:
If I want to produce a C++ application that is compatible with the .NET framework and compiles to IL and so on .. can I by ANY MEANS use unmanaged C++ in it ?
Yes, in fact you can produce IL without using any MC++ at all. You can compile an MFC/ATL project with the /clr option and it'll produce an IL executable.
Anonymous wrote:
is there any free IDE available on the internet that can compile MC++ ?
None that I am aware of.
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|