amiga-news DEUTSCHE VERSION
.
Links| Forums| Comments| Report news
.
Chat| Polls| Newsticker| Archive
.

amiga-news.de Forum > Programmierung > GUI mit MUI [ - Search - New posts - Register - Login - ]

-1- [ - Post reply - ]

2003-11-16, 18:48 h

JensB
Posts: 193
User
Hi ich möchte ein Fenster mit einigen knöpfen erstellen und krieg das mit MUI in C einfach nicht hin. Was mach ich da Falsch ?
Nicht meckern der Code sieht schon ziemlich gräslich aus Probiere aber schon den ganzen Tag. In E hauts hin !

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// includes habe ich mal weggelassen

struct ExecBase *SysBase = NULL;
struct Library *MUIMasterBase = NULL;
struct IntuitionBase *IntuitionBase = NULL;
struct DosLibrary *DOSBase = NULL;
struct GfxBase *GfxBase =NULL;

#ifndef MAKE_ID
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
#endif



/* program */

int main(int argc, char **argv)
{

APTR app,main_window,ch1,ch2;

SysBase = *((struct ExecBase**) 4);

if (!(MUIMasterBase = OpenLibrary(MUIMASTER_NAME,MUIMASTER_VMIN)))
{
printf("jumping jackn");
goto fail;
}
else
{
printf("leg jetzt losn");
app= ApplicationObject,
MUIA_Application_Title , "test",
MUIA_Application_Version , "$VER: versuch 01 (16.11.2003)",
MUIA_Application_Copyright , "c2003,testname",
MUIA_Application_Author , "testname",
MUIA_Application_Description, "",
MUIA_Application_Base , "testname",

SubWindow, main_window = WindowObject,
MUIA_Window_Title , "testname" ,
MUIA_Window_ID , MAKE_ID('T','E','S','T'),

WindowContents, HGroup,

Child, VGroup, GroupFrame,

Child, HGroup, MUIA_Weight, 0,
Child, ch1=CheckMark(TRUE),
Child, ch2=CheckMark(TRUE),
End,
End,
End,
End,
End;

printf("goton");
if (!app) goto fail;
printf("yupn");

++++++++++++++++++++++++++++++++++++++++++++
ab hier wirds irgendwie komisch ,wenn ich set() aktiviere gehts ab DoMethod nicht mehr ,printf sagt mir no wo gerade gearbeitet wird.

DoMethod(main_window,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,app,2,M UIM_Application_ReturnID,MUIV_Application_ReturnID_Quit);

printf("dotmethd");
//set(main_window,MUIA_Window_Open,TRUE);
/*{
ULONG sigs = 0;
printf("signal test ");
while (DoMethod(app,MUIM_Application_NewInput,&sigs) != MUIV_Application_ReturnID_Quit)
{
if (sigs)
{
sigs = Wait(sigs | SIGBREAKF_CTRL_C);
if (sigs & SIGBREAKF_CTRL_C) break;
}
}
} */

//set(main_window,MUIA_Window_Open,FALSE);

}


fail:
printf("testn");
if (app) MUI_DisposeObject(app);
if (MUIMasterBase) CloseLibrary(MUIMasterBase);
return;
}


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hoffe ihr könnt mir da irgendwie helfen und nicht meckern.

Mfg JensB



[ - Answer - Quote - Direct link - ]

2003-11-16, 20:47 h

Kronos
Posts: 1168
User
Bin zwar kein MUI-Experte,sondern selber noch Anfänger :glow: nur ist mir
"SubWindow" ein wenig aufgefallen, weil das AFAIK nur dazu dient um ein
Fenster an ein Hauptfenster anzuhängen, nicht direkt an ein App-Objekt.

Versuch doch mal folgenes:

app = ApplicationObject, End;
win = WindowOject, .........(alles was bei SubWindow steht) ....End;
DoMethod(app,OM_ADDMEMBER,win);
set(win,MUIA_Window_Open,True),


