Example #1
0
BOOL SetSourceWnd::OnInitDialog()
{

	if (!CMzWndEx::OnInitDialog())
	{
		return FALSE;
	}


	m_ScrollWin.SetID(MZ_IDC_SOURCEWND_SCROLLWIN);
	m_ScrollWin.SetPos(0, 0, GetWidth(), GetHeight() - MZM_HEIGHT_TEXT_TOOLBAR);
	m_ScrollWin.EnableScrollBarV(true);
	AddUiWin(&m_ScrollWin);

	ImagingHelper *imgSelected = ImagingHelper::GetImageObject(GetMzResModuleHandle(), MZRES_IDR_PNG_SELECTED, true);

	for(int i=0;i<SOURCE_MAX;i++){
		m_btnCount[i].SetID(MZ_IDC_SOURCEWND_CLINET0+i);
		m_btnCount[i].SetPos(0,MZM_HEIGHT_BUTTONEX*i,GetWidth(),MZM_HEIGHT_BUTTONEX);
		m_btnCount[i].SetButtonType(MZC_BUTTON_LINE_BOTTOM);
		m_btnCount[i].EnableNotifyMessage(true);
		m_ScrollWin.AddChild(&m_btnCount[i]);
		m_btnCount[i].SetImage2(imgSelected);
		m_btnCount[i].SetImageWidth2(imgSelected->GetImageWidth());
		m_btnCount[i].SetShowImage2(false);
		wstring temp=s2ws(string(client[i]));
		m_btnCount[i].SetText(temp.c_str());
	}

	m_toolbar.SetID(MZ_IDC_SOURCEWND_TOOLBAR);
	m_toolbar.SetPos(0, GetHeight() - MZM_HEIGHT_TEXT_TOOLBAR, GetWidth(), MZM_HEIGHT_TEXT_TOOLBAR);
	m_toolbar.SetButton(0, true, true, L"返回");
	m_toolbar.EnableLeftArrow(true);
	m_toolbar.EnableNotifyMessage(true);
	AddUiWin(&m_toolbar);


	return TRUE;
}
Example #2
0
	// 窗口的初始化
	virtual BOOL OnInitDialog()
	{
		// 必须先调用基类的初始化
		if (!CMzWndEx::OnInitDialog())
		{
			return FALSE;
		}

		//开启acc功能
		MzAccOpen();  

		//获取XYZ轴加速度值 1 == 18mg, 56 == 1g 
		//注意以下几点, 
		//1 要先调用MzAccGetXYZ,再调用
		//MzAccGetX/MzAccGetY/MzAccGetZ后,才能获得正确的值
		//2 获得的加速度值范围是-55~+55, 绝对值起大,加速度越大. 
		//
		MzAccGetXYZ(&m_XAxis, &m_YAxis, &m_ZAxis);

		MzAccGetX(&m_XAxis);
		//获得Y轴加速度
		MzAccGetY(&m_YAxis);
		MzAccGetZ(&m_ZAxis);

		RECT rRect = MzGetWorkArea();

		m_XButton.SetPos(0, 0, 150, 100);
		AddUiWin(&m_XButton);

		m_nMaxXPos = RECT_WIDTH(rRect) - m_XButton.GetWidth();
		m_nMinXPos = 0;

		m_nMaxYPos = RECT_HEIGHT(rRect) - m_XButton.GetHeight();
		m_nMinYPos = 0;

		SetTimer(m_hWnd, 10, 10, NULL);  

		//设置初始的速度和位置
		m_XPos = m_nMinXPos;
		m_YPos = m_nMinYPos;

		m_YSpeed = 0;
		m_XSpeed = 0;

		m_nCount = 0;

		return TRUE;
	}
