meetingrequest/mrguicommon/src/cmrbutton.cpp
branchRCL_3
changeset 60 d620048b4810
parent 16 4ce476e64c59
--- a/meetingrequest/mrguicommon/src/cmrbutton.cpp	Mon Jun 21 15:20:54 2010 +0300
+++ b/meetingrequest/mrguicommon/src/cmrbutton.cpp	Thu Jul 15 18:19:25 2010 +0300
@@ -30,11 +30,14 @@
 // ---------------------------------------------------------------------------
 //
 EXPORT_C  CMRButton* CMRButton::NewL(
-             NMRBitmapManager::TMRBitmapId aBitmapId, TScaleMode aScaleMode )
+        NMRBitmapManager::TMRBitmapId aBitmapId,
+        const CCoeControl* aParent,
+        TScaleMode aScaleMode
+        )
     {
     CMRButton* self = new (ELeave) CMRButton( aScaleMode );
     CleanupStack::PushL( self );
-    self->ConstructL( aBitmapId );
+    self->ConstructL( aBitmapId, aParent );
     CleanupStack::Pop( self );
     return self;
     }
@@ -74,7 +77,9 @@
 // CMRButton::ConstructL
 // ---------------------------------------------------------------------------
 //
-void CMRButton::ConstructL( NMRBitmapManager::TMRBitmapId aBitmapId )
+void CMRButton::ConstructL(
+        NMRBitmapManager::TMRBitmapId aBitmapId,
+        const CCoeControl* aParent )
     {
     CFbsBitmap* bitMap( NULL );
     CFbsBitmap* bitMapMask( NULL );
@@ -93,6 +98,11 @@
             KNullDesC(), 
             KNullDesC(), 
             KAknButtonNoFrame | KAknButtonPressedDownFrame );
+    
+    if ( aParent )
+        {
+        SetContainerWindowL( *aParent );
+        }
     }
 
 // EOF