2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file CallButtonsPanel.cpp
19 * @brief Base class for all Call forms
21 #include "CallButtonsPanel.h"
22 #include "CallAppUtility.h"
23 #include "CallTypes.h"
25 using namespace Tizen::App;
26 using namespace Tizen::Base;
27 using namespace Tizen::Ui;
28 using namespace Tizen::Ui::Controls;
29 using namespace Tizen::Graphics;
31 //Constants - Scene name
32 const wchar_t* IDC_ADDJOINCALL_BUTTON = L"IDC_ADDJOINCALL_BUTTON";
33 const wchar_t* IDC_KEYPAD_BUTTON = L"IDC_KEYPAD_BUTTON";
34 const wchar_t* IDC_MUTE_BUTTON = L"IDC_MUTE_BUTTON";
35 const wchar_t* IDC_CONTACT_BUTTON = L"IDC_CONTACT_BUTTON";
36 const wchar_t* IDC_SPEAKER_BUTTON = L"IDC_SPEAKER_BUTTON";
37 const wchar_t* IDC_VOICECALL_BUTTON = L"IDC_VOICECALL_BUTTON";
38 const wchar_t* IDC_VIDEOCALL_BUTTON = L"IDC_VIDEOCALL_BUTTON";
39 const wchar_t* IDC_MSG_BUTTON = L"IDC_MSG_BUTTON";
40 const wchar_t* IDC_ENDCALL_BUTTON = L"IDC_ENDCALL_BUTTON";
41 const wchar_t* IDC_ADD_TO_CONTACT_BUTTON = L"IDC_ADD_TO_CONTACT_BUTTON";
44 const int W_BG_BITMAP = 80;
45 const int H_BG_BITMAP = 80;
46 const int Y_BG_BITMAP_POS = 56;
47 const int IDI_TEXT_SIZE = 38;
48 const int IDI_VERTICAL_SPACE = 6;
49 const int W_VIEW_CONTACT_BITMAP = 50;
50 const int H__VIEW_CONTACT_BITMAP = 50;
51 const int Y_VIEW_CONTACT_BITMAP_POS = 14;
52 const int W_KEYPAD_BTN = 240;
53 const int H_KEYPAD_BTN = 250;
55 CallButtonsPanel::CallButtonsPanel(void)
59 CallButtonsPanel::~CallButtonsPanel(void)
61 //Empty Implementation
65 CallButtonsPanel::ConstructPanel(IActionEventListener* pEventListener, FormType parentFormType)
67 if (pEventListener == null)
74 //set action listener & save form state
75 __pActionListener = pEventListener;
76 __parentFormType = parentFormType;
78 switch (__parentFormType)
80 case FORMTYPE_ENDCALL:
81 r = Construct(IDL_END_CALL_PANEL);
85 r = Construct(IDL_CALL_PANEL);
88 TryCatch(r == E_SUCCESS, , "CallButtonsPanel::Initialise() resource not found");
96 CallButtonsPanel::OnInitializing(void)
100 RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetLandscapeLayoutN());
101 if (pRelativeLayout != null)
103 pRelativeLayout->Update();
104 delete pRelativeLayout;
107 pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetPortraitLayoutN());
108 if (pRelativeLayout != null)
110 pRelativeLayout->Update();
111 delete pRelativeLayout;
114 //set buttons as child controls
115 switch (__parentFormType)
117 case FORMTYPE_ENDCALL:
118 r = ConstructEndCallPanel();
122 r = ConstructActiveCallPanel();
137 CallButtonsPanel::OnTerminating(void)
139 //remove all child controls...
140 // RemoveAllControls();
145 CallButtonsPanel::SetSpeakerButtonState(CommandIds cmdId)
148 String speakerButtonId(IDC_SPEAKER_BUTTON);
149 Button* pButton = static_cast<Button*>(GetControl(speakerButtonId));
150 //Check if Button exist and needs to change state.
151 if(pButton == null || pButton->GetActionId() == cmdId)
156 String btnName = AppUtility::GetResourceString(IDS_SPEAKER_BTN_NAME);
157 AddKeyPadActionListener(speakerButtonId, cmdId);
162 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_ICON, BTN_NORMAL);
163 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_PRESS_ICON, BTN_PRESS);
164 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_DIM_ICON, BTN_DIM);
168 case IDA_SPEAKER_OFF:
170 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_ICON, BTN_NORMAL);
171 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_PRESS_ICON, BTN_PRESS);
172 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_DIM_ICON, BTN_DIM);
182 CallButtonsPanel::SetMuteButtonState(CommandIds cmdId)
184 String muteButtonId(IDC_MUTE_BUTTON);
185 Button* pButton = static_cast<Button*>(GetControl(muteButtonId));
186 //Check if Button exist and needs to change state.
187 if(pButton == null || pButton->GetActionId() == cmdId)
192 String btnName = AppUtility::GetResourceString(IDS_MUTE_BTN_NAME);
193 AddKeyPadActionListener(muteButtonId, cmdId);
198 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_ICON, BTN_NORMAL);
199 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_PRESS_ICON, BTN_PRESS);
200 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_DIM_ICON, BTN_DIM);
206 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_ICON, BTN_NORMAL);
207 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_PRESS_ICON, BTN_PRESS);
208 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_DIM_ICON, BTN_DIM);
218 CallButtonsPanel::SetKeypadButtonState(CommandIds cmdId)
220 String keypadButtonId(IDC_KEYPAD_BUTTON);
221 Button* pButton = static_cast<Button*>(GetControl(keypadButtonId));
222 //Check if Button exist and needs to change state.
223 if(pButton == null || pButton->GetActionId() == cmdId)
228 String btnName = AppUtility::GetResourceString(IDS_KEYPAD_BTN_NAME);
229 AddKeyPadActionListener(keypadButtonId, cmdId);
232 case IDA_CLOSE_NUMKEYPAD:
234 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_ICON, BTN_NORMAL);
235 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_PRESS_ICON, BTN_PRESS);
236 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_DIM_ICON, BTN_DIM);
240 case IDA_OPEN_NUMKEYPAD:
242 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_ICON, BTN_NORMAL);
243 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_PRESS_ICON, BTN_PRESS);
244 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_DIM_ICON, BTN_DIM);
254 CallButtonsPanel::AddBackgroundBitmap(void)
256 result r = E_FAILURE;
258 Rectangle panelRect = GetBounds();
259 //Set BackGround bitmap
260 Bitmap* pBgBitmap = null;
261 AppResource* pAppResource = AppResource::GetInstance();
264 pBgBitmap = pAppResource->GetBitmapN(IDB_BACKGROUND_BITMAP);
267 Label* pBackgroundLabel = new (std::nothrow) Label();
268 pBackgroundLabel->Construct(Rectangle(0, 1, panelRect.width, panelRect.height), L"");
269 pBackgroundLabel->SetBackgroundBitmap(*pBgBitmap);
270 r = AddControl(*pBackgroundLabel);
272 //always display in background
273 SetControlAlwaysAtBottom(*pBackgroundLabel, true);
283 CallButtonsPanel::ConstructEndCallPanel(void)
285 result r = E_SUCCESS;
286 Rectangle relativeCtrlRect = GetBounds();
289 String voiceButtonId(IDC_VOICECALL_BUTTON);
290 String btnName = AppUtility::GetResourceString(IDS_VOICE_CALL_BTN_NAME);
291 SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_ICON, BTN_NORMAL);
292 SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_PRESS_ICON, BTN_PRESS);
293 SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_DIM_ICON, BTN_DIM);
294 AddKeyPadActionListener(voiceButtonId, IDA_VOICE_CALL);
297 String videoButtonId(IDC_VIDEOCALL_BUTTON);
298 btnName = AppUtility::GetResourceString(IDS_VIDEO_CALL_BTN_NAME);
299 SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_ICON, BTN_NORMAL);
300 SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_PRESS_ICON, BTN_PRESS);
301 SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_DIM_ICON, BTN_DIM);
302 AddKeyPadActionListener(videoButtonId, IDA_VIDEO_CALL);
305 String msgButtonId(IDC_MSG_BUTTON);
306 btnName = AppUtility::GetResourceString(IDS_MSG_BTN_NAME);
307 SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_ICON, BTN_NORMAL);
308 SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_PRESS_ICON, BTN_PRESS);
309 SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_DIM_ICON, BTN_DIM);
310 AddKeyPadActionListener(msgButtonId, IDA_MESSAGE);
312 Button* pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
315 AddKeyPadActionListener(IDC_ADD_TO_CONTACT_BUTTON,IDA_ADD_TO_CONTACTS);
317 //set initial show state to false. Correct state set on OnSceneActivatedN
318 SetViewContactButtonStatus(false);
324 CallButtonsPanel::SetViewContactButtonStatus(bool isAddToContactPresent)
327 //Present show View Contact else show Add to contact
328 if(isAddToContactPresent == false)
330 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_VIEW_CONTACT),
331 IDB_VIEW_CONTACT_BG_ICON,IDB_VIEW_CONTACT_ICON,BTN_NORMAL);
333 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_VIEW_CONTACT),
334 IDB_VIEW_CONTACT_BG_PRESS_ICON,IDB_VIEW_CONTACT_PRESS_ICON,BTN_PRESS);
338 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS),
339 IDB_VIEW_CONTACT_BG_ICON,IDB_VIEW_CONTACT_ICON,BTN_NORMAL);
341 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS),
342 IDB_VIEW_CONTACT_BG_PRESS_ICON,IDB_VIEW_CONTACT_PRESS_ICON,BTN_PRESS);
348 CallButtonsPanel::ConstructActiveCallPanel(void)
350 result r = E_SUCCESS;
353 String endButtonId(IDC_ENDCALL_BUTTON);
354 String btnName = AppUtility::GetResourceString(IDS_ENDCALL_BTN_NAME);
355 SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_ICON, BTN_NORMAL);
356 SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_PRESS_ICON, BTN_PRESS);
357 SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_DIM_ICON, BTN_DIM);
359 //Add or Join call based on form state
360 String addJoinButtonId(IDC_ADDJOINCALL_BUTTON);
361 switch (__parentFormType)
363 case FORMTYPE_OUTGOINGCALL:
364 case FORMTYPE_ACTIVECALL:
365 case FORMTYPE_EMERGENCYOUTGOINGCALL:
366 case FORMTYPE_EMERGENCYACTIVECALL:
369 AddKeyPadActionListener(endButtonId, IDA_END_CALL);
371 btnName = AppUtility::GetResourceString(IDS_ADDCALL_BTN_NAME);
372 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_ICON, BTN_NORMAL);
373 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_PRESS_ICON, BTN_PRESS);
374 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_DIM_ICON, BTN_DIM);
375 AddKeyPadActionListener(addJoinButtonId, IDA_ADD_CALL);
379 case FORMTYPE_ACTIVECONFCALL:
382 AddKeyPadActionListener(endButtonId, IDA_END_CONF_CALL);
384 btnName = AppUtility::GetResourceString(IDS_ADDCALL_BTN_NAME);
385 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_ICON, BTN_NORMAL);
386 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_PRESS_ICON, BTN_PRESS);
387 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_DIM_ICON, BTN_DIM);
388 AddKeyPadActionListener(addJoinButtonId, IDA_ADD_CALL);
392 case FORMTYPE_MULTIPLECALLS:
395 AddKeyPadActionListener(endButtonId, IDA_END_CALL);
397 btnName = AppUtility::GetResourceString(IDS_JOINCALL_BTN_NAME);
398 SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_ICON, BTN_NORMAL);
399 SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_PRESS_ICON, BTN_PRESS);
400 SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_DIM_ICON, BTN_DIM);
401 AddKeyPadActionListener(addJoinButtonId, IDA_JOIN_CALL);
409 //Keypad is closed, by default
410 SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
411 //Speaker is off, by default
412 SetSpeakerButtonState(IDA_SPEAKER);
413 //Mute is off, by default
414 SetMuteButtonState(IDA_MUTE);
416 String contactButtonId(IDC_CONTACT_BUTTON);
417 btnName = AppUtility::GetResourceString(IDS_CONTACT_BTN_NAME);
418 SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_ICON, BTN_NORMAL);
419 SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_PRESS_ICON, BTN_PRESS);
420 SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_DIM_ICON, BTN_DIM);
421 AddKeyPadActionListener(contactButtonId, IDA_OPEN_CONTACTS);
423 //disable all keys except 'Speaker' keys while dialing outgoing call
424 if (__parentFormType == FORMTYPE_OUTGOINGCALL || __parentFormType == FORMTYPE_EMERGENCYOUTGOINGCALL
425 || __parentFormType == FORMTYPE_EMERGENCYACTIVECALL)
427 DisableKeysForOutgoingCall();
434 CallButtonsPanel::SetBitmapsToButton(const String& buttonId, const String& buttonName, const String& imgPath, ButtonState state)
436 Button* pButton = static_cast<Button*>(GetControl(buttonId));
439 //Fetch Bitmap from resource
440 Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(imgPath,
441 W_BG_BITMAP, H_BG_BITMAP);
443 //Create a new canvas
444 Canvas* pCanvas = new (std::nothrow) Canvas;
445 pCanvas->Construct(Rectangle(0, 0, W_KEYPAD_BTN, H_KEYPAD_BTN));
448 Point bitmapPos(0, 0);
449 bitmapPos.SetPosition(((pCanvas->GetBounds().width - pBitmap->GetWidth()) / 2), Y_BG_BITMAP_POS);
450 SetEnrichedTextToButton(buttonName, pCanvas, state, (bitmapPos.y + pBitmap->GetHeight() + IDI_VERTICAL_SPACE));
452 //set normal bitmap to canvas
453 pCanvas->DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
455 //Set the final Bitmap to Button
456 Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
457 pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
458 //scale to button size
459 pActualBgBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
460 pActualBgBmp->Scale(pButton->GetSize());
466 pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
472 pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
478 pButton->SetDisabledBitmap(Point(0, 0), *pActualBgBmp);
482 pButton->Invalidate(true);
491 CallButtonsPanel::SetViewContacBitmapToButton(const String& buttonId, const String& buttonName, const String& imgBackgroundPath,const String& imgPath, ButtonState state)
493 Button* pButton = static_cast<Button*>(GetControl(buttonId));
497 //Fetch Bitmap from resource
498 Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(imgPath,
499 W_VIEW_CONTACT_BITMAP, W_VIEW_CONTACT_BITMAP);
501 //Create a new canvas
502 Canvas* pCanvas = new (std::nothrow) Canvas;
503 pCanvas->Construct(Rectangle(0, 0, pButton->GetBounds().width, pButton->GetBounds().height));
505 // Draw background bitmap
506 AppResource* pAppResource = AppResource::GetInstance();
507 Bitmap* pBackGroundBitmap = pAppResource->GetBitmapN(imgBackgroundPath);
508 if (pBackGroundBitmap->IsNinePatchedBitmap())
510 pCanvas->DrawNinePatchedBitmap(pCanvas->GetBounds(), *pBackGroundBitmap);
514 pCanvas->DrawBitmap(pCanvas->GetBounds(), *pBackGroundBitmap);
516 delete pBackGroundBitmap;
518 Point bitmapPos(0, 0);
519 bitmapPos.SetPosition(((pCanvas->GetBounds().width - pBitmap->GetWidth()) / 2), Y_VIEW_CONTACT_BITMAP_POS);
520 SetEnrichedTextToButton(buttonName, pCanvas, state, (bitmapPos.y + pBitmap->GetHeight() + IDI_VERTICAL_SPACE));
523 //set normal bitmap to canvas
524 pCanvas->DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
526 //Set the final Bitmap to Button
527 Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
528 pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
534 pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
540 pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
545 pButton->Invalidate(true);
554 CallButtonsPanel::SetEnrichedTextToButton(const String& buttonName, Canvas* pCanvas, ButtonState state, int verticalPos)
557 Color textColor(255, 255, 255);
561 textColor.SetAlpha(255);
565 textColor.SetAlpha(127);
569 textColor.SetAlpha(77);
574 font.Construct(FONT_STYLE_PLAIN, IDI_TEXT_SIZE);
575 Dimension textDimension;
576 font.GetTextExtent(buttonName, buttonName.GetLength(), textDimension);
577 textDimension.height = textDimension.height + font.GetDescender();
578 TextElement* pTextElement = new (std::nothrow) TextElement();
579 pTextElement->Construct(buttonName);
580 pTextElement->SetTextColor(textColor);
581 pTextElement->SetFont(font);
583 EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
584 pEnrichedText->Construct(textDimension);
585 pEnrichedText->Add(*pTextElement);
588 Point textPos(((pCanvas->GetBounds().width - pEnrichedText->GetWidth()) / 2), verticalPos);
589 pCanvas->DrawText(textPos, *pEnrichedText);
592 pEnrichedText->RemoveAll(true);
593 delete pEnrichedText;
597 CallButtonsPanel::AddKeyPadActionListener(const String& buttonId, CommandIds cmdId)
599 Button* pButton = static_cast<Button*>(GetControl(buttonId));
602 pButton->SetActionId(cmdId);
603 pButton->AddActionEventListener(*__pActionListener);
608 CallButtonsPanel::DisableKeysForOutgoingCall(void)
611 EnableAddCallButton(false);
614 Button* pButton = static_cast<Button*>(GetControl(IDC_KEYPAD_BUTTON));
615 pButton->SetEnabled(false);
618 pButton = static_cast<Button*>(GetControl(IDC_MUTE_BUTTON));
619 pButton->SetEnabled(false);
622 pButton = static_cast<Button*>(GetControl(IDC_CONTACT_BUTTON));
623 pButton->SetEnabled(false);
627 CallButtonsPanel::SetEndCallPanelState(bool isEnabled)
630 Button* pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON));
631 pButton->SetEnabled(isEnabled);
634 pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON));
635 pButton->SetEnabled(isEnabled);
638 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON));
639 pButton->SetEnabled(isEnabled);
643 CallButtonsPanel::EnableAddCallButton(bool enable)
646 Button* pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
647 if(pButton != null && pButton->GetActionId() == IDA_ADD_CALL)
649 pButton->SetEnabled(enable);
650 pButton->Invalidate(true);
655 CallButtonsPanel::EnableJoinCallButton(bool enable)
658 Button* pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
659 if(pButton != null && pButton->GetActionId() == IDA_JOIN_CALL)
661 pButton->SetEnabled(enable);
662 pButton->Invalidate(true);
667 CallButtonsPanel::SetButtonPosition(void)
669 switch (__parentFormType)
671 case FORMTYPE_ENDCALL:
674 Button* pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON));
675 SetControlAlwaysOnTop(*pButton,true);
678 pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON));
679 SetControlAlwaysOnTop(*pButton,true);
682 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON));
683 SetControlAlwaysOnTop(*pButton,true);
690 Button* pButton = static_cast<Button*>(GetControl(IDC_KEYPAD_BUTTON));
691 SetControlAlwaysOnTop(*pButton,true);
693 pButton = static_cast<Button*>(GetControl(IDC_MUTE_BUTTON));
694 SetControlAlwaysOnTop(*pButton,true);
696 pButton = static_cast<Button*>(GetControl(IDC_CONTACT_BUTTON));
697 SetControlAlwaysOnTop(*pButton,true);
698 //Add or Join call based on form state
699 pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
700 SetControlAlwaysOnTop(*pButton,true);
702 pButton = static_cast<Button*>(GetControl(IDC_ENDCALL_BUTTON));
703 SetControlAlwaysOnTop(*pButton,true);
705 pButton = static_cast<Button*>(GetControl(IDC_SPEAKER_BUTTON));
706 SetControlAlwaysOnTop(*pButton,true);