closing/hiding custom modeless dialogs?

R

Rikkert

I can't get my custom-made modeless dialog box (Visual C++.net Win32)
to respond to clicking the close button or pressing Alt-F4.

I am using the IsDialogMessage to check if messages are for my dialog.
However, my dialog procedure doesn't seem to get a WM_DESTROY message
when I click the close button. Also, pressing Alt-F4 does not close my
application when the dialog has focus (it does terminate when my main
window or another child of the main window has focus).

Btw I am not using any MFC.

Anyone knows the solution to this problem?
Any help is greatly appreciated!

Rikkert

(PS: could it have something to do with the WS_EX_NOPARENTNOTIFY style
set when using dialog box templates?)
 
T

Thomas Matthews

Rikkert said:
I can't get my custom-made modeless dialog box (Visual C++.net Win32)
to respond to clicking the close button or pressing Alt-F4. [snip]

Rikkert

(PS: could it have something to do with the WS_EX_NOPARENTNOTIFY style
set when using dialog box templates?)

It has nothing to do with WS_EX_NOPARENTNOTIFY, but it has all
to do with asking in the proper newsgroup. Try a microsoft
newsgroup (many are listed in the Welcome.txt below).

This newsgroup, discusses the _standard_ C++
language which has no facilities for windows nor dialog boxes.
Please read the FAQ below.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
P

Prateek R Karandikar

I can't get my custom-made modeless dialog box (Visual C++.net Win32)
to respond to clicking the close button or pressing Alt-F4.

I am using the IsDialogMessage to check if messages are for my dialog.
However, my dialog procedure doesn't seem to get a WM_DESTROY message
when I click the close button. Also, pressing Alt-F4 does not close my
application when the dialog has focus (it does terminate when my main
window or another child of the main window has focus).

Btw I am not using any MFC.

Anyone knows the solution to this problem?
Any help is greatly appreciated!

Rikkert

(PS: could it have something to do with the WS_EX_NOPARENTNOTIFY style
set when using dialog box templates?)

The following make no sense in Standard C++:
custom-made modeless dialog box
Visual C++.net Win32
clicking
close button
pressing Alt-F4
IsDialogMessage
dialog
dialog procedure
WM_DESTROY message
close my application
dialog has focus
main window
child
MFC

(This list is not meant to be exhaustive)

So your post makes no sense in the context of Standard C++.

-- --
Abstraction is selective ignorance.
-Andrew Koenig
-- --
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top