|
it is a new language from MS. it's similar to C++ and Java, but is somewhat more high-level.
it's main advantage is that it works well with the new .Net stuff.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
thx
do u know the name of its compiler and how to get it?
(i.e. Visual C++ if one of compiler of C++)
does c# close to c, c++ or java?
includeh10
|
|
|
|
|
You need Visual Studio .NET, which has a C# compiler and stuff.
Even if you win the rat race, you're still a rat.
|
|
|
|
|
why would a CListCtrl move an item without my permission? i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me.
i do this:
lvi.iItem = 0;
int idx = GetListCtrl().InsertItem (&lvi);
TRACE("idx = %d\n", idx);
idx is, correctly, 0.
but where does the item end up? position #3.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Chris Losinger wrote:
i don't have any sorting set. it's an Icon view, Auto-arrange list view and it hates me.
Well, i can´t think of something that you could have missed, and if the returned index is ok, i have definitely to agree with you : it hates you
~RaGE();
|
|
|
|
|
Doesn't the icons in icon view always end up at the next free space?
Internaly it have index 0, it just looks like it is 3..??
/M
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
yeah, that's what it seems like.
looks like i'll have to take out all the items, and insert them back, in the order i want. what a nice feature...
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
take off the Auto-Arrange feature?
|
|
|
|
|
nope. no effect.
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
I've been assigned to recode a large part of my company's application. Mainly to reduce the large amount of bloat and code in our dialog class. One of the main portions that I want to reduce is the code surrounding our CTreeCtrl class. I was planning on just creating a new class and directing all of the CTreeCtrl events to this class.
Here is where my problem comes in. I've tried creating the class from the class Wizard in VS however it wants me to create a class that inherits from an MFC class. What is the appropriate class to inherit from here?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
|
Awesome. That's what I was hoping for. Because of the class wizard that popped up in the particular place I was crating a new class I wasn't sure if it had to be MFC for the Message Maps to work properly.
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
This is a strategy question to try to get me pointed in the right direction.
My application records several items of data held in a structure into a log file. It also is able to read those log files and process them. As the application evolves, the contents of the structure increases and decreases ... elements are added and removed, based on evolving need.
While the software and the log files matches for a particular version, I need to be able to have sw version 3 read data log version 2, and data log version 1. Backward compatibility. It seems to me that I need multipe structures and multiple classes to read and write the log files, each class meant to handle the log of a particular version. The structure should be contained in the class with accessor functions to provide the data elements.
If the document object handles the File/Open, and it gets the filename from the dialog, and then opens the file and reads the first 4 bytes (an int) to determine which data log version is required, the doc would then instantiate an object of that log version class to handle reading the log file records into the structure. But, this seems to separate the file opening from the file reading, and it seems like that ought to be contained fully in a class meant to handle the data log files. If I don't open the file first, how else could I know which version class is needed?
Does this approach make sense? Is there a better way to keep software versions and data log versions compatible? What do others do to handle data files of different structures based on evolving formats?
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
David Chamberlain wrote:
then opens the file and reads the first 4 bytes (an int) to determine which data log version is required
That´s exactly what i do for my app. In fact, I have only _one_ type of structure, containing _all_ the stuff, and i only fill what is necessary given the version number. BUT i can do that only because i know there won´t be any further version (so the struct size won´t be larger) ... i guess that´s not the good solution anyway
~RaGE();
|
|
|
|
|
When faced with that problem, I typically use a file format that's similar to or based on the INI format. For instance...
[SoftareInfo]
Version=3
[Data]
SomeVariable = read me!
Bob = green
...
That way the code can just pluck out the variables it needs. If it doesn't find one it needs, it can use a default value.
This is also nice because it can be *forward* compatible too!
The one thing I *wouldn't* do is rely too heavily on MFC serialization. It can work in many cases, but if your file format has a major change, then your task becomes extremely difficult.
Of course, if you have *existing* file formats, then perhaps your classes that read data need to keep track of the version... like:
SomeClass::ReadData()
{
if(version >= 3)
read some piece of data
else
older versions stored that piece of data differently
...
}
Even if you win the rat race, you're still a rat.
|
|
|
|
|
I designed a DLL in .NET VC++ 7 with MFC. Can my DLL be used in VS6 application. I need to deliver MFC7 also. How can I do it ?
Any special concern in using the DLL in VS6 projects ?
|
|
|
|
|
Did you create the project using managed VC++ or just plain old C++? If it's plain C++ then there shouldn't be a problem to my knowledge. It's still just a DLL. If you used managed C++ then you'll probably have to use COM to access it.
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
It's normal C++ DLL, unmanaged. However, it depends on MFC and also C++ Runtime library, right ? So, I'm worrying how to let users of VS6 to use it.
|
|
|
|
|
when drag & drop buttons from CToolBarCtrl, default drag icon is a small hand, i need my own icon for special required.
do u know how to change the small hand to my icon?
thx
includeh10
|
|
|
|
|
Already tried smthg with SetDragCursorImage() ?
~RaGE();
|
|
|
|
|
no, thx.
in which message if possible?
includeh10
|
|
|
|
|
includeh10 wrote:
in which message if possible?
Oh, hell, i really don´t know ... i do not even know how to find that out... this function has to do do with a CImageList, but i´m afraid you´re not doing stuff with MFC at the moment ... I´ll keep looking, hold on...
~RaGE();
|
|
|
|
|
Found that :
ImageList_SetDragCursorImage
BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST himlDrag,
int iDrag, int dxHotSpot, int dyHotSpot);
Description: The ImageList_SetDragCursorImage function sets the image of the dragged item.
Parameters:
himlDrag and iDrag: Handle of the image list and index of the image.
dxHotSpot and dyHotSpot: The coordinates of the image’s hot spot.
Return value: TRUE if successful; NULL otherwise.
Does it help ??
~RaGE();
|
|
|
|
|
thank u, it really helps.
actually i use it many times in CTreeView, but never use in CToolBarCtrl, i can fix it soon, i think it's right function.
and, i'd like to say, u r a good and interesting mate, hope meet people as u often in my life.
cheers
includeh10
|
|
|
|
|
includeh10 wrote:
and, i'd like to say, u r a good and interesting mate, hope meet people as u often in my life.
Oh ... .. well, then, welcome at CodeProject, i think there will always be people here ready to help you, that´s the point of the forum ...
~RaGE();
|
|
|
|