#2.0 Help
4 messages in this thread
Does anyone have example source code for opening a screen under
Amigados 2.0?
It's no different than before – define a NewWindow structure then call
OpenWindow after opening up intuition.library and graphics.library. What _is_
different is the top row of the useable area inside the window – you have to
consider the height of the font the user selected for the window titles.
What I want to do is fine the cde that will let me open a screen that can
use all the different modes availale in 2.1 and 3 plus have everything
centered. I also need examples of ASL.
Thanks
Here's a quickie program to open up an ASL requestor-
/*
* 92-Apr-30 DJP
*/
#include <stdio.h> #include <libraries/asl.h> #include <proto/asl.h> #include
<proto/exec.h>
struct FileRequester *request; struct Library *AslBase;
void Abort (char *msg) {
if (request)
FreeAslRequest (request);
if (AslBase)
CloseLibrary (AslBase);
if (msg)
{
fputs (msg, stderr);
fputc ('\n', stderr);
}
exit (0); }
void main (void) {
if (!(AslBase = OpenLibrary (AslName, 0)))
Abort ("Can't OpenLibrary asl.");
if (!(request = AllocAslRequest (ASL_FileRequest, 0)))
Abort ("Can't AllocAslRequest.");
AslRequest (request, 0);
Abort (0); }
I don't know how to open up a screen-mode requestor yet.
— Dave