BOOL CMp3PlayerDlg::OnInitDialog()//初始化函数
{
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));
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] 下一页
|