当前位置: 首页>>代码示例>>C++>>正文


C++ RectifyControl函数代码示例

本文整理汇总了C++中RectifyControl函数的典型用法代码示例。如果您正苦于以下问题:C++ RectifyControl函数的具体用法?C++ RectifyControl怎么用?C++ RectifyControl使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RectifyControl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WriteLog

//隐藏列表按钮
void CGameFrameDlg::OnBnClickedHideList()
{
	CString strFile,strTemp;
	CTime tmCur = CTime::GetCurrentTime();
	CString strTime = tmCur.Format("%m%d");
	strFile.Format("log\\%sOnBnClickedHideList.log",strTime);

	strTemp.Format("%s", "OnBnClickedHideList()");
	WriteLog(strFile, strTemp);

	static bool bHideList=true;
	int cx,cy;
	CRect rect;
	GetClientRect(rect);
	cx=rect.Width();
	cy=rect.Height();
	if(bHideList)
	{
		if (m_VorSplitter.GetSafeHwnd()) 
		{
			UINT uSplitPos=cx-12;
			//		SafeMoveWindow(&m_VorSplitter,uSplitPos,GetTitleHight(),SPLIT_WIDE,cy-GetTitleHight());

			HDWP hDwp=BeginDeferWindowPos(32);
			DeferWindowPos(hDwp,m_VorSplitter,NULL,uSplitPos, 0,SPLIT_WIDE,cy, uFlags);
			EndDeferWindowPos(hDwp);
			RectifyControl(cx,cy);

			strTemp.Format("bHideList cx=%d,cy=%d", cx,cy);
			WriteLog(strFile, strTemp);
			//			FixControlStation(cx,cy);
		}
		//		m_BtExpression.ShowWindow(SW_HIDE);
		//		m_BtSend.ShowWindow(SW_HIDE);
	}
	else
	{
		if (m_VorSplitter.GetSafeHwnd()) 
		{
			//UINT uSplitPos=__max(cx*2/3-SPLIT_WIDE,350);
			//UINT uSplitPos=__max(cx*17/24-SPLIT_WIDE,350);
			UINT uSplitPos = cx - INFO_WIDTH - BUTTON_WIDE - 1;
			//		SafeMoveWindow(&m_VorSplitter,uSplitPos,GetTitleHight(),SPLIT_WIDE,cy-GetTitleHight());
			HDWP hDwp=BeginDeferWindowPos(32);
			DeferWindowPos(hDwp,m_VorSplitter,NULL,uSplitPos,0,SPLIT_WIDE,cy, uFlags);
			EndDeferWindowPos(hDwp);

			m_VorSplitter.InitSplitBar(cx*3/5,cx-250,false);
			//			FixControlStation(cx,cy);
			RectifyControl(cx,cy);
			strTemp.Format("cx=%d,cy=%d", cx,cy);
			WriteLog(strFile, strTemp);

		}
		//	m_BtExpression.ShowWindow(SW_SHOW);
		//	m_BtSend.ShowWindow(SW_SHOW);
	}
	bHideList=!bHideList;
	return;
}
开发者ID:275958081,项目名称:netfox,代码行数:61,代码来源:GameFrameDlg.cpp

示例2: switch

