Hi,
I want to create a customized window on which i can place other controls like Label, Picture, etc. I want this window to be derived from RWindow. I have got some idea from the example provided in the SDK examples for WindowServer and the Ordinal Example.
Using that i am able to create a window. But the problem arrises when i want this control to be Window Owning. that is i want to place controls on this Window. I also want the user to be able to set the positions of the controls on this window. How can i do that. i have searched on net but could not find help that give some idea about it.
Can anyone please tell me how to do that. If you have any code snippet then it will be a great help for me.
below is the code of my container class where i create an instance of the window to be drawn.The main code for Window is in the Ordinal Example in the SDK. I am using Series 60 SDK 1.2.
Also One thing more i want this window to be designed in such a way that it works on UIQ Platform also without much change of the code.
Code for the AppUi class to handle the command for cearing new window
Code to Create the instance of the window(Client for Window Server)Code:void CHelloWorldAppUi::HandleCommandL(TInt aCommand) { switch (aCommand) { case EEikCmdExit: case EAknSoftkeyExit: { Exit(); break; } case EHelloWorldCommand1: { iAppContainer->CreateClient(); break; } default: { break; } } }
and this the client where i create a windowCode:void CHelloWorldContainer::CreateClient() { TRect rect = Rect(); iClient = CExampleWsClient :: NewL(rect); }
Code:CExampleWsClient* CExampleWsClient::NewL(const TRect& aRect) { // make new client CExampleWsClient* client=new (ELeave) CExampleWsClient(aRect); CleanupStack::PushL(client); // push, just in case client->ConstructL(); // construct and run CleanupStack::Pop(); return client; }Can anyone help me...Code:void CExampleWsClient::ConstructMainWindowL() { TRect rect(3,iRect.iBr.iY-140,iRect.Width()-3,iRect.Height()-3); iWindow1 = new (ELeave) CMessageWindow (this); iWindow1->ConstructL (rect, TRgb (200, 80, 50)); }
Many Many Thanks in Advance
Gurpreet Singh





