Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Add an icon in top right

Posted on 1997-06-16
3
Medium Priority
?
284 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
3 Comments
 
LVL 1

Accepted Solution

by:
PAD earned 300 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

926 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