I found a small problem with the pbnote example. When you select
exit from the menu after you change the text the program will
quit with out asking if you want to save changes unlike when
you click the close box. All you have to do is change this line
CASE %WM_COMMAND
.....
CASE %IDM_EXIT
SendMessage hWnd, %WM_DESTROY, wParam, lParam
.....
END SELECT
to
CASE %WM_COMMAND
.....
CASE %IDM_EXIT
SendMessage hWnd, %WM_CLOSE, wParam, lParam
.....
END SELECT
One more thing I don't think the Case %IDM_CLOSE case within the
CASE %WM_COMMAND is ever used because the CASE %WM_CLOSE is used
when you press the close button and then when you select exit in
the menu the CASE %IDM_EXIT handles that but I am not sure.
exit from the menu after you change the text the program will
quit with out asking if you want to save changes unlike when
you click the close box. All you have to do is change this line
CASE %WM_COMMAND
.....
CASE %IDM_EXIT
SendMessage hWnd, %WM_DESTROY, wParam, lParam
.....
END SELECT
to
CASE %WM_COMMAND
.....
CASE %IDM_EXIT
SendMessage hWnd, %WM_CLOSE, wParam, lParam
.....
END SELECT
One more thing I don't think the Case %IDM_CLOSE case within the
CASE %WM_COMMAND is ever used because the CASE %WM_CLOSE is used
when you press the close button and then when you select exit in
the menu the CASE %IDM_EXIT handles that but I am not sure.

Comment