Solved

Add an icon in top right

Posted on 1997-06-16
3
257 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 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
Windows Drag & Drop Location 2 108
haveThree challenge 22 121
mapAB Challlenge 35 159
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 873
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

830 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