amiga-news ENGLISH VERSION
.
Links| Forum| Kommentare| News melden
.
Chat| Umfragen| Newsticker| Archiv
.

amiga-news.de Forum > Programmierung > How do I tweak the Amiga Menu Bar? [ - Suche - Neue Beiträge - Registrieren - Login - ]

-1- [ - Beitrag schreiben - ]

29.12.2001, 05:49 Uhr

SimoAmi
Posts: 3
Nutzer
I would like to know how to draw over the top white bar and steal its fonctions. Let's say to make another improved version. An example of applications that does that is Magic Menu. When you right click on the top of the bar, it shows a raised and shadowed menu.

Do u have any clue on how to do that in C/C++

Thanx

SimoAmi

[ - Antworten - Zitieren - Direktlink - ]

29.12.2001, 06:04 Uhr

Kronos
Posts: 1168
Nutzer
Struct Screen contains a RastPort (not a Pointer) so this should
work.
MyScreen = LockPubSceen("Workbench");// using 0L as argument should also work
Move(&Myscreen->RastPort,0,5);
Draw(&Myscreen->RastPort,1000,5);
--



Only the good die young all the evil seem to live forever (Iron Maiden)

[ - Antworten - Zitieren - Direktlink - ]

29.12.2001, 06:27 Uhr

SimoAmi
Posts: 3
Nutzer
Zitat:
Original von Kronos:
Struct Screen contains a RastPort (not a Pointer) so this should
work.
MyScreen = LockPubSceen("Workbench");// using 0L as argument should also work
Move(&Myscreen->RastPort,0,5);
Draw(&Myscreen->RastPort,1000,5);
--


Ah good,:) thanx. Some Issues:
- why should 'OL' work too. what does OL mean.
- Could you please explain what each line means. what are those arguments for (0,5,1000,5, RastPort, &Myscreen)
- What Library or package do Move() and Draw() belong to!

Do you know any tutorial, source in C that illustrate those functions.

Thanks

SimoAmi

[ - Antworten - Zitieren - Direktlink - ]

29.12.2001, 06:55 Uhr

Kronos
Posts: 1168
Nutzer
First i've missed a "r" in LockPubScreen :)
You should also use UnLockPubScreen(Myscreen) when your
programm finishs.
0L or NULL only means a 32bit wide zero.
Passing 0L mean you will get the PubScreen with the highest priority.
Normally this is the Workbench but could be set to any other Screen
by the User.

You realy should by the Devopler_CD_V2.1 to get more information.
The aminet is also a great source.
Move and Draw belong to graphics.library (Un)LockPubScreen to intuition.library.
Myscreen is a variable and you could use any other name for it. struct Screen *Myscreen declares a pointer to a screen.

Move and Draw require a pointer to struct RastPort as first argument.
Myscreen-> isn't a argument it just tells the compiler where to find
the RastPort.The & is needed because we want to pass a pointer to the
RastPort and not the RastPort.
The numbers are just the x and y coordinates.

You can also try:
http://www.amigau.com/c-programming/C/ctut.htm


--



Only the good die young all the evil seem to live forever (Iron Maiden)

[ - Antworten - Zitieren - Direktlink - ]


-1- [ - Beitrag schreiben - ]


amiga-news.de Forum > Programmierung > How do I tweak the Amiga Menu Bar? [ - Suche - Neue Beiträge - Registrieren - Login - ]


.
Impressum | Datenschutzerklärung | Netiquette | Werbung | Kontakt
Copyright © 1998-2024 by amiga-news.de - alle Rechte vorbehalten.
.