//列表控制
bool CGameFrame::ControlServerList(enServerListControl ServerListControl)
{
	//位置控制
	bool bHideGameList=false;
	switch (ServerListControl)
	{
	case ServerListControl_Hide: { bHideGameList=true; break; }
	case ServerListControl_Show: { bHideGameList=false; break; }
	case ServerListControl_Turn: { bHideGameList=!m_bHideGameList; break; }
	}

	//调整判断
	if (bHideGameList==m_bHideGameList) return false;

	//设置变量
	m_bRectify=false;
	m_bHideGameList=bHideGameList;

	//界面控制
	m_UserInfoView.ShowWindow((bHideGameList==false)?SW_SHOW:SW_HIDE);
	OnCommand(m_wShowListType,0);

	//设置按钮
	UINT uControlId = ((m_bHideGameList)?GetPlatformRes().uBtShowGameList:GetPlatformRes().uBtHideGameList);
	m_Splitter.ShowSplitterButton(uControlId,GetResInstanceHandle());

	//调整界面
	CRect rcClient;
	GetClientRect(&rcClient);
	RectifyControl(rcClient.Width(),rcClient.Height());

	return true;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:34,代码来源:GameFrame.cpp

示例3: GetClientRect

//拆分条消息
bool __cdecl CGameClientDlg::OnSplitterEvent(CSkinSplitter * pSkinSplitter, UINT uSplitID, int nXPos, int nYPos)
{
	CRect rcClient;
	GetClientRect(&rcClient);
	RectifyControl(rcClient.Width(),rcClient.Height());
	return true;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:8,代码来源:GameClientDlg.cpp

示例4: ASSERT

//选择数目
VOID CFaceItemSelectWnd::SetAllowItemCount(WORD wFaceCount)
{
	//获取对象
	ASSERT(CFaceItemControl::GetInstance()!=NULL);
	IFaceItemControl * pIFaceItemControl=CFaceItemControl::GetInstance();

	//设置变量
	m_wFaceCount=wFaceCount;
	m_wFaceCount=__min(m_wFaceCount,pIFaceItemControl->GetFaceCount());

	//索引调整
	if (m_wSelectFace!=INVALID_WORD)
	{
		m_wSelectFace=__min(m_wSelectFace,m_wFaceCount);
	}

	//调整控件
	if (m_hWnd!=NULL)
	{
		CRect rcRect;
		GetClientRect(&rcRect);
		RectifyControl(rcRect.Width(),rcRect.Height());
	}

	return;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:27,代码来源:FaceSelectControl.cpp

示例5: switch

//时间消息
void CGameFrameControl::OnTimer(UINT nIDEvent)
{
    switch(nIDEvent)
    {
    case IDI_BROWER_AD:			//广告时间
    {
        m_bShowAd=!m_bShowAd;

        //调整控件
        CRect rcClient;
        GetClientRect(&rcClient);
        RectifyControl(rcClient.Width(),rcClient.Height());

        return;
    }
    case IDI_SWITCH_USER:		//切换信息
    {
        //删除时间
        KillTimer(IDI_SWITCH_USER);

        //更新信息
        m_UserInfoView.SetUserViewInfo(m_pIClientKernel->GetMeUserInfo());

        return;
    }
    }

    CDialog::OnTimer(nIDEvent);
}
开发者ID:liangzai90,项目名称:WH2008,代码行数:30,代码来源:GameFrameControl.cpp

示例6: SetShootCard

//弹起扑克
DWORD CCardControl::SetShootCard(BYTE cbCardData[], DWORD dwCardCount)
{
	//变量定义
	bool bChangeStatus=false;

	//收起扑克
	for (INT_PTR i=0;i<m_CardDataItem.GetCount();i++) 
	{
		if (m_CardDataItem[i].bShoot==true)
		{
			bChangeStatus=true;
			m_CardDataItem[i].bShoot=false;
		}
	}

	//弹起扑克
	for (DWORD i=0;i<dwCardCount;i++)
	{
		for (INT_PTR j=0;j<m_CardDataItem.GetCount();j++)
		{
			tagCardItem * pCardItem=&m_CardDataItem[j];
			if ((pCardItem->bShoot==false)&&(pCardItem->cbCardData==cbCardData[i])) 
			{
				bChangeStatus=true;
				pCardItem->bShoot=true;
				break;
			}
		}
	}

	//设置界面
	if (m_hWnd!=NULL) RectifyControl();

	return dwCardCount;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:36,代码来源:CardControl.cpp

示例7: ShootAllCard

//弹起扑克
void CCardControl::ShootAllCard(bool bShoot)
{
	//变量定义
	bool bRectify=false;
	tagCardItem * pCardItem=NULL;
	DWORD dwCardCount=(DWORD)m_CardDataItem.GetCount();

	//设置扑克
	for (DWORD i=0;i<dwCardCount;i++)
	{
		//获取扑克
		pCardItem=&m_CardDataItem[i];

		//扑克分析
		if (pCardItem->bShoot!=bShoot)
		{
			bRectify=true;
			pCardItem->bShoot=bShoot;
		}
	}

	//调整控件
	if (bRectify==true) RectifyControl();

	return;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:27,代码来源:CardControl.cpp

示例8: RectifyControl

//设置弹起扑克
DWORD CCardControl::SetShootCard(const BYTE bCardDataIndex[], DWORD dwCardCount)
{
	//变量定义
	bool bChangeStatus=false;

	//收起扑克
	for (WORD i=0;i<m_CardDataItem.GetCount();i++) 
	{
		if (m_CardDataItem[i].bShoot==true)
		{
			bChangeStatus=true;
			m_CardDataItem[i].bShoot=false;
		}
	}

	//弹起扑克
	for (WORD i=0;i<dwCardCount; ++i)	{
		for (WORD j=0;j<m_CardDataItem.GetCount();j++)
		{
			if ((m_CardDataItem[j].bShoot==false)&&(m_CardDataItem[j].bCardData==bCardDataIndex[i])) 
			{
				bChangeStatus=true;
				m_CardDataItem[j].bShoot=true;
				break;
			}
		}
	}

	//调整控件
	RectifyControl();

	return 0;
}
开发者ID:codercold,项目名称:whgame,代码行数:34,代码来源:CardControl.cpp

示例9: ZeroMemory

//设置扑克
void CControlWnd::SetControlInfo(BYTE cbCenterCard, BYTE cbActionMask, tagGangCardResult & GangCardResult)
{
	//设置变量
	m_cbItemCount=0;
	m_cbCurrentItem=0xFF;
	m_cbActionMask=cbActionMask;
	m_cbCenterCard=cbCenterCard;

	//杠牌信息
	ZeroMemory(m_cbGangCard,sizeof(m_cbGangCard));
	for (BYTE i=0;i<GangCardResult.cbCardCount;i++) 
	{
		m_cbItemCount++;
		m_cbGangCard[i]=GangCardResult.cbCardData[i];
	}

	//计算数目
	BYTE cbItemKind[4]={WIK_LEFT,WIK_CENTER,WIK_RIGHT,WIK_PENG};
	for (BYTE i=0;i<CountArray(cbItemKind);i++) 
		if ((m_cbActionMask&cbItemKind[i])!=0) 
			m_cbItemCount++;

	//按钮控制
	m_btChiHu.EnableWindow(cbActionMask&WIK_CHI_HU);
	m_btListen.EnableWindow(cbActionMask&WIK_LISTEN);


	//调整控件
	RectifyControl();

	//显示窗口
	ShowWindow(SW_SHOW);

	return;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:36,代码来源:ControlWnd.cpp

示例10: SetBenchmarkPos

//基准位置
void CTimerControl::SetBenchmarkPos(int nXPos, int nYPos)
{
	//设置变量
	m_BenchmarkPos.x=nXPos;
	m_BenchmarkPos.y=nYPos;
	//调整控件
	if (m_hWnd!=NULL) RectifyControl();
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:9,代码来源:TimerControl.cpp

示例11: GetClientRect

//拆分条消息
bool CPlazaViewItem::OnSplitterEvent(CSkinSplitter * pSkinSplitter, UINT uSplitID, int nXPos, int nYPos)
{
	CRect rcClient;
	GetClientRect(&rcClient);
	RectifyControl(rcClient.Width(),rcClient.Height());

	return true;
}
开发者ID:275958081,项目名称:netfox,代码行数:9,代码来源:PlazaViewItem.cpp

示例12: RectifyControl

//位置信息
VOID CFaceItemSelectWnd::OnSize(UINT nType, INT cx, INT cy)
{
	__super::OnSize(nType,cx,cy);

	//调整控件
	RectifyControl(cx,cy);

	return;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:10,代码来源:FaceSelectControl.cpp

示例13: RectifyControl

//位置消息
VOID CWndUserInfoCtrl::OnSize(UINT nType, INT cx, INT cy)
{
	__super::OnSize(nType, cx, cy);

	//调整控件
	RectifyControl(cx,cy);

	return;
}
开发者ID:Michael-Z,项目名称:qipai-game,代码行数:10,代码来源:WndUserInfoCtrl.cpp

示例14: RectifyControl

//位置消息
void CGameFrameControl::OnSize(UINT nType, int cx, int cy)
{
	__super::OnSize(nType, cx, cy);

	//调整控件
	RectifyControl(cx,cy);

	return;
}
开发者ID:codercold,项目名称:whgame,代码行数:10,代码来源:GameFrameControl.cpp

示例15: RectifyControl

//位置消息
void CPlazaViewItem::OnSize(UINT nType, int cx, int cy)
{
	__super::OnSize(nType, cx, cy);

	//调整控件
	RectifyControl(cx,cy);

	return;
}
开发者ID:275958081,项目名称:netfox,代码行数:10,代码来源:PlazaViewItem.cpp


注:本文中的RectifyControl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。