m_DlgStyle.sTitleName = "音樂播放器";//設定標題
COwnerDrawDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
SetTimer(4,100,NULL);//啟動4號定時器
///////////////
if(m_bAutoRun)
SetTimer(1,1000,NULL);//如果是自動播放,則啟動1號定時器
//以下為應用程序隱藏任務欄,放到托盤中去的程序
long wl = GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE);
SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,WS_EX_TOOLWINDOW);
//
NOTIFYICONDATA tnd;
tnd.cbSize=sizeof(NOTIFYICONDATA);
tnd.hWnd=this->m_hWnd;
tnd.uID=IDI_MAINFRAME;
tnd.uFlags=NIF_MESSAGE|NIF_ICON|NIF_TIP;
tnd.uCallbackMessage=WM_DLG_SHOW;
tnd.hIcon=LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_MAINFRAME));
strcpy(tnd.szTip,"音樂播放器");
Shell_NotifyIcon(NIM_ADD,&tnd);
return TRUE; // return TRUE unless you set the focus to a control
}
=================
void CMp3PlayerDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) //拖動音樂播放進度條
{
if(pScrollBar == &m_MPBar)
{
switch(nSBCode)
{
case SB_THUMBTRACK:
m_nPos = nPos;
&nb
[1] [2] [3] [4] [5] [6] [7] [8] 下一頁