Copy link to clipboard
Copied
Hi everyone..!!
I have a question.. When we display a modal dialog on mac, it does not contain a close icon at the top left corner. If the dialog type is panel then the close icon appears. What should be done so that the close icon shows on the dialog when its type is modal... for eg, kADMSystemAlertDialogStyle..?? Does something need to be changed in the resource file in the section that defines the dialog specifications mentioned below..?
resource 'DLOG' (kMyDialog, "My Dialog", purgeable) {
{0, 0, 580, 570}, // top, left, bottom, right
5, // movableDBoxProc
0x0, // not visible initially
0x0, // no close button
0x0, // application options
18504, // resource ID
"My Dialog", // dialog title
0x0 // dialog positioning noAutoCenter
};
I tried changing values for the "no close button", but as there is no document that describes what the valid values for that field are, so I had no success..
Please help..
Thanks!
ADM has been deprecated for quite some time. You really shouldn't be using it.
Copy link to clipboard
Copied
Hey folks, please reply sooooooon... Is there no way for the close icon to appear in the title bar of a modal dialog on Mac?
Thanks!
Copy link to clipboard
Copied
Hi...
I got a further lead in this problem... In the class ADMDialog.h, in the comments described for Create & Modal functions for creating ADM Dialogs, there are some options described for the last parameter of these functions:
ADMInt32 ADMAPI (*Modal)(SPPluginRef inPluginRef, const char* inName,
ADMInt32 inDialogID, ADMDialogStyle inDialogStyle,
ADMDialogInitProc inInitProc, ADMUserData inUserData, ADMInt32 inOptions);
Now, there are some values that can be given in that last parameter which define our creation options for the dialog. One of them is kADMModalDialogHasPaletteSystemControlsOption, which too is defined in the same class (ADMDialog.h) & which, as the comments say, shows a close box at the top right corner of modal dialogs.
So, I implemented this as,
sADMDialog->Modal(fPluginRef, "My Dialog", kMyDialog, kADMModalDialogStyle, NULL, NULL, kADMModalDialogHasPaletteSystemControlsOption);
This compiled just fine, but the dialog appeared without any close icon. Now, what to do?
Please guide me on this...
Thanks!
Copy link to clipboard
Copied
ADM has been deprecated for quite some time. You really shouldn't be using it.