Pages vues depuis 06/01/2019 : 15 679 894
Index du forum »» Développement »» [Résolu] - Ouvrir une requête de fichier sur un autre écran
...
if ((screen = OpenScreenTags(NULL, SA_PubName, "coucou", TAG_DONE)))
{
if ((fr = (struct FileRequester *) AllocAslRequestTags(ASL_FileRequest, TAG_DONE)))
{
AslRequestTags(fr, ASLFR_PubScreenName, "coucou", TAG_DONE);
AslRequestTags(fr, ASLFR_Screen, screen, TAG_DONE);
FreeAslRequest(fr);
}
CloseScreen(screen);
}
...
/* ouverture de l'écran */
if ((ecran=OpenScreenTags(NULL,
SA_Title,"Logo",
SA_Width,1024,
SA_Height,768,
SA_Depth,24,
TAG_DONE))==NULL)
cleanexit("Pas d'ecran !!\n",RETURN_FAIL);
frtags = sauve_tags;
if (charge) frtags = charge_tags;
if (fr = (struct FileRequester *)
AllocAslRequest(ASL_FileRequest, frtags))
{
if (AslRequest(fr, NULL))
{
longueur = strlen(fr->rf_Dir)+strlen(fr->rf_File)+4;
NomComplet = (char *)malloc(longueur);
strcpy(NomComplet,fr->rf_Dir);
if (AddPart(NomComplet,fr->rf_File,longueur))
o = ConsTxt(NomComplet);
free(NomComplet);
}
FreeAslRequest(fr);
}
struct TagItem charge_tags[] =
{
ASLFR_TitleText, (ULONG)"charger un fichier logo ",
ASLFR_InitialHeight, MYHEIGHT,
ASLFR_InitialWidth, MYWIDTH,
ASLFR_InitialLeftEdge, MYLEFTEDGE,
ASLFR_InitialTopEdge, MYTOPEDGE,
ASLFR_PositiveText, (ULONG)"Charge",
ASLFR_NegativeText, (ULONG)"Abandon",
ASLFR_InitialDrawer, (ULONG)"",
ASLFR_PubScreenName, (ULONG)"logo",
TAG_DONE
};
struct TagItem sauve_tags[] =
{
ASLFR_TitleText, (ULONG)"sauver un fichier logo ",
ASLFR_InitialHeight, MYHEIGHT,
ASLFR_InitialWidth, MYWIDTH,
ASLFR_InitialLeftEdge, MYLEFTEDGE,
ASLFR_InitialTopEdge, MYTOPEDGE,
ASLFR_PositiveText, (ULONG)"sauve",
ASLFR_NegativeText, (ULONG)"Abandon",
ASLFR_InitialDrawer, (ULONG)"",
ASLFR_PubScreenName, (ULONG)"logo",
TAG_DONE
};