//鼠标落在所有的位图按钮之外
ReleaseCapture();
InputEdit().SetWindowText(ShowString1);
InputEdit().ShowWindow(TRUE);
pWnd= GetDlgItem(IDOK);
pWnd->SetFocus();
VERIFY(m_Play.LoadBitmaps("PLAYU","PLAYD","PLAYF","PLAYX"));
if (m_bPowerOn)
VERIFY(m_Power.LoadBitmaps("POWERONU","POWEROND","POWERONF"));
else
VERIFY(m_Power.LoadBitmaps("POWEROFU","POWEROFD","POWEROFF"));
m_bPressedPlay = FALSE;
m_bPressedPower= FALSE;
CDialog::OnMouseMove(nFlags, point);
}
void CBmpDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
CWnd *pWnd;
if (m_bPlay && m_bPowerOn) {
// Change Focus so as to Change the bitmap of m_Play
pWnd= GetDlgItem(IDOK);
pWnd->SetFocus();
VERIFY(m_Play.LoadBitmaps("PLAYD"));
m_Play.UpdateWindow();
m_Play.Invalidate(TRUE);
OnButtonPlay();
m_bPressedPlay = TRUE;
}
if (m_bPower== TRUE) {
// Change Focus so as to Change the bitmap of m_Power
pWnd= GetDlgItem(IDOK);
pWnd->SetFocus();
if (m_bPowerOn)
VERIFY(m_Power.LoadBitmaps("POWEROND"));
else
VERIFY(m_Power.LoadBitmaps("POWEROFD"));
m_Power.UpdateWindow();
m_Power.Invalidate(TRUE);
OnButtonPower();
m_bPressedPower = TRUE;
}
CDialog::OnLButtonDown(nFlags, point);
}
void CBmpDlg::OnLButtonUp(UINT nFlags, CPoint point)
{
CWnd * pWnd;
if (m_bPressedPlay == TRUE) {
pWnd= GetDlgItem(IDOK);
pWnd->SetFocus();
VERIFY(m_Play.LoadBitmaps("PLAYF"));
m_Play.UpdateWindow();
m_Play.Invalidate(TRUE);
m_bPressedPlay = FALSE;
}
if (m_bPressedPower == TRUE) {
pWnd= GetDlgItem(IDOK);
pWnd->SetFocus();
if (m_bPowerOn)
VERIFY(m_Power.LoadBitmaps("POWERONF"));
else
VERIFY(m_Power.LoadBitmaps("POWEROFF"));
m_Power.UpdateWindow();
m_Power.Invalidate(TRUE);
m_bPressedPower = FALSE;
}
CDialog::OnLButtonUp(nFlags, point);
}
上一页 [1] [2] [3]

【责编:Youping】