andrewmchorney
asked on
Disable Main Window close button and pulldown
I have some Xwindows/Motif programs in which we want to disable the double click close button at the upper left part of the window and the close menu item for the main window pulldown menu. I have no problems with the button and pulldown, I just want the automatic closing disabled.
Thanks,
Andrew
Thanks,
Andrew
ASKER
We will be trying out this solution shortly. Thanks for the quick response.
Andrew
Andrew
ASKER
Could you explain the lines of code as to how they relate to disabling action on main window close and main window close pulldown.
ASKER
Another suggestion from engineers is to trap the close on the close button and window close menu item and treat is as though the exit button was selected.
ASKER
This does not disable the close menu item or the close action for the window menu button.
ASKER
I just talked to a technical support person at ICS whose product we bought to do window development. Apparently disabling the close button in CDE may not be possible.
ASKER
ydsh
The solution does work under CDE. Post a message to this question and I will declare the question answered and you will get credit for the question with a grade of "A".
Andrew
The solution does work under CDE. Post a message to this question and I will declare the question answered and you will get credit for the question with a grade of "A".
Andrew
Dear Mr. andrewmchorney,
I have to tell you that my solution works both on HP VUE and CDE. Besides, I have ported
the codes to Solaris2.5 which also has the CDE, and it works fairly well.
As to the following definitions:
MWM_DECOR_TITLE|MWM_DECOR_ BORDER
|MWM_DECOR_MINIMIZE|MWM_DE COR_MENU,
I suggest that you should refer to the Motif development books.
Good luck.
yours
ydsh
I have to tell you that my solution works both on HP VUE and CDE. Besides, I have ported
the codes to Solaris2.5 which also has the CDE, and it works fairly well.
As to the following definitions:
MWM_DECOR_TITLE|MWM_DECOR_
|MWM_DECOR_MINIMIZE|MWM_DE
I suggest that you should refer to the Motif development books.
Good luck.
yours
ydsh
ASKER
ydsh
I had to put the code into the class constructor for the builder accessory code and it works quite well. Your solution was excellent.
I had to put the code into the class constructor for the builder accessory code and it works quite well. Your solution was excellent.
ASKER
ydsh
declare the solution and I will accept the answer and you will get the points and a grade of A.
Andrew
declare the solution and I will accept the answer and you will get the points and a grade of A.
Andrew
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solution and explaination was excellent.
of your program:
.
#include <Xm/MwmUtil.h>
.
XtVaSetValues(toplevel,
XmNmwmDecorations,MWM_DECO
|MWM_DECOR_MINIMIZE|MWM_DE
XmNmwmFunctions, MWM_FUNC_MOVE|MWM_FUNC_MIN
NULL);