示例#1
0
void CParmStatDlg::OnFunc() 
{
   UpdateData();
   SetFunc();
   EnableType();
   EnableHint();
   EnableScale();
   m_pRun->SetValues(this);
   UpdateData(FALSE);
}
示例#2
0
文件: item.cpp 项目: 1suming/pap2
int KItemNull::Init(KItemNullData & ItemNullData)
{
    if (ItemNullData.wszName[0] != L'\0')
        SetName(ATL::CW2A(ItemNullData.wszName, GetCodePage()));
    
    m_nLink = ItemNullData.nLink;
    if (m_nLink)
        SetLinkInfo(ATL::CW2A(ItemNullData.wszLinkInfo, GetCodePage()));

    m_dwPosType = static_cast<DWORD>(ItemNullData.nPosType);
	SetRelPos(ItemNullData.fRelX, ItemNullData.fRelY);
	SetSize(ItemNullData.fWidth, ItemNullData.fHeight);
	SetAlpha(ItemNullData.nAlpha);
	m_nTipIndex = ItemNullData.nTipIndex;

	if (ItemNullData.nDisableScale)
	{
		EnableScale(false);
		m_fRelX *= ItemNullData.fScale;
		m_fRelY *= ItemNullData.fScale;
	}
	else
	{
		m_fRelX *= ItemNullData.fScale;
		m_fRelY *= ItemNullData.fScale;
		m_fWidth *= ItemNullData.fScale;
		m_fHeight *= ItemNullData.fScale;
	}
	if (ItemNullData.nLockShowAndHide)
	{
		Hide();
		LockShowAndHide(true);
	}

	m_fUserData = ItemNullData.fUserData;

    if (ItemNullData.pEventOwner)
	{
		ItemNullData.pEventOwner->UpdateDrawList();
		if(ItemNullData.dwEventID)
		{
			m_dwEvent = ItemNullData.dwEventID;
			ItemNullData.pEventOwner->UpdateEvent();
		}
	}

	m_nAreaIndex = ItemNullData.nAreaTestIndex;

	if (ItemNullData.nIntPos)
		SetIntPos(true);

    return true;
}