I have a running calculator on VC++ and don't know how to get an exit button to work. (The X on top right works fine, but want an exit button) I have tried OnOK(); this->CloseWindow(); And other things. Still not managing to close the program from the button. Any tutorials or advice you all can give me?
Nandomo
-3
Junior Poster
Recommended Answers
Jump to PostIs this an MFC program, or what? In Windows Forms CloseWindow() only minimizes the window. You want DestroyWindow().
Jump to PostMaybe you are calling CloseWindow() from the wrong window???
Jump to PostIn your button control OnClick() handler just call OnOk()
Jump to PostHow did this topic turn from MFC to Windows Forms? Which one is it anyway?
All 17 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Nandomo
-3
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Nandomo
-3
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Nandomo
-3
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Nandomo
-3
Junior Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Nandomo
-3
Junior Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
gabryprof
2
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
anuj.juthani
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.