|
Wow, lightening fast response.
Cheers... never even heard of std::pair....
Will look into it, thanks.
--
The Obliterator
|
|
|
|
|
Can anyone tell me how to implement multi-selection with the CTreeCtrl? I'm a bit green with MFC and doesn't appear obvious to me.
Principle Design Engineer
EMC Corporation
|
|
|
|
|
The solution was published in Oct'96 issue of Microsoft Systems Journal, in the C++ Q & A column. Chances are you have the article in your VC++ help - look in the 'Periodicals' section. If not, go to msdn.microsoft.com, then to MSDN Magazine and search for past issues.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Found it. Thanks Tomasz.
Ken Goguen
Principle Design Engineer
EMC Corporation
|
|
|
|
|
To my knowledge it doesn't support it, although it may have been added in the later common controls.
I have developed my own treectrl which supports multi selection and multi column support (some work my own, some based on others contributions to CodeProject and CodeGuru)...
Ideally I keep meaning to post an article here with it... but never seem to get chance. Plus it contains code which needs improving - drag/dropping the order of columns for instance is buggy, the database support I added uses DAO classes which really need to be re-written in ADO or something. I never finished the sort routine... you know what I mean.
Anyhow if you're desperate for something I guess I could send you it.
Not sure if theres really a demand anymore for an article... there seems to be several multi-column tree controls now.
--
The Obliterator
|
|
|
|
|
Do you know if it is possible to create an 64-bit value (double) by concatenating two specified 32-bit values (long)??
The macro MAKELONG exists but MAKEDOUBLE, no...Apparently, it is not possible to make a << on a double?? Do you know a way to do it?
Thanks,
LX
|
|
|
|
|
What exactly do you want to do? You know that long and double are two different animals, don't you? One is integer type and another is floating point. This means that glueing together two longs doesn't produce one double.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Yes, it's right !!
What I want to do is based on STL :
------------------------------------------
typedef struct _MYSTRUCTURE
{
long lType;
long lSubType;
}MYSTRUCTURE;
typedef std::vector<long> lID;
typedef std::map<mystructure, lid=""> myMap;
-------------------------------------------
But when I do a 'find.' on myMap, STL can't find my vector in searching on MYSTRUCTURE 'cause it can't compare : ...
----
MYSTRUCTURE myStructure;
myStructure.lType = 10;
myStructure.lSubType = 11;
myMap::iterator it;
it = m_mymap.find(myStructure);
----
So, I wanted to concatenated the 2 longs and using
typedef std::map<double, lid=""> myMap;
but, you're right : double and long are two differents animals...
Do you see a solution ?
LX
|
|
|
|
|
Your code got scrambled - you didn't replace < and > with < and >
Anyway, using std::pair to keep type and subtype together may be solution for your problem.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
oh, sorry for the forgotten < My code was not very aesy to read...
Anyway, you're response is very helpful for me
!! I think that std::pair will works...
Thanks you very much, Tomasz!!
LX
|
|
|
|
|
|
Are there any similiar functions to BeginUpdateResource, UpdateResoure ... that work on Windows 95,98 and not only NT and 2000?
|
|
|
|
|
No, there are no such functions on Win9x. Are you the same guy who wants to write 'small info' into executable?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Yes
It would really be very easy use resources, but unfortunately these functions are supported only on WinNT
regards,
Gregor
|
|
|
|
|
|
I just want to store two strings within the .exe
e.g. one string would be something like "C:\Program Files\SomePrograme\some.exe"
|
|
|
|
|
Why is it important? Can't you store this information somewhere else? (registry, .ini file)
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I just want to know HOW it works, and IF it works.
But the hint from Joaquín M López Muñoz in the reply above
helped me a lot, I will first try to use these functions
|
|
|
|
|
I just want to know HOW it works, and IF it works.
Knowledge is the key to power
Even with these functions, you'll still face the problem with writing to running .exe.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Erik Kallen wrote an amazing clone of these functions that works on all Win platforms. Check it out in CodeGuru: Updating Resources on Win9x
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have created an application, but failed to check the context help file option. Is there anyway I can add it now?
Thanks.
|
|
|
|
|
s. u can. wizard is the one that adds code for u. u can also add the same code at any point. there is something called as HtmlHelp. Try using it and implmentating context sensitive help.
Documentation are there in MSDN for implementing this. Or compare to source codes one with Context-help checked and other unchecked and add the differencing code by hand. thats it
Ganesh.M.Ramaswamy
|
|
|
|
|
I need to implement logging to a text file. The logged messages are small, but there can be huge number of them. But, I want to make sure that the log is intact even if the application crashes. But, if I open and close the file for each it seems like lot of load. Do anyone have any suggestions for this?
modified 29-Aug-18 21:01pm.
|
|
|
|
|
If you're concerned with "lot of load", use CreateFile with FILE_FLAG_WRITE_THROUGH flag, and keep the file open.
KB article Q99794 has more info.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thank you very much for the prompt reply. I will check that out.
Thanks again.
- Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|