View Full Version : Anything like printf in c or Msgbox in VBasic?


nimo
25-11-2002, 02:47 PM
Hi all

IS there Anything like printf in c or Msgbox in VBasic in Symbian ? Whixh is it ? And how do I use it to show some data inthe screen of the 7650??

Mental Blank
25-11-2002, 05:22 PM
The simplest API to use is CEikonEnv::InfoWinL(), which displays two lines of text in a message box.

-=[°MastiX_MC°]=-
25-11-2002, 08:54 PM
to show some TDesc-Stuff on your 7650-Emu screen just use: iEikonEnv->InfoMsg(string); or just iEikonEnv->InfoMsg(_L("Test123");

C'Ya

26-11-2002, 08:31 AM
11/25/02 07:09AM

Hi

Thanx

I have the following code

""
RNotifier not;
User::LeaveIfError(not.Connect());

TBTDeviceSelectionParams param;

TUUID btid(0x001f82e2);
param.SetUUID(btid);

TBTDeviceSelectionParamsPckg pckg(param);
TBTDeviceResponseParams result;

TBTDeviceResponseParamsPckg response(result) ;
TRequestStatus status;

not.StartNotifierAndGetResponse(status,KDeviceSele ctionNotifierUid, pckg, response);

User::WaitForRequest(status);
TPtrC name;
if (status.Int() == KErrNone)
{
if (result.IsValidDeviceName()) {
name.Set(result.DeviceName());

}
}
not.CancelNotifier(KDeviceSelectionNotifierUid);
not.Close();

""

Now, my question is how do I show the found Bluetooth device name(which should be in the TBTDeviceResponseParams result, and kept in TPtrC name) in the screen of the 7650?

Thanx a lot

Mental Blank
26-11-2002, 09:09 AM
First comment: you shouldn't really be using User::WaitForRequest() like that in an application, as it will lock up your GUI while the notifier executes.

But anyway, to display the name, just type "CEikonEnv::Static()->InfoWinL(name, KNullDesC);"

nimo
26-11-2002, 09:16 AM
Hi

Thanx a lot......it comliles, I will test it in the phone after a moment........one question, how should I use the User:WaitForRequest?

Mental Blank
26-11-2002, 02:46 PM
The right thing to do is not to use User::WaitForRequest at all :) The code should be encapsulated in an active object. Active objects are a fairly large topic, so I won't go into detail here, but see http://www.symbian.com/developer/techlib/papers/tp_active_objects/active.htm for more information, or the SDK, or the source code of CBluetoothHandler in the open source "Bemused" application.