Example #3
0
BOOL M8PushBoxSuccess::OnInitDialog()
{
	// 记住在每个CMzWndEx的派生类里,只要你重写这个初始化方法,都必须要先调用下面这行代码!
    if (!CMzWndEx::OnInitDialog())
    {
        return FALSE;
    }
	SetBgColor(0x000000);
	
    //背景
    m_bg.SetPos(0,0, 384, 230);
    m_bg.RemoveAllChildren();

    m_pic_bgHelper.LoadImage(GetFullPath(PUSHBOX_TIP_SUCCESS), true, true, true);
    m_pic_bg.SetImage(&m_pic_bgHelper);
    m_pic_bg.SetPos(0, 0, 384, 230);
    m_pic_bg.SetDragMode(UI_DRAGMODE_FIXED);
    m_bg.AddChild(&m_pic_bg);
	AddUiWin(&m_bg);

	//SetTimer(m_hWnd, TIMER_OK, 3000, NULL);
	return TRUE;
}
Example #4
0
/////private/////////////////////////////////////////////////////////////////////
BOOL	CEasySmsMainWnd::SubInitialize()
{

	/*ÉèÖñ³¾°Í¼Æ¬*/
	m_modeIndex	=	0;
	m_Picture.SetID( MZ_IDC_MAIN_PICTURE );
	m_Picture.SetPos( 0, 0, GetWidth(), GetHeight() - MZM_HEIGHT_TEXT_TOOLBAR );
	m_Picture.SetPaintMode( modeId[ m_modeIndex ] );
	m_Picture.LoadImage( MzGetInstanceHandle(), RT_RCDATA, MAKEINTRESOURCE( IDR_PNG_MAIN_WND_BACKGROUND ) );
	AddUiWin( &m_Picture );

	//SMS UnRead
	ImagingHelper* UnReadUp = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_UNREAD_UP, 
																true );
	ImagingHelper* UnReadDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_UNREAD_DOWN, 
																true );

	if ( NULL == UnReadUp || NULL == UnReadDown )
	{
		return	FALSE;
	}
	
	m_UnReadSmsBtnImg.SetID( MZ_IDC_UNREAD_SMS );
	m_UnReadSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_UnReadSmsBtnImg.SetImage_Normal( UnReadUp );
	m_UnReadSmsBtnImg.SetImage_Pressed( UnReadDown );
	m_UnReadSmsBtnImg.EnableTextSinkOnPressed( TRUE );
	m_UnReadSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_UnReadSmsBtnImg.SwapImageZOrder( true );
	m_UnReadSmsBtnImg.SetPos( 30, 80, 140, 180 );
	AddUiWin( &m_UnReadSmsBtnImg );

	// sms look 
	ImagingHelper* UnSmsUp	 = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_SMS_UP, 
																true );
	ImagingHelper* UnSmsDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_SMS_DOWN, 
																true );
	m_LookSmsBtnImg.SetID( MZ_IDC_LOOK_SMS );
	m_LookSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_LookSmsBtnImg.SetImage_Normal( UnSmsUp );
	m_LookSmsBtnImg.SetImage_Pressed( UnSmsDown );
	m_LookSmsBtnImg.EnableTextSinkOnPressed( TRUE );
	m_LookSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_LookSmsBtnImg.SwapImageZOrder( true );
	m_LookSmsBtnImg.SetPos( 170, 80, 140, 180 );

	AddUiWin( &m_LookSmsBtnImg );

	//sms new

	ImagingHelper* UnNewUp	 = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_NEW_UP, 
																true );

	ImagingHelper* UnNewDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_NEW_DOWN, 
																true );

	m_SendSmsBtnImg.SetID( MZ_IDC_SEND_SMS );
	m_SendSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_SendSmsBtnImg.SetImage_Normal( UnNewUp );
	m_SendSmsBtnImg.SetImage_Pressed( UnNewDown );
	m_SendSmsBtnImg.EnableTextSinkOnPressed(TRUE);
	m_SendSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_SendSmsBtnImg.SwapImageZOrder( true );
	m_SendSmsBtnImg.SetPos( 310, 80, 140, 180 );

	AddUiWin( &m_SendSmsBtnImg );

	//find

	ImagingHelper* UnFindUp	 = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_FIND_UP, 
																true );

	ImagingHelper* UnFindDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_FIND_DOWN, 
																true );

	m_UnFindSmsBtnImg.SetID( MZ_IDC_FIND_SMS );
	m_UnFindSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_UnFindSmsBtnImg.SetImage_Normal( UnFindUp );
	m_UnFindSmsBtnImg.SetImage_Pressed( UnFindDown );
	m_UnFindSmsBtnImg.EnableTextSinkOnPressed( TRUE );
	m_UnFindSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_UnFindSmsBtnImg.SwapImageZOrder( true );
	m_UnFindSmsBtnImg.SetPos( 30, 260, 140, 180 );

	AddUiWin( &m_UnFindSmsBtnImg );

	//¼ÓÃÜ
	ImagingHelper* UnEncryptUp	 = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																	IDR_PNG_ENCRYPT_UP, 
																	true );

	ImagingHelper* UnEncryptDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																	IDR_PNG_ENCRYPT_DOWN, 
																	true );
	m_UnEncryptSmsBtnImg.SetID( MZ_IDC_ENCRYTP_SMS );
	m_UnEncryptSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_UnEncryptSmsBtnImg.SetImage_Normal( UnEncryptUp );
	m_UnEncryptSmsBtnImg.SetImage_Pressed( UnEncryptDown );
	m_UnEncryptSmsBtnImg.EnableTextSinkOnPressed( TRUE );
	m_UnEncryptSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_UnEncryptSmsBtnImg.SwapImageZOrder( true );
	m_UnEncryptSmsBtnImg.SetPos( 30, 440, 140, 180 );

	AddUiWin( &m_UnEncryptSmsBtnImg );

	//synchronization

	ImagingHelper* UnSyncUp	 = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_SYNC_UP, 
																true );

	ImagingHelper* UnSyncDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_SYNC_DOWN, 
																true );

	m_UnSyncSmsBtnImg.SetID( MZ_IDC_SYNC_SMS );
	m_UnSyncSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_UnSyncSmsBtnImg.SetImage_Normal( UnSyncUp );
	m_UnSyncSmsBtnImg.SetImage_Pressed( UnSyncDown );
	m_UnSyncSmsBtnImg.EnableTextSinkOnPressed( TRUE );
	m_UnSyncSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_UnSyncSmsBtnImg.SwapImageZOrder( true );
	m_UnSyncSmsBtnImg.SetPos( 170, 260, 140, 180 );

	AddUiWin( &m_UnSyncSmsBtnImg );
	
	//ÉèÖÃ

	ImagingHelper* UnSetUpUp	 = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																	IDR_PNG_SETUP_UP, 
																	true );

	ImagingHelper* UnSetUpDown = m_imgContainer_base.LoadImage(	MzGetInstanceHandle(), 
																IDR_PNG_SETUP_DOWN, 
																true );

	m_UnSetUpSmsBtnImg.SetID( MZ_IDC_SETUP_SMS );
	m_UnSetUpSmsBtnImg.SetButtonType( MZC_BUTTON_NONE );
	m_UnSetUpSmsBtnImg.SetImage_Normal( UnSetUpUp );
	m_UnSetUpSmsBtnImg.SetImage_Pressed( UnSetUpDown );
	m_UnSetUpSmsBtnImg.EnableTextSinkOnPressed( TRUE );
	m_UnSetUpSmsBtnImg.SetMode( UI_BUTTON_IMAGE_MODE_NORMAL );
	m_UnSetUpSmsBtnImg.SwapImageZOrder( true );
