|
Of course I know you are a good programer and its not difficult for you
|
|
|
|
|
WhiteSky wrote: Of course I know you are a good programer and its not difficult for you
my Project lead don't think so [ ];P.. and i am making him to believe that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
dude it's unmanaged forum!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Change the Id of the button to something else than IDCANCEL. That will solve the part concerning the closing of the dialog.
Concerning stopping the thread, it depends of your code. Is the thread running an 'infinite loop' ? (something like while(true) ). If yes, then you can check for a boolean and set this boolean to false when you press the button.
|
|
|
|
|
Hi,
Keep two buttons. One OK and another Cancel on the dialog. Keep a member variable in the dialog class of type CWinThread* say m_pThread. Now
create the thread in the OnOK() event handler as
m_pThread=AfxBeginThread(ThFunc,0,0); where ThFunc is the function pointer to your thread controlling function and the next argument is the argument passed to your function which I have passed 0 here. This function should be of type UINT YourThreadFunc(LPVOID pParam).
To stop execution of the thread write in the OnCancel() event handler
m_pThread->SuspendThread();
Hope this will help you.
Barna
|
|
|
|
|
Bad advice. See here[^] for details.
Steve
|
|
|
|
|
If you can come up with some good advice and a real solution to the actual problem then put it there.
Barna
|
|
|
|
|
My advice was valuable: pointing out unsafe solutions is a valid point to make.
Steve
|
|
|
|
|
The point is to get a solution to the actual problem posted. Do that.
Barna
|
|
|
|
|
Look dude, I just pointed out that your solution was bad. This took me 5 seconds and one line of text. I post heaps of messages on this forum and make an effort to be helpful – when time permits. Now I’m sorry if you’ve been offended but nevertheless my post has merit and is informative. Perhaps not as immediately useful as a full solution: but knowing what not to do should not be underrated. Perhaps it’s taught you something for example.
Steve
|
|
|
|
|
Steve, please stop arguing with him. Any person with a civic sense must have understood that what he did was a mistake by now. Ironically, he keeps arguing.
"The difficulty lies, not in the new ideas, but in escaping from the old ones."
-- John Maynard Keyes, 1936
|
|
|
|
|
There is no point in any argument with persons or persons who does not know how to write a line of text. Any person with a civic sense moral attitude and good characteristics must have understood that till now.
|
|
|
|
|
BarnaKol wrote: There is no point in any argument with persons or persons who does not know how to write a line of text. Any person with a civic sense moral attitude and good characteristics must have understood that till now.
Then why in the hell are you replying to me, when I am not interested in talking to you any more and when I was speaking to Steve? This pretty much proves what I said.
"The difficulty lies, not in the new ideas, but in escaping from the old ones."
-- John Maynard Keyes, 1936
|
|
|
|
|
Then why are you replying on me and my messages or the posts of mine. If you dont have anything to do then count the stars in the night sky. That fits you perfectly. You are nothing but a dam fool.
|
|
|
|
|
brahmma wrote: Ironically, he keeps arguing.
Where's the irony?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Where's the irony?
Steve assumed that guy to be someone with a civic sense, but the guy kept coming back like a moron without accepting his mistake to prove that he is an idiot.
|
|
|
|
|
People who does have a civic sence does not write words like "morn" or "idiot" in a public forum. This lesson does come from his/her parents and family. But people like you does not have a family or parents with good civic sence to leran that. So learn from me and tell your parents and family to learn that too. If they cant send them to me.
|
|
|
|
|
Your mental prowess is... overwhelming. I humbly bow before you.
|
|
|
|
|
Joergen Sigvardsson wrote: Your mental prowess is... overwhelming. I humbly bow before you.
That is classic.
Shog on learning VB6: Ah, that would have been VB6. Kicked my ass anyway. So easy to learn, just like falling down a flight of stairs...
|
|
|
|
|
brahmma wrote: That is classic
humm... i missed out complete thread.. it's seems very interesting
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
DavidCrow wrote: Where's the irony?
Well, I keep mine right next to the bronzey and the brassy. No idea where brahmma keeps his.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash 24/04/2004
|
|
|
|
|
brahmma wrote: Ironically, he keeps arguing.
thats democracy man!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Look dude, What is of use to know how long it took you to understand and how many lines you wrote. What is of use to know how big heaps of messages you post in this forum.You dont have the actual solution lacks your merit. Why "Perhaps not as immediately useful as a full solution". Why not the full solution. My posts have also taught you how to post messages.
Barna
|
|
|
|
|
I'm going to take brahmma's advice and stop arguing this issue after this post. But first I'll say this:
Your advice was bad, pure and simple. In fact it was very bad as it creates a class of bug that's very hard to track down and is nondeterministic. Now again I reiterate that I’m sorry if you got offended or embarrassed, but I’ve taught both you and potentially the OP a valuable lesson. I have spent as much time on this issue as I can afford to, I’m sorry if this isn’t good enough for you. There is no law that says I can only respond to the OP: the threads are hierarchical after all.
Steve
|
|
|
|
|
Why cant you come up with an actual solution to the problem. Have some ice cream or cold drink and sit down, get the solution,execute it,post it. I very well know you can. Dont get into brahmma's advice this will lead you to a bad heartattack.
|
|
|
|