MfG
Kronos
--

Only the good die young all the evil seem to live forever

[ Dieser Beitrag wurde von Kronos am 16.11.2003 editiert. ]

[ - Answer - Quote - Direct link - ]

2003-11-16, 21:43 h

JensB
Posts: 193
User
Geht leider auch nicht !

Problem ist ja das wenn ich set() aktiviere alles vor DoMethod nicht
mehr abgearbeitet wird ,auch nicht Printf(). Es ist jetzt sogar so kras das der Rechner(PEG/MOS) abgestürtzt ist und jetzt ein fehler auf der Platte ist. Jetzt hab ich auch noch das problem das ich nicht hochfahren kann.Erst mal das beheben !


Mfg JensB

[ - Answer - Quote - Direct link - ]

2003-11-16, 22:15 h

Kronos
Posts: 1168
User
Aufem Peg ?

Da würd ich dir doch mal glatt raten mit den MUI-Beispielen aus dem SDK
anzufangen, die sollten immer funzen.


MfG
Kronos
--

Only the good die young all the evil seem to live forever

[ - Answer - Quote - Direct link - ]

2003-11-16, 23:43 h

JensB
Posts: 193
User
Rechner geht wieder dank sicherheitskopie ,ha !

Aus'm SDK hab ich ja dien ganzen kram rausgeschrieben ,habs ja dann
weils nicht ging noch abgeändert und nur noch in main() gepackt um nur ein ganz kleines beispiel zu haben .
Die beispiele aus dem SDK gehen ja auch nicht (MorphED,siehe meine Frage beim Pegasosforum als AmiMann,is noch mein alter nickname).
In E krieg ich die sache ja super hin , habs auch versucht von E nach C zu schreiben ,aber irgendwas mach ich falsch.

Mfg JensB

[ - Answer - Quote - Direct link - ]

2003-11-17, 10:33 h

HAK
Posts: 85
User
@ JensB,

