Denis,

> > MenuCmdBarAddButton(menuCmdBarOnLeft, /* BarInfoBitmap */,
> >                     menuCmdBarResultNotify, whatGoesHere,
> >                     "Action");
> > 
> > However, there are two things that I don't know how to do:
> > 1) How to get my bitmap/icon in place of the info bitmap/icon.  By the
> > way,
> > what is the size supposed to be?
> 
> "The bitmap's dimensions should be 13 pixels high by 16 pixels wide."

Thanks.

> How-to : see a previous post I did a couple of days ago. Basically, you want
> to 
> have the bitmap loaded and available when the Command Bar is actually
> displayed 
> (which is after you processed the notification, therefore after your code has
> 
> been unloaded...).

I'll check out the post.

> Someone suggested you open your resource database and let it open. However, I
> 
> don't think it's clean, since :
> 1) you keep a database open, which is not a best practice in my opinion.
> 2) (more important) the resource IDs in your database can conflict with those
> 
> of the current application.
> 
> > 2) When the bitmap/icon is pressed, how do I do my action?  I'm guessing
> > that I need to send a notification back to myself using the
> > menuCmdBarResultNotify option.  However, will I be the only one getting 
> > that notification?  Can the whatGoesHere be a custom notification that 
> > only I care about?
> 
> Yes, whatGoesHere is your notification code. Typically, use your Creator ID
> or 
> a Creator ID you register for that use. This way, no one else should receive 
> the notification.

Do you mean that when I register for a notification for my app that has a
creator ID of 'Fred' I do this:

SysNotifyRegister(myCardNo, myDbID, 'Fred',
                  NULL, sysNotifyNormalPriority, NULL);

and then respond to a notificaiton of type 'Fred'?

that sounds a bit odd.  I must be missing something here.

> BTW, I have an additional question to the topic. Is it possible to access the
> 
> content (especially the active field) of the current form, when I get the 
> sysNotifyMenuCmdBarOpenEvent ? I didn't manage to do so. What I tried :
> 
> (we are processing sysNotifyMenuCmdBarOpenEvent)
> FormPtr frm = FrmGetActiveForm();  // this returns a non-null FormPtr
> FieldPtr fld = FrmGetActiveField(frm); // this fails...

Interesting question.  I want to see who has an answer for this one.

Mike

> 
> Any idea ?
> 
> -- Denis Faivre - [EMAIL PROTECTED]
> -- Ablivio - http://www.ablivio.com
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/support/forums/


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to