The message box sample works. The only problem is that the message box is dyplayed behind the custom scrreen i've opened. How to display on top of my screen?
The screen parameter is the last one so it should be:
IIntuition->IDoMethod(requester, RM_OPENREQ, NULL, NULL, scr);
@AmigaBlitter
Format of RM_OPENREQ message is (from classes/requester.h):
struct orRequest
{
ULONG MethodID;/* RM_OPENREQ */
struct TagItem *or_Attrs;/* List of tag attributes */
struct Window *or_Window;/* Reference window for requester. */
struct Screen *or_Screen;/* Reference screen for requester.
* REQUIRED if or_Window is
* not supplied
*/
};
To specify which screen the requester should open on you can either specify an intuition window pointer (opens on the same screen as the window) or a screen pointer directly. If both of these are NULL then the default public screen will be used (usually the WB screen).
From UQM port (src/libs/port/msgbox_amigaos4.c):
For more information see "SDK:Documentation/AutoDocs/requester_cl.doc".
Thank you for the info.
I tought that requester class was used for system request dialog only, such Open/Close/Save file and for displaying alerts.
What's UQM, btw?
http://sc2.sf.net/
The message box sample works. The only problem is that the message box is dyplayed behind the custom scrreen i've opened. How to display on top of my screen?
Thank you
@AmigaBlitter
You need to change the messagebox function to take a screen pointer as parameter, and then use the pointer in the opening method call:
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
@trixie
The screen parameter is the last one so it should be:
IIntuition->IDoMethod(requester, RM_OPENREQ, NULL, NULL, scr);
@AmigaBlitter
Format of RM_OPENREQ message is (from classes/requester.h):
To specify which screen the requester should open on you can either specify an intuition window pointer (opens on the same screen as the window) or a screen pointer directly. If both of these are NULL then the default public screen will be used (usually the WB screen).
@salass
You're right. I got fooled by the requester class autodoc, which says
so I assumed this is the same order of parameters as in the OPENREQ message. Perhaps it should be changed in the autodoc to avoid confusion?
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
@sallass00 & Trixie
Thank you. It works now!
@trixie
Yeah! Get a newbie like me: Autodocs say §":}{¶, wiki say :{}{":", newmethods, old methods :**éç macros: °PO°POoèpèo.....
Done.