//	m_UnSetUpSmsBtnImg.SetTextColor( RGB( 0, 0, 0 ) );

	m_UnSetUpSmsBtnImg.SetPos( 310, 260, 140, 180 );

	AddUiWin( &m_UnSetUpSmsBtnImg );

	//ini toolbar
	m_toolBar_base.SetID( IDR_TOOLBAR_MAIN_WND );	
	m_toolBar_base.SetPos( 0, GetHeight() - MZM_HEIGHT_TEXT_TOOLBAR , GetWidth() , MZM_HEIGHT_TEXT_TOOLBAR );
	m_toolBar_base.SetButton( 2, true, true, L"Í˳ö" );
	AddUiWin( &m_toolBar_base );

	return	TRUE;
}
Example #5
0
BOOL	CSmsLookCtorWnd::SubInitialize()
{
	//ini list
	
	m_list_base.SetID( MZ_IDC_SMSLOOKCTOR_LIST );
	AddUiWin( &m_list_base );
/////////////////////////////////////////////////////////////////	
//	ItemAttribute	clItemAttribute;
//	clItemAttribute.SetPsText1Param( 100, RGB(100, 100, 100), FW_MEDIUM, false, false, 
//							DT_TOP|DT_LEFT|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOPREFIX ); 

//	m_list_base.SetItemAttributeH( clItemAttribute );
///////////////////////////////////////////////////////////////////
	//ini alp
	m_AlpBar.SetID( MZ_IDC_SMSLOOKCTOR_ALPBAR );
	m_AlpBar.EnableZoomAlphabet( true );
	m_AlpBar.EnableNotifyMessage( true );
	m_AlpBar.SetPos( 350, 0, 50, GetHeight() );
	AddUiWin( &m_AlpBar );

	//ini toolbar
	m_toolBar_base.SetID( MZ_IDC_SMSLOOKCTOR_TOOLBAR );
	AddUiWin( &m_toolBar_base );


	/////////////test/////////////////////////////////////////////////////////////
	wchar_t	*pBuf		=	NULL;
	long	lSize		=	0;
	wchar_t	*pwcResult	=	NULL;

	HRESULT	hr	=	m_clCEasySmsUiCtrl.MakeCtorRltListReq( &pBuf, &lSize );
	if ( FAILED ( hr ) )									return	FALSE;

	CCoreService	*pCCoreService	=	CCoreService::GetInstance();
	if ( NULL == pCCoreService )							return	FALSE;

#ifdef	UI_TEST
		 pwcResult =	L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
							L"<result>"
								L"<data type = \"contactors\">"
									L"<data type = \"list\" count = \"2\">"
										L"<rec encode = \"true\">"
											L"<name>张三</name>"
											L"<pid>2</pid>"										
											L"<address>13600000001</address>"
											L"<smscount>9</smscount>"
										L"</rec>"
										L"<rec encode = \"true\">"
											L"<name>李四</name>"
											L"<pid>3</pid>"
											L"<address>13600000002</address>"
											L"<smscount>88</smscount>"
										L"</rec>"
									L"</data>"
								L"</data>"
							L"</result>";
#else
	hr	=	pCCoreService->Request( pBuf, &pwcResult );
	if ( FAILED ( hr ) )									return	FALSE;
#endif

	hr	=	m_clCEasySmsUiCtrl.MakeCtorRltList( m_list_base, pwcResult );
#if 0	
	CMzString name = L"姓名%d";
//	CMzString content = L"短信内容 SmsContent%d:";
	CMzString stime = L"Count: 100";

	CMzString name1(10);
	CMzString content1(30);
	for (int i = 0; i < 100; i++)
	{
		swprintf(name1.C_Str(),name.C_Str(),i);
//		swprintf(content1.C_Str(),content.C_Str(),i);
		ListItemEx* item = new ListItemEx;
		
//		ItemAttribute	clItemAttribute;
//		clItemAttribute.SetPsText1Param( 100, RGB(100, 100, 100), FW_MEDIUM, false, false, 
//									DT_TOP|DT_END_ELLIPSIS|DT_SINGLELINE|DT_NOPREFIX ); 
//		item->m_pSpecialItemAttr	=	&clItemAttribute;

		
		item->m_pData = (void*)i;
		item->m_textTitle = name1.C_Str();

		item->m_textPostscript1 = stime.C_Str();


 		item->m_pImgFirst = m_imgContainer_base.LoadImage(MzGetInstanceHandle(), IDR_PNG_CTR_LIST_READ, true);

		m_list_base.AddItem(item);
	}

#endif

	if ( NULL != pBuf )
	{
		delete	pBuf, pBuf	=	NULL;
	}
/////////////test/////////////////////////////////////////////////////////////

	return	TRUE;
}
Example #6
0
//#define		SMS_MSGTYPE_TEXT	L"Meizu Text SMS Protocol"
BOOL CNewSmsWnd::OnInitDialog()
{
//zhu.t add for License	at 2010-3-22
#ifdef	LICENSE
	if ( !LicenseProtect())
	{
		PostQuitMessage(0);
		return	FALSE;
	}
#endif
//test Meizu
	wchar_t protocolName[260];  
	HRESULT hr = S_OK;  
	wcscpy(protocolName,  SMS_MSGTYPE_NOTIFICATION/**/); 

	hr = SmsClearMessageNotification(SMS_MSGTYPE_TEXT); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	hr = SmsClearMessageNotification(SMS_MSGTYPE_NOTIFICATION); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	hr = SmsClearMessageNotification(SMS_MSGTYPE_WDP); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	hr = SmsClearMessageNotification(SMS_MSGTYPE_WCMP); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	hr = SmsClearMessageNotification(SMS_MSGTYPE_STATUS); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	hr = SmsClearMessageNotification(SMS_MSGTYPE_BROADCAST); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	hr = SmsClearMessageNotification(SMS_MSGTYPE_RAW); 
	if (FAILED(hr))
	{
		return	E_FAIL;
	}


	SMSREGISTRATIONDATA smsrd = SMSREGISTRATIONDATA();  

	memset(&smsrd, 0x00, sizeof(SMSREGISTRATIONDATA));  

	smsrd.cbSize = sizeof(SMSREGISTRATIONDATA); 

	wchar_t pszFileName[MAX_PATH] = {0};
	GetModuleFileName(0, pszFileName, MAX_PATH); 

	wcscpy(smsrd.tszAppName, pszFileName);  
	wcscpy(smsrd.tszParams, _T(""));  

	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_TEXT);  

	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
