Monday, July 26, 2010

Dynamic change CBA button



Code:
RESOURCE CBA r_yourapp_softkeys_options_open
(
buttons =
(
CBA_BUTTON (id = EAknSoftkeyOptions; txt = "Options";),
CBA_BUTTON (id = EYourAppCmdOpenApp; txt = "Open";)
);
)

RESOURCE CBA r_yourapp_softkeys_options_stop
(
buttons =
(
CBA_BUTTON (id = EAknSoftkeyOptions; txt = "Options";),
CBA_BUTTON (id = EYourAppCmdStopApp; txt = "Stop";)
);
)

In the HRH file

Code:
enum TYourAppCommandIds
(
/ / ...
id = EYourAppCmdOpenApp,
id = EYourAppCmdStopApp,
/ / ...
);

In your application''s AppUi class:

Code:
void CYourAppUi:: SetCommandSetL (TInt aResourceId)
(
CEikButtonGroupContainer * cba = CEikButtonGroupContainer:: Current ();
cba-> SetCommandSetL (aResourceId);
)

Now you can call:

SetCommandSetL (R_YOURAPP_SOFTKEYS_OPTIONS_OPEN);
OR
SetCommandSetL (R_YOURAPP_SOFTKEYS_OPTIONS_STOP);

where ever you want.







Recommended links:



Baidu hand Symantec



Thunder push download genuine risk of transfer of copyright infringement



vob converter free download



Convert .mp4 to .avi



flv to mp4 Converter free download



IC Card reading and writing in PowerBulider



GOOD Graphic



Communication: four stories, four walls!



Xu Zhidong: direct sales to distributors is a breakthrough in quantitative change to qualitative cha



Source Editors Comments



Mpg To Dat



Deep antivirus Guide (3)



Rising gods: a small pinch frame, more than busy for!



No comments:

Post a Comment