Solved

Add an icon in top right

Posted on 1997-06-16
3
265 Views
Last Modified: 2013-12-26
Where can I find documentation/sample source code on what to use if I want to add an icon in the top right of the screen, that is always present (like the Balloon Help icon). Also, is it possible to change this icon after initial initialization? I'm trying to create an app that'll use such an icon to indicate the status of a running daemon.
0
Comment
Question by:drz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
PAD earned 150 total points
ID: 1291503
Warning the feature you describe do not seems to match the Apple Interface Guideline.
An application is not allowed to add an icon in menu bar.
The icon that are present are handle by extension not application and are menus not icon.

To find sample go the apple developper web site and look for adding icon-menu in sample codes and snippets

http://devworld.apple.com/dev/techsupport/source/index.html

on this site you will also find all apple documentation in the InsideMac section

Hope this will help you

0
 
LVL 1

Expert Comment

by:atlas
ID: 1291504
Apple very kindly provide the Notification manger routines to do just this task. You are limited to using the Apple menu or Finder (read Application) menu, but it suffices the most users.
The following example is taken from Think Reference and displays an alert and flashes the icon (changes the code as per your needs).
/* CODE EXAMPLE #1 */
// How to set up a notification record.

      NMRec      myNotification;      //a notification record
      short      myResNum;      //resource ID of small icon resource
      Handle      myResHand;      //handle to small icon resource
      Str255      myText = "\pSample Alert Box";
                                                                  //string to print in alert box

      myResNum = 1234;            //resource ID in resource fork
      myResHand = GetResource('SICN', myResNum);
                                                                  //get small icon from resource fork

      myNotification.qType = nmType;      //set queue type
      myNotification.nmMark = 1;      //put mark in Application menu
      myNotification.nmIcon = myResHand;//alternating icon
      myNotification.nmSound = (Handle)-1;      //play system alert
                                                                              // sound
      myNotification.nmStr = myText;      //display alert box
      myNotification.nmResp = nil;      //no response procedure
      myNotification.nmRefCon = 0;                  //not needed


0
 
LVL 1

Author Comment

by:drz
ID: 1291505
PAD,
I don't think you entirely understand my question. I want the icon there when my application is not in the foreground. atlas' answer was great though, very helpful. (Sorry, can't give you the points.)

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 150
Process filename extension 3 218
notReplace  challenge 53 153
Excel file not created as expected 7 110
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question