Closing a dialog box [modified]
-
Hello, I am working on an mfc application in which i have a chat dialogbox with smiley button. On click of smiley button i am opeining a new dialogbox with emoticon Now i want to close the dialog with emoticon button when mouse is clicked outside it. Please help me how to do it. Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
-
Hello, I am working on an mfc application in which i have a chat dialogbox with smiley button. On click of smiley button i am opeining a new dialogbox with emoticon Now i want to close the dialog with emoticon button when mouse is clicked outside it. Please help me how to do it. Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
I believe you shouldn't have managed this with a dialog but with an owner drawn menu...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hello, I am working on an mfc application in which i have a chat dialogbox with smiley button. On click of smiley button i am opeining a new dialogbox with emoticon Now i want to close the dialog with emoticon button when mouse is clicked outside it. Please help me how to do it. Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
Handle WM_KILLFOCUS. Another way would be to create your window with WS_POPUPWINDOW style.
Some things seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Handle WM_KILLFOCUS. Another way would be to create your window with WS_POPUPWINDOW style.
Some things seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
I have created my window with WS_POPUP. How can I handle WM_KILLFOCUS. Please elaborate it if possible. Thanks
-
I believe you shouldn't have managed this with a dialog but with an owner drawn menu...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
can you help me with some article as i dont know this metho. How to use owner draw menu.
-
Hello, I am working on an mfc application in which i have a chat dialogbox with smiley button. On click of smiley button i am opeining a new dialogbox with emoticon Now i want to close the dialog with emoticon button when mouse is clicked outside it. Please help me how to do it. Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
If it is a modal dialog box then you have no chance. On the other hand, if it is a modeless dialog, then send it the
WM_CLOSE
message. :)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] -
If it is a modal dialog box then you have no chance. On the other hand, if it is a modeless dialog, then send it the
WM_CLOSE
message. :)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]Yes it is a modal dialog box. I am doing DoModal.
-
Hello, I am working on an mfc application in which i have a chat dialogbox with smiley button. On click of smiley button i am opeining a new dialogbox with emoticon Now i want to close the dialog with emoticon button when mouse is clicked outside it. Please help me how to do it. Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
SendMessage(hwnd,WM_CLOSE,0,0);.
-
can you help me with some article as i dont know this metho. How to use owner draw menu.
Dhiraj kumar Saini wrote:
How to use owner draw menu
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hello, I am working on an mfc application in which i have a chat dialogbox with smiley button. On click of smiley button i am opeining a new dialogbox with emoticon Now i want to close the dialog with emoticon button when mouse is clicked outside it. Please help me how to do it. Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
Dhiraj kumar Saini wrote:
Now i want to close the dialog...
If it's a modal dialog, call
EndDialog()
.Dhiraj kumar Saini wrote:
...when mouse is clicked outside it.
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch