if (m_regionPower.PtInRegion(point)) //鼠标落在位图按钮之上
{
m_bPower = TRUE;
//将位图按钮设置成获得输入状态
pWnd= GetDlgItem(IDC_BUTTON_POWER);
pWnd->SetFocus();
SetCapture();
InputEdit().SetWindowText(ShowString0);
InputEdit().ShowWindow(TRUE);
//将鼠标光标变成小手形状
MyCursor = AfxGetApp()->LoadCursor(IDC_MYCURSOR);
::SetCursor(MyCursor);
VERIFY(m_Play.LoadBitmaps("PLAYU","PLAYD","PLAYF","PLAYX"));
m_bPressedPlay = FALSE;
return;
}
if (m_regionPlay.PtInRegion(point)) //鼠标落在位图按钮之上
{
if (m_bPowerOn) { //如果电源已被开启
m_bPlay = TRUE;
pWnd= GetDlgItem(IDC_BUTTON_PLAY);
pWnd->SetFocus();
SetCapture();
InputEdit().SetWindowText(ShowString0);
InputEdit().ShowWindow(TRUE);
MyCursor = AfxGetApp()->LoadCursor(IDC_MYCURSOR);
::SetCursor(MyCursor);
VERIFY(m_Power.LoadBitmaps("POWERONU","POWEROND","POWERONF"));
}
else { //如果电源已被关闭
ReleaseCapture();
InputEdit().SetWindowText(ShowString0+ShowString2);
InputEdit().ShowWindow(TRUE);
VERIFY(m_Power.LoadBitmaps("POWEROFU","POWEROFD","POWEROFF"));
}
m_bPressedPower= FALSE;
return;
}
上一页 [1] [2] [3] 下一页

【责编:Youping】