SubWindow ist schon OK (ist ein #define SubWindow MUIA_Application_Window lt. mui.h).


Wenn ich die Zeile mit "set(main_window...." aktiviere erhalte ich als letzte Ausgabe die Meldung "yup" - ich nehme an, das ist bei dir auch der Fall.
IMHO liegt dies daran, daß du zwar IntuitionBase deklarierst (struct IntuitionBase *IntuitionBase = NULL;), diese jedoch nicht definierst (öffnest und einen gültigen Pointer zuweist).

Habe ich kurz mal gemacht und ausprobiert -> Window ging auf und gleich wieder zu.

Dann noch die Kommentare von der Hauptschleife entfernt und das Programm als solches funktioniert anscheinend (wenn es mir auch die printf unterdrückt).


PS: Wenn du Probleme bei den Beispielen im SDK hast solltest du dir das ebenfalls ansehen.
Hier funktioniert zumindest ein "make target" bzw. "make all" wenn ich es von MorphED aus aufrufe.


HTH


Bye HAK

[ Dieser Beitrag wurde von HAK am 17.11.2003 editiert. ]

[ Dieser Beitrag wurde von HAK am 17.11.2003 editiert. ]

[ - Answer - Quote - Direct link - ]

2003-11-17, 15:52 h

JensB
Posts: 193
User
Danke ! Werds nachher mal ausprobieren !!

Stimmt E öffnet ja automatisch Intuition.library C nicht !
----------------------------------------------------------

Yep hat funktioniert . DANKE !

[ Dieser Beitrag wurde von JensB am 17.11.2003 editiert. ]

[ Dieser Beitrag wurde von JensB am 17.11.2003 editiert. ]

[ - Answer - Quote - Direct link - ]

2003-11-17, 17:12 h

thomas
Posts: 7717
User
Zitat:
Original von JensB:
Danke ! Werds nachher mal ausprobieren !!

Stimmt E öffnet ja automatisch Intuition.library C nicht !



C macht das auch. Du mußt sie nur korrekt (oder gar nicht) deklarieren.

extern struct Library *IntuitionBase;

So wie du es machst, legst du eine neue Variable an und initialisierst sie mit NULL. Damit läßt du dem Compiler keine Chance.

Gruß Thomas
--
Email: thomas-rapp@web.de
Home: home.t-online.de/home/thomas-rapp/

[ - Answer - Quote - Direct link - ]

2003-11-18, 09:17 h

JensB
Posts: 193
User
Morgen,

doch noch immer ein Problem ,ich habe die Intuition.library geöffnet,ok geht auch aber nur wenn ich DoMethod() so benutze wie
Kronos es geschrieben hat . Benutze ich es so wie aus dem MOS_SDK
stopt das ganze bei DoMethod() wieder ,grübel ?

Mfg JensB

[ - Answer - Quote - Direct link - ]

2003-11-18, 12:57 h

HAK
Posts: 85
User
@ JensB,


Zitat:
doch noch immer ein Problem ,ich habe die Intuition.library geöffnet,ok geht auch aber nur wenn ich DoMethod() so benutze wie
Kronos es geschrieben hat . Benutze ich es so wie aus dem MOS_SDK
stopt das ganze bei DoMethod() wieder ,grübel ?


Hm, jetzt wird es interessant.

Ich habe einfach dein Programm genommen, die includes hinzugefügt und die von mir oben beschriebenen Änderungen durchgeführt und da hat es mit set funktioniert.

Wie sehen denn bei dir die #includes aus?

Kannst du die Beispiele im SDK schon kompilieren, oder bekommst du immer noch Fehler; wenn ja, dann solltest du wirklich nochmals dein SDK-Installation überprüfen.


Bye HAK

[ - Answer - Quote - Direct link - ]

2003-11-18, 14:35 h

JensB
Posts: 193
User
Kannst du mir deine änderungen mal schicken dann kann ichs mal bei mir ausprobieren und sehen ob die SDK stimmt !

Mfg JensB

[ - Answer - Quote - Direct link - ]

2003-12-10, 19:01 h

JensB
Posts: 193
User
Immer noch ein Problem ,ich wolte es unter AOS mit StormC V3 Compilieren,geht auch aber bei "struct Library *IntuitionBase=NULL"
schmiert die ganza sache beim starten des Programms ab. Ich habe alles ausgeklammert bis auf diese zeile und da liegt der Hase im Pfeffer. So meine vermutung , ich habe bei den Include Dateien was
falsch. Ich habe unter MOS #define <clib/... benutzt is wohl das falsche ,glaub ich. Ich habe nun mal versucht ne Doku zu finden was man wann wo benutzt,also wann benutzte ich <clib/ oder <proto/ oder
<pragma/ ,nichts oder ich hab ne closetbrille auf. Kann mir das mal jemand schildern ,ich habs bis jetzt auch nur aus Beispielen und lag ja auch immer Richtig. Nur in dem fall wo ich nun das Progi unter AOS und MOS comilieren wollte nicht.


Mfg JensB

[ - Answer - Quote - Direct link - ]

2003-12-10, 20:41 h

tokai
Posts: 1071
User
@jens

"#include <clib/...>" ist selbst für Classic-AOS Programmierung veraltet. Grundsätzlich "#include <proto/...>" verwenden.


Kannst du nochmal deinen kompletten Quelltext inkl. Makefile posten?
--
http://www.christianrosentreter.com




IRC: #amiganews.de @ARCNET (e.g. de3.arcnet.vapor.com/ port 6667)

[ Dieser Beitrag wurde von tokai am 10.12.2003 editiert. ]

[ - Answer - Quote - Direct link - ]

2003-12-10, 21:48 h

Kronos
Posts: 1168
User
Zitat:
Original von JensB:
Immer noch ein Problem ,ich wolte es unter AOS mit StormC V3 Compilieren,geht auch aber bei "struct Library *IntuitionBase=NULL"
schmiert die ganza sache beim starten des Programms ab. I


Hui ......

Normalerweise ist IntuitionBase bereits im startup-code angelegt und die
Lib auch geöffnet (je nach Compiler und Optionen). Könnte sein das du
die Variable mit NULL überschreibst :shock2:

MfG
Kronos
--

Only the good die young all the evil seem to live forever

[ - Answer - Quote - Direct link - ]

2003-12-10, 21:56 h

JensB
Posts: 193
User
Da is a !

Hab einige stellen geküzrt ,sind unwichtig da nur Text für Hilfe,Info und den Teil der die email in javascript abspeichert .
Ich weiß sind einige Sachen unnötig zum Bleistift die Utility Library ,habse noch nicht entfernt ,sollte erstmal alles Funktionieren bevor ich ans Optimieren denke !

Makefile von StormC oder MOS ?


/* -------------------------------Code Anfang------------------------

Hide-my-Email

--------------------------------------------------------------------*/

/* ---- includes ---- */

/* ANSIC */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <libraries/iffparse.h>
#include <libraries/mui.h>
#include <libraries/dos.h>
#include <libraries/locale.h>
#include <mui/nlist_mcc.h>
#include <mui/nlistview_mcc.h>

#include <dos/dos.h>
#include <graphics/gfxmacros.h>
#include <workbench/workbench.h>
#include <intuition/intuition.h>
#include <intuition/icclass.h>
#include <intuition/gadgetclass.h>
#include <exec/system.h>
#include <exec/libraries.h>

#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/icon.h>
#include <proto/graphics.h>
#include <proto/intuition.h>
#include <proto/gadtools.h>
#include <proto/utility.h>
#include <proto/asl.h>
#include <proto/muimaster.h>
#include <proto/locale.h>
#include <clib/muimaster_protos.h>

struct ExecBase *SysBase = NULL;
struct Library *MUIMasterBase = NULL;
struct IntuitionBase *IntuitionBase=NULL;
struct DosLibrary *DOSBase = NULL;
struct GfxBase *GfxBase =NULL;
struct UtilityBase *UtilitiBase =NULL;
struct Library *LocaleBase = NULL;
struct Catalog *mycatalog=NULL;

#include "hide-my-email_cat.h"

#define ERR_NULL 0
#define ERR_INTUI 1
#define ERR_UTILI 2
#define ERR_DOSBA 4
#define ERR_MUIMA 8
#define ERR_APP 16
#define ERR_FILE 32
#define ERR_EEMAIL 64
#define ERR_LOCAL 128
#define ERR_OLOCA 256
#define ERR_CATAL 512


#define ID_SCRIPTG 0x8000

//Info text
char *INFO_ARRAY[] = {"ecDieses Programm ist Freeware !",NULL};
char *HELP_ARRAY[] = {"eceuFunktionsweise",NULL};


// funktionen
int end();

// Variablen,etc.
APTR mui_app;


int convert2javascript(long Email,long Betreff,long Link)
{
return(ERR_NULL);
}


int error(int fehler)
{
struct EasyStruct EasyStruct;

EasyStruct.es_StructSize=sizeof(struct EasyStruct);
EasyStruct.es_Flags=NULL;

switch (fehler)
{
case ERR_INTUI:
printf("%sn",GetCatalogStr(mycatalog,ERROR_INTUI,ERROR_INTUI_STR)) ;
end();
break;
case ERR_UTILI:
EasyStruct.es_Title=GetCatalogStr(mycatalog,WINDOW_TITLE_ERR,WINDOW_TI TLE_ERR_STR);
EasyStruct.es_TextFormat=GetCatalogStr(mycatalog,ERROR_UTIL,ERROR_UTIL _STR);
EasyStruct.es_GadgetFormat=GetCatalogStr(mycatalog,BUTTON_OK,BUTTON_OK _STR);
EasyRequestArgs(NULL,&EasyStruct,NULL,NULL);
end();
break;
case ERR_DOSBA:
EasyStruct.es_Title=GetCatalogStr(mycatalog,WINDOW_TITLE_ERR,WINDOW_TI TLE_ERR_STR);
EasyStruct.es_TextFormat=GetCatalogStr(mycatalog,ERROR_DOS,ERROR_DOS_S TR);
EasyStruct.es_GadgetFormat=GetCatalogStr(mycatalog,BUTTON_OK,BUTTON_OK _STR);
EasyRequestArgs(NULL,&EasyStruct,NULL,NULL);
end();
break;
case ERR_MUIMA:
EasyStruct.es_Title=GetCatalogStr(mycatalog,WINDOW_TITLE_ERR,WINDOW_TI TLE_ERR_STR);
EasyStruct.es_TextFormat=GetCatalogStr(mycatalog,ERROR_MUI,ERROR_MUI_S TR);
EasyStruct.es_GadgetFormat=GetCatalogStr(mycatalog,BUTTON_OK,BUTTON_OK _STR);
EasyRequestArgs(NULL,&EasyStruct,NULL,NULL);
end();
break;
case ERR_LOCAL:
printf("Konnte Locale.Library V37 nicht öffnen !n");
end();
break;
default:
break;
}
return(0);
}

int init(void)
{

SysBase = *((struct ExecBase**) 4);
if (!(LocaleBase = (struct Library *)OpenLibrary("locale.library" , 37))) {error(ERR_LOCAL);}
if (!(mycatalog = (struct Catalog *)OpenCatalog(NULL,"Hide-My-eMail.catalog",TAG_END))) {error(ERR_CATAL);}
if (!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library" , 37))) {error(ERR_INTUI);}
if (!(UtilitiBase = (struct UtilityBase *)OpenLibrary("utility.library" , 37))) {error(ERR_UTILI);}
if (!(DOSBase = (struct DosLibrary *)OpenLibrary("dos.library" , 37))) {error(ERR_DOSBA);}
if (!(MUIMasterBase = (struct Library *)OpenLibrary(MUIMASTER_NAME ,MUIMASTER_VMIN))) {error(ERR_MUIMA);}
return(TRUE);
}



int end(void)
{
if (mui_app) MUI_DisposeObject(mui_app);
if (MUIMasterBase) CloseLibrary((struct Library *)MUIMasterBase);
if (mycatalog) CloseCatalog((struct Catalog *)mycatalog);
if (LocaleBase) CloseLibrary((struct Library *)LocaleBase);
if (DOSBase) CloseLibrary((struct Library *)DOSBase);
if (UtilitiBase) CloseLibrary((struct Library *)UtilitiBase);
if (IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
exit(0);
}


int main(int argc, char **argv)
{

APTR str1,str2,str3,bt1,bt2,bt3,bt_ok_info,bt_ok_help,lv,bt_info;
APTR main_window,info_window,help_window;
LONG email,betreff,link;
char emailstr[256];
int result=NULL;

if (init())
{
mui_app= ApplicationObject,
MUIA_Application_Title , "Hide-my-eMail",
MUIA_Application_Version , "$VER: Hide-My-eMail V1.0 (21.11.2003)",
MUIA_Application_Copyright , "@2003, Jens Begeschke",
MUIA_Application_Author , "Jens Begeschke",
MUIA_Application_Description, "",
MUIA_Application_Base , "Hide-My-EMail",

SubWindow ,main_window = WindowObject,
MUIA_Window_Title , GetCatalogStr(mycatalog,WINDOW_TITLE_MAIN,WINDOW_TITLE_MAIN_STR) ,
MUIA_Window_ID , MAKE_ID('H','M','E','L'),
MUIA_Window_Width , 320,

WindowContents, VGroup,
Child,HGroup,
Child, HGroup,
Child,HGroup,Child,ImageObject,MUIA_Image_Spec,"5:GUIPics/logo_morpho s.img",MUIA_Frame,MUIV_Frame_ImageButton,MUIA_Image_FreeVert,TRUE,
MUIA_Image_FreeHoriz,TRUE,MUIA_FixHeight,41,MUIA_FixWidth,48,End,End,

End,
Child, VGroup, GroupFrameT(GetCatalogStr(mycatalog,BUTTON_VORGABE,BUTTON_VORGABE_STR) ),
Child,HGroup,Child,Label(GetCatalogStr(mycatalog,LABEL_EMAIL ,LABEL_EMAIL_STR)),Child ,str1=StringObject,StringFrame,End,End,
Child,HGroup,Child,Label(GetCatalogStr(mycatalog,LABEL_BETREFF,LABEL_B ETREFF_STR)),Child ,str2=StringObject,StringFrame,End,End,
Child,HGroup,Child,Label(GetCatalogStr(mycatalog,LABEL_LINK ,LABEL_LINK_STR)),Child ,str3=StringObject,StringFrame,End,End,
End,End,
Child, HGroup ,
Child,bt1=SimpleButton(GetCatalogStr(mycatalog,BUTTON_HILFE ,BUTTON_HILFE_STR )),
Child,bt2=SimpleButton(GetCatalogStr(mycatalog,BUTTON_INFO ,BUTTON_INFO_STR )) ,
Child,bt3=SimpleButton(GetCatalogStr(mycatalog,BUTTON_SCRIPERS,BUTTON_ SCRIPERS_STR)),
End,
Child, HGroup,
Child,bt_info=TextObject,TextFrame,
MUIA_Background,MUII_TextBack,End,
End,End,

End,
SubWindow ,info_window = WindowObject,
MUIA_Window_Title , GetCatalogStr(mycatalog,WINDOW_TITLE_INFO,WINDOW_TITLE_INFO_STR),
MUIA_Window_Width , 600,
MUIA_Window_ID , MAKE_ID('I','N','F','O'),
WindowContents,VGroup,
Child,TextObject,GroupFrame,MUIA_Background,MUII_SHADOWFILL,MUIA_Text_ Contents,GetCatalogStr(mycatalog,TXT_UEBERSCHRIFT,TXT_UEBERSCHRIFT_STR ),End,
Child,NListviewObject,
MUIA_Listview_Input, TRUE,
MUIA_Listview_List, NListObject,
MUIA_Frame, MUIV_Frame_ReadList,
MUIA_NList_SourceArray,INFO_ARRAY,
MUIA_List_AdjustWidth, TRUE,
End,End,
Child,bt_ok_info=SimpleButton(GetCatalogStr(mycatalog,BUTTON_OK,BUTTON _OK_STR)),
End,
End,

SubWindow ,help_window = WindowObject,
MUIA_Window_Title , GetCatalogStr(mycatalog,WINDOW_TITLE_HELP,WINDOW_TITLE_HELP_STR),
MUIA_Window_ID , MAKE_ID('H','E','L','P'),
MUIA_Window_Width , 600,
WindowContents,VGroup,
Child,TextObject,GroupFrame,MUIA_Background,MUII_SHADOWFILL,MUIA_Text_ Contents,GetCatalogStr(mycatalog,TXT_UEBERSCHRIFT,TXT_UEBERSCHRIFT_STR ),End,
Child,NListviewObject,
MUIA_Listview_Input, FALSE,
MUIA_Listview_List, NListObject,
MUIA_Frame, MUIV_Frame_ReadList,
MUIA_NList_SourceArray,HELP_ARRAY,
MUIA_List_AdjustWidth, TRUE,
End,End,
Child,bt_ok_help=SimpleButton(GetCatalogStr(mycatalog,BUTTON_OK,BUTTON _OK_STR)),
End,
End,


End;

if (!mui_app) error(ERR_APP);

// Drücken von knöpfen
DoMethod(bt2 ,MUIM_Notify,MUIA_Pressed,FALSE,info_window ,3,MUIM_Set,MUIA_Window_Open,TRUE);
DoMethod(bt1 ,MUIM_Notify,MUIA_Pressed,FALSE,help_window ,3,MUIM_Set,MUIA_Window_Open,TRUE);
DoMethod(bt_ok_info ,MUIM_Notify,MUIA_Pressed,FALSE,info_window ,3,MUIM_Set,MUIA_Window_Open,FALSE);
DoMethod(bt_ok_help ,MUIM_Notify,MUIA_Pressed,FALSE,help_window ,3,MUIM_Set,MUIA_Window_Open,FALSE);

//Knöpfe gedrückt was nun ?
DoMethod(bt3 ,MUIM_Notify,MUIA_Pressed,FALSE,mui_app ,2,MUIM_Application_ReturnID,ID_SCRIPTG);

// TAB Cycle
DoMethod(main_window,MUIM_Window_SetCycleChain,bt1,bt2,bt3,str1,str2,s tr3,bt_info,NULL);

// Schliesst ein fenster beim drücken des close gadget
DoMethod(info_window,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,info_wi ndow,3,MUIM_Set,MUIA_Window_Open,FALSE);
DoMethod(help_window,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,help_wi ndow,3,MUIM_Set,MUIA_Window_Open,FALSE);
DoMethod(main_window,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,mui_app ,2,MUIM_Application_ReturnID,MUIV_Application_ReturnID_Quit);

set(main_window,MUIA_Window_Open,TRUE);
{
ULONG signal;
BOOL running = TRUE;
char *buf;



while (running)
{
switch (DoMethod(mui_app,MUIM_Application_Input,&signal))
{
case MUIV_Application_ReturnID_Quit:
running = FALSE;
break;
case ID_SCRIPTG:
get(str1,MUIA_String_Contents,&email );
get(str2,MUIA_String_Contents,&betreff);
get(str3,MUIA_String_Contents,&link );
result=convert2javascript(email,betreff,link);
switch (result)
{
case ERR_FILE:
MUI_Request(mui_app,main_window,0,GetCatalogStr(mycatalog,WINDOW_TITLE _ERR,WINDOW_TITLE_ERR_STR),GetCatalogStr(mycatalog,BUTTON_OK,BUTTON_OK _STR),GetCatalogStr(mycatalog,ERROR_FILE,ERROR_FILE_STR));
break;
case ERR_EEMAIL:
MUI_Request(mui_app,main_window,0,GetCatalogStr(mycatalog,WINDOW_TITLE _ERR,WINDOW_TITLE_ERR_STR),GetCatalogStr(mycatalog,BUTTON_OK,BUTTON_OK _STR),GetCatalogStr(mycatalog,ERROR_EMPTY_EMAIL,ERROR_EMPTY_EMAIL_STR) );
break;
case ERR_NULL:
sprintf(emailstr,GetCatalogStr(mycatalog,TXT_SAVED,TXT_SAVED_STR),emai l);
set(bt_info,MUIA_Text_Contents,emailstr);
break;
default:
break;
}
break;
default:
break;
}
if (running && signal) Wait(signal);
}
}
end();
}
}

/* ----------------------------Code Ende----------------------- */



[ - Answer - Quote - Direct link - ]

2003-12-12, 19:06 h

JensB
Posts: 193
User
He,

ich weiss ,ich nerv langsam :-).

Wie kann ich denn bei einem Button ein Image einfügen bzw. beides ?

Mfg JensB

[ - Answer - Quote - Direct link - ]


-1- [ - Post reply - ]


amiga-news.de Forum > Programmierung > GUI mit MUI [ - Search - New posts - Register - Login - ]


.
Masthead | Privacy policy | Netiquette | Advertising | Contact
Copyright © 1998-2024 by amiga-news.de - all rights reserved.
.