|
If this is a property sheet (not just a tab control that you're managing yourself), handle PSN_KILLACTIVE and PSN_SETACTIVE .
|
|
|
|
|
Hi All,
I created and started a thread using AfxBeginThread().
I need to kill this thread from out side of the thread,
on any event like button click.
If I can use a global variable, and according to that i can kill it in the thread.
But is it a good way of doing?
Please clarify.
Regards,
Sunil Kumar
|
|
|
|
|
(IMHO) It is a viable approach.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
do a PeekMessage() and PumpMessage() in a loop, and once the loop exits do a CloseHandle().
|
|
|
|
|
In an around Mumbai, we reply to the person who asks a question. Not to someone who's standing next to him.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Rajesh R Subramanian wrote: In an around Mumbai, we reply to the person who asks a question. Not to someone who's standing next to him. Smile
Oh you Indians, yet not experiencing MTTP ( M essage T unneling T hrough P ersons)!!!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
sunilkumar.d wrote: If I can use a global variable, and according to that i can kill it in the thread.
Remember to use the volatile keyword.
|
|
|
|
|
yeah naveen, i forgot to use volatile.
Thanks for the info.
Regards,
Sunil Kumar
|
|
|
|
|
Here is a classic article, that discusses several aspects on the topic: Worker Threads[^]
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Beware. Trolls all around. Maybe they're LHC 's side-products.
(No need to say balncing occurred )
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Among all the other things, now LHC can be blamed too.
BTW, thanks for the vote.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Events are often a better way to go since the thread may be waiting for something. (Having threads simply run in a loop with a sleep timer is very bad programming.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I think this[^] is helpful for you.
|
|
|
|
|
Hi,
I have used two button controls and i want to make the lower border invisible and keep the upper and side border lines visible.
Can any one tell me how.
Please help me.
Thanks in advance
Dhiraj
|
|
|
|
|
Buttons one over the other?
Regards,
Rane
|
|
|
|
|
No the two buttons are not one another over. They are apart. Its just that I want to make the lower border invisible and and the two side border and upper border visible.
|
|
|
|
|
Place an empty static text over the border(s) that you want to hide and the other borders will still be visible..
Regards,
Rane
|
|
|
|
|
but when i take the mouse over the buttons the borders are again visisble
|
|
|
|
|
Check out this link[^]!
Regards,
Rane
|
|
|
|
|
|
This can be done with an owner-drawn button. You write the button-drawing code yourself, so you can make it do anything.
|
|
|
|
|
You can use of Owner Draw and then you can make your border for buttons(you muse be set OwnerDraw on the Button property).
|
|
|
|
|
For example,
class CWnd1 : public CDockablePane
class CWnd2 : public CDockablePane
/-------------------------\
| | |
| | |
| | <-- CWnd1 |
| | |
|---+ |
| | <-- CWnd2 |
| | |
\-------------------------/
system
modified on Wednesday, September 10, 2008 4:27 AM
|
|
|
|
|
I want to create the rgb24 or rgb32 bitmap having some text(example "sometext") on it .
the lenght of the bitmap should be the font size and width be the length of the text("sometext").
Rajesh
|
|
|
|
|
You can use Graphics::MeasureString for this purpose.
If you need accurate width and height read this article[^]
Regards,
Sandip.
|
|
|
|