//////////////////////////////////////////////////////////////////////////
	memset( smsrd.tszProtocolName, 0x0, SMS_MAX_PROTOCOLNAME_LENGTH *sizeof(TCHAR));
	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_NOTIFICATION); 
	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
//////////////////////////////////////////////////////////////////////////
	memset( smsrd.tszProtocolName, 0x0, SMS_MAX_PROTOCOLNAME_LENGTH *sizeof(TCHAR));
	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_WDP); 
	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
//////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////
	memset( smsrd.tszProtocolName, 0x0, SMS_MAX_PROTOCOLNAME_LENGTH *sizeof(TCHAR));
	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_WCMP); 
	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	//////////////////////////////////////////////////////////////////////////
	memset( smsrd.tszProtocolName, 0x0, SMS_MAX_PROTOCOLNAME_LENGTH *sizeof(TCHAR));
	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_STATUS); 
	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	//////////////////////////////////////////////////////////////////////////
	memset( smsrd.tszProtocolName, 0x0, SMS_MAX_PROTOCOLNAME_LENGTH *sizeof(TCHAR));
	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_BROADCAST); 
	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
	//////////////////////////////////////////////////////////////////////////
	memset( smsrd.tszProtocolName, 0x0, SMS_MAX_PROTOCOLNAME_LENGTH *sizeof(TCHAR));
	wcscpy(smsrd.tszProtocolName, SMS_MSGTYPE_RAW); 
	hr = SmsSetMessageNotification (&smsrd);  
	if (FAILED(hr))
	{
		return	E_FAIL;
	}
//end	
	// 必须先调用基类的初始化
	if (!CMzWndEx::OnInitDialog())
	{
	  return FALSE;
	}

	//打开重力感应设备
	MzAccOpen();

	//获得重力感应改变的消息
	m_accMsg = MzAccGetMessage();
	//m_Recievers.SetParentWnd(m_hWnd);
	// 初始化收件人控件,并添加到窗口中
	
	RECT rect = MzGetVisibleDesktopRect();
	RECT rc = {0};
	int height = 0;
	int width = 0;
	HWND hWnd = FindWindow(L"CTaskBar", 0);
	if(hWnd != 0)
	{
		::GetWindowRect(hWnd, &rc);
		height = rc.bottom - rc.top;
		width = rc.right - rc.left;
	}

	if(width>480)
	{
		g_bH = TRUE;
		long lWidth = GetWidth();
		long lHeight = GetHeight();
		RECT rc = MzGetWindowRect();
		RECT rc2 = MzGetClientRect();
		RECT rc3 = MzGetWorkArea();
		SetWindowPos(m_hWnd, rc.left, rc.top,RECT_HEIGHT(rc)+rc.top,RECT_WIDTH(rc)  );
		lWidth = GetWidth();
		lHeight = GetHeight();
		m_Recievers.SetPos(2, 0, GetWidth()-BUTTON_WIDTH_H-2, BUTTON_HEIGHT_VH);
		m_SmsMsgEdit->SetPos(2, m_Recievers.GetHeight()+3, GetWidth()-4, (GetHeight()- m_Recievers.GetHeight() ));
		m_SendSmsBtn.SetPos((GetWidth()-BUTTON_WIDTH_H),0,BUTTON_WIDTH_H-2,BUTTON_HEIGHT_VH);
	}
	else
	{
		long lWidth = GetWidth();
		long lHeight = GetHeight();
		RECT rc = MzGetWindowRect();
		RECT rc2 = MzGetClientRect();
		RECT rc3 = MzGetWorkArea();
		SetWindowPos(m_hWnd, rc3.left, rc3.top,RECT_WIDTH(rc3), RECT_HEIGHT(rc3) );
		m_Recievers.SetPos(2, 0, lWidth-BUTTON_WIDTH_V-2, BUTTON_HEIGHT_VH);
		m_SmsMsgEdit->SetPos(2, m_Recievers.GetHeight()+3, GetWidth()-4, (lHeight - m_Recievers.GetHeight()));
		m_SendSmsBtn.SetPos((GetWidth()-BUTTON_WIDTH_V),0,BUTTON_WIDTH_V-2,BUTTON_HEIGHT_VH);
	}

	m_Recievers.SetText(L"点击选择联系人:");  // set the tips text
	m_Recievers.SetID(MZ_IDC_RECIEVERS_EDIT);
	m_Recievers.SetParent((void*)this);
	//m_Recievers.SetTextColor(RGB(0,0,0)); // you could also set the color of text
	//m_Recievers.SetEnable(0);
	//m_Recievers.SetColorBg(RGB(0,0,0));
	AddUiWin(&m_Recievers); // don't forget to add the control to the window
	// 初始化短信文本控件,并添加到窗口中
	//MzOpenSip(IM_SIP_MODE_KEEP,0);
	m_SmsMsgEdit->SetSipMode(IM_SIP_MODE_GEL_PY,0);
	//m_SmsMsgEdit->SetFocus(true);
	
	
	m_SmsMsgEdit->SetTextColor(RGB(94,94,94)); // you could also set the color of text

	m_SmsMsgEdit->SetEditBgType(UI_EDIT_BGTYPE_ROUND_RECT);
	m_SmsMsgEdit->SetColorBg(RGB(243,241,207)); 
	m_SmsMsgEdit->EnableInsideScroll(true);
	m_SmsMsgEdit->EnableZoomIn(true);   
	m_SmsMsgEdit->SetTip(L"在这里输入短信内容");
	//m_SmsMsgEdit->EnableAutoOpenSip(true);
	AddUiWin(m_SmsMsgEdit); // don't forget to add the control to the window

	m_SendSmsBtn.SetButtonType(MZC_BUTTON_DELETE_ORANGE);
	m_SendSmsBtn.EnableTextSinkOnPressed(TRUE);
	m_SendSmsBtn.SetTextColor_Pressed(RGB(94,94,94));
	
	m_SendSmsBtn.SetID(MZ_IDC_SEND_SMS_BTN);
	m_SendSmsBtn.SetText(L"发送");
	//m_ContactorsBtn.SetTextColor(RGB(255,255,255));
	AddUiWin(&m_SendSmsBtn);
//	MzOpenSip();

	return TRUE;
}