|
Ever thought about a Tree Control?
Bram van Kampen
|
|
|
|
|
After creating some thread, I want to keep track of them in a vector
(vector<boost::thread> ), but it fail.
So I need to use vector<boost::thread*>, but in this way, I have to free them manually.
modified on Monday, August 17, 2009 9:16 AM
|
|
|
|
|
followait wrote: (vector<boost::thread> ), but it fail.
What do you mean by "it fails" ?
I never used boost::thread before but if you are getting a compilation error, it probably means that the class do not allow to make copies of an instance (e.g. they made the assignement operator and copy constructor private).
|
|
|
|
|
Cedric Moonen wrote: the class do not allow to make copies of an instance (e.g. they made the assignement operator and copy constructor private).
Exactly right - just like IOstreams
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Use a std::vector<boost::shared_ptr<boost::thread> > . That way you get a copyable object that manages its resources itself.
it makes a lot of sense for a thread object to be non-copyable[^] - just like it makes sense for an iostream to be non-copyable. When you have a link to a concept visible outside your program, you only want one object to manage it otherwise you could get contradictory scenarios happening, like one object killing the thread while another is trying to join the thread or something.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
But when using pointer, this still will happen.
Maybe things should be synchonized, but it'll be inefficient.
|
|
|
|
|
followait wrote: But when using pointer, this still will happen.
No it won't - you'll be copying the pointer, not the object it refers to.
followait wrote: Maybe things should be synchonized, but it'll be inefficient.
Really? I think not.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote:
No it won't - you'll be copying the pointer, not the object it refers to.
More than one pointers can do things than conflicts simultaneously in different threads.
Stuart Dootson wrote:
Really? I think not.
Agree, it's good to keep it simple for the fundamental concept. It can be encapsulated as needed.
|
|
|
|
|
Or you can use boost::ptr_vector<boost::thread> and it will delete the pointers for you when it goes out of scope.
Of course, Stuart's solution with shared pointers will work as well and may be even safer.
|
|
|
|
|
Hi
I want to show a web page in an html dialog(CDHtmlDialog) that has proxy!
I know how to do it via CInternetSession (with SetOption() method), but how to do it here?
Thanks
www.logicsims.ir
|
|
|
|
|
The question is somehow not very clear, that's why -may be- you didn't receive a reply.
Do you mean that you want the CDHtmlDialog to navigate to your webpage via a given proxy ?
I fear that case that the class wouldn't be inheriting options directly from Internet Explorer, otherwise there should be a way how to access the attached Html engine and set it to use a proxy.
This is all what I can help with.
Good luck.
Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com
|
|
|
|
|
sorry if it's not clear
Yes I want the CDHtmlDialog to navigate to my webpage via a given proxy?
And I wanna set the proxy settings (address&port&username&password) via my code.
Also if I can call a url that has a proxy may be helpfull, for example an API or something!
thanks
www.logicsims.ir
|
|
|
|
|
I found out that CDHtmlDialog holds a pointer to the IWebBrowser2 interface which I suspect to inherit evrything from Internet Explorer application.
That case you must configure the proxy in Internet Explorer itself (Tools => Options => Connection settings => LAN settings) whether manually or "programmatically".
Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com
|
|
|
|
|
Hi All
i need to write some data in excel file.I user CBasicExcel but in this calss memory leak problem.There is any more class.
Thanks in advance
|
|
|
|
|
I didn't see any memory leaks in CBasicExcel . Chances are that you're misusing it.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi Subramanian
if you see in the article <pre>CBasicExcel</pre> FAQ then you have found too many question about Memory leak and LongFile.
|
|
|
|
|
where can I found documentation of that class in msdn
Trioum
|
|
|
|
|
i think you should ask that question from author of CBasicExcel.
|
|
|
|
|
who is author and please forward me link
Trioum
|
|
|
|
|
|
Did you actually experience memory leaks while using it, or are you just going by some comments in the page?
The article updates section says that memory leaks were fixed. However, I've used the said class in a few instances and I did not find any memory leaks. May be I did not use it extensively enough, but it was sufficient for my purposes. You might as well want to try XLW (just google it).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Ok Can any one tell how can i use
XLW
Plz help me.I need forum member help
|
|
|
|
|
Hello,
XLW has a mailing list, which you can use to obtain help with using it. Take a look at the following page for more information: http://sourceforge.net/projects/xlw/support[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks
Subramanian
But i havnn't found any topic How to use Xlw.If it's possible then give me step.How to write data in excel through XLW.
please help.
|
|
|
|
|
rdop wrote: Thanks
You're welcome.
rdop wrote: But i havnn't found any topic How to use Xlw.If it's possible then give me step.How to write data in excel through XLW.
Use the link that I gave to you in my previous post. There is a mailing list, that you will have to join and you can discuss stuff related to XLW (including asking for technical help) in it.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|