本文整理汇总了C++中SWindow::SetVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ SWindow::SetVisible方法的具体用法?C++ SWindow::SetVisible怎么用?C++ SWindow::SetVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SWindow
的用法示例。
在下文中一共展示了SWindow::SetVisible方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSize
void CMainDlg::OnSize(UINT nType, CSize size)
{
SetMsgHandled(FALSE);
if(!m_bLayoutInited)
{
return;
}
SWindow *pBtnMax = FindChildByName(L"btn_max");
SWindow *pBtnRestore = FindChildByName(L"btn_restore");
if(!pBtnMax || !pBtnRestore)
{
return;
}
if(nType == SIZE_MAXIMIZED)
{
pBtnRestore->SetVisible(TRUE);
pBtnMax->SetVisible(FALSE);
}
else if(nType == SIZE_RESTORED)
{
pBtnRestore->SetVisible(FALSE);
pBtnMax->SetVisible(TRUE);
}
}
示例2: InitDir
void CFolderScanHandler::InitDir( const SStringT & strDir )
{
SWindow *pBtn = m_pPageRoot->FindChildByName(L"btn_go");
SWindow *pEditDir = m_pPageRoot->FindChildByName(L"edit_dir");
DWORD dwAttr = GetFileAttributes(strDir);
if(dwAttr ==INVALID_FILE_ATTRIBUTES)
return;
if(!(dwAttr & FILE_ATTRIBUTE_DIRECTORY))
return;
pEditDir->SetWindowText(strDir);
pBtn->EnableWindow(FALSE,TRUE);
pEditDir->EnableWindow(FALSE,TRUE);
SWindow *pScanAni = m_pPageRoot->FindChildByName(L"ani_scan");
pScanAni->SetVisible(TRUE,TRUE);
SFolderTreeCtrl *pMcTreeCtrl = m_pTreelist->GetFolderTreeCtrl();
pMcTreeCtrl->RemoveAllItems();
HSTREEITEM hRoot = pMcTreeCtrl->InsertItem(_T("root"),TRUE,0,STVI_ROOT);
if(EnumFiles(strDir,hRoot))
{
m_pTreelist->GetFolderTreeCtrl()->GetFileInfo(hRoot)->percent=100;
m_pTreelist->GetFolderTreeCtrl()->UpdateTreeItemPercent(hRoot);
}
m_pTreelist->GetFolderTreeCtrl()->Invalidate();
pBtn->EnableWindow(TRUE,TRUE);
pEditDir->EnableWindow(TRUE,TRUE);
pScanAni->SetVisible(FALSE,TRUE);
}
示例3: OnBtnToolsWinNext
void CMainWnd::OnBtnToolsWinNext() //下一个
{
SWindow* pWin = FindChildByName(L"tool_page2");
if(pWin) pWin->SetVisible(TRUE,TRUE);
pWin = FindChildByName(L"tool_page1");
if(pWin) pWin->SetVisible(FALSE,TRUE);
}
示例4: OnBtnVolumeQuit
void CMainWnd::OnBtnVolumeQuit() //退出静音
{
SWindow * pBtn = FindChildByName(L"btn_volume_mute");
if(pBtn) pBtn->SetVisible(FALSE);
pBtn = FindChildByName(L"btn_volume");
if(pBtn) pBtn->SetVisible(TRUE);
}
示例5: OnBtnPause
void CMainWnd::OnBtnPause() //暂停
{
SWindow * pBtn = FindChildByName(L"btn_play");
if(pBtn) pBtn->SetVisible(TRUE);
pBtn = FindChildByName(L"btn_pause");
if(pBtn) pBtn->SetVisible(FALSE);
}
示例6: OnBtnLEyed
void CMainWnd::OnBtnLEyed() // 关闭左眼
{
SWindow * pBtn = FindChildByName(L"btn_left_eye");
if(pBtn) pBtn->SetVisible(TRUE);
pBtn = FindChildByName(L"btn_left_eyed");
if(pBtn) pBtn->SetVisible(FALSE);
}
示例7: OnBtnBoxHide
void CMainWnd::OnBtnBoxHide() //关闭暴风盒子
{
m_winBox.ShowWindow(SW_HIDE);
SWindow* pBtn = FindChildByName(L"btn_boxed");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
pBtn = FindChildByName(L"btn_box");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
}
示例8: OnBtnQuitFullscreen
void CMainWnd::OnBtnQuitFullscreen() //关闭全屏
{
SWindow * pBtn = FindChildByName(L"btn_quit_fullscreen");
if(pBtn) pBtn->SetVisible(FALSE);
pBtn = FindChildByName(L"btn_fullscreen");
if(pBtn) pBtn->SetVisible(TRUE);
// SMessageBox(NULL,_T("OnBtnQuitFullscreen"),_T("haha"),MB_OK|MB_ICONEXCLAMATION);
}
示例9: if
void CMainWnd::OnBtnPage1Sortord() //播放列表排序方向,向下或向上
{
SWindow *pDown = FindChildByName(L"sortord_down");
SWindow *pUp = FindChildByName(L"sortord_up");
if(pDown && pUp)
{
if(!(pDown->IsVisible(FALSE)) && !(pUp->IsVisible(FALSE)))
up_or_down = 0;
else if(pDown->IsVisible(FALSE) && !(pUp->IsVisible(FALSE)))
up_or_down = 1;
else if(!(pDown->IsVisible(FALSE)) && pUp->IsVisible(FALSE))
up_or_down = 2;
else
up_or_down = -1;
}
if(popularity_up_or_down)
{
switch(up_or_down)
{
case 0:
pDown->SetVisible(TRUE, TRUE);
pUp->SetVisible(FALSE, TRUE);
up_or_down = 1;
break;
case 1:
pDown->SetVisible(FALSE, TRUE);
pUp->SetVisible(TRUE, TRUE);
up_or_down = 2;
break;
case 2:
pDown->SetVisible(FALSE, TRUE);
pUp->SetVisible(FALSE, TRUE);
up_or_down = 0;
default:
break;
}
}
else
switch(up_or_down)
{
case 1:
pDown->SetVisible(FALSE, TRUE);
pUp->SetVisible(TRUE, TRUE);
up_or_down = 2;
break;
case 2:
pDown->SetVisible(TRUE, TRUE);
pUp->SetVisible(FALSE, TRUE);
up_or_down = 1;
default:
break;
}
}
示例10: OnBtnListShow
void CMainWnd::OnBtnListShow() //显示播放列表
{
SWindow * pBtn = FindChildByName(L"play_list");
if(pBtn)
{
pBtn->SetVisible(TRUE,TRUE);
}
pBtn = FindChildByName(L"btn_list_showed");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
pBtn = FindChildByName(L"btn_list_show");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
}
示例11: OnBtnBox
void CMainWnd::OnBtnBox() //打开暴风盒子
{
//m_winBox.ShowWindow(SW_SHOWNORMAL);
SWindow *pBtn = FindChildByName(L"mainWnd");
CRect rc_temp;
if(pBtn)
{
pBtn->GetClientRect(&rc_temp);
ClientToScreen(&rc_temp);
m_winBox.SetWindowPos(HWND_TOP, rc_temp.right -5, rc_temp.top -3, 250, rc_temp.Height() +10, NULL);
m_winBox.ShowWindow(SW_SHOWNORMAL);
}
pBtn = FindChildByName(L"btn_boxed");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
pBtn = FindChildByName(L"btn_box");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
}
示例12: OnHideOrShowLeftWndClick
void CMainDlg::OnHideOrShowLeftWndClick()
{
if(m_bLayoutInited)
{
SImageButton *pBtn = FindChildByName2<SImageButton>(L"btn_navi_left_wnd");
SWindow *pLeftWnd = FindChildByName(L"wnd_left_file_type");
m_LeftWndShow = !m_LeftWndShow;
pLeftWnd->SetVisible(m_LeftWndShow);
if(m_LeftWndShow)
{
pBtn->SetAttribute(L"skin", L"skin_navi_left_wnd");
}
else
{
pBtn->SetAttribute(L"skin", L"skin_navi_left_wnd_hide");
}
}
}
示例13: OnFlywndState
void CMainDlg::OnFlywndState( EventArgs *pEvt )
{
FlyStateEvent *pEvtFlywnd = (FlyStateEvent*)pEvt;
if(pEvtFlywnd->nPercent == SAnimator::PER_END)
{
//测试:隐藏音乐频谱 (可以用定时器判断分层窗口的收缩状态来控制)
SWindow *pSpectrum = FindChildByName2<SWindow>("spectrum");
if(pSpectrum) pSpectrum->SetVisible(pEvtFlywnd->bEndPos,TRUE);
// if (!m_bCut)
// {
// m_bCut=true;
// }else
// {
// SWindow *pSpectrum = FindChildByName2<SWindow>("spectrum");
// if(pSpectrum) pSpectrum->SetVisible(FALSE,TRUE);
// m_bCut=false;
// }
}
}
示例14: OnCommand
//响应菜单事件
void CMainWnd::OnCommand( UINT uNotifyCode, int nID, HWND wndCtl )
{
if(uNotifyCode==0)
{
if(nID==1101)
{//nID==1101对应menu_playlist_sortord菜单的第一项
SWindow* pBtn = FindChildByName(L"btn_sortord");
// if(pBtn) pBtn->SetWindowText (L"观众");
pBtn = FindChildByName(L"sortord_down");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
pBtn = FindChildByName(L"sortord_up");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
up_or_down = -1;
popularity_up_or_down = TRUE;
::CheckMenuItem(menu_sortord.m_hMenu,1101,MF_CHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1102,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1103,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1104,MF_UNCHECKED);
}
else if(nID==1102)
{//nID==1101对应menu_playlist_sortord菜单的第二项
SWindow* pBtn = FindChildByName(L"btn_sortord");
// if(pBtn) pBtn->SetWindowText (L"名称");
pBtn = FindChildByName(L"sortord_down");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
pBtn = FindChildByName(L"sortord_up");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
up_or_down = 0;
popularity_up_or_down = FALSE;
::CheckMenuItem(menu_sortord.m_hMenu,1101,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1102,MF_CHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1103,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1104,MF_UNCHECKED);
}
else if(nID==1103)
{//nID==1103对应menu_playlist_sortord菜单的第三项
SWindow* pBtn = FindChildByName(L"btn_sortord");
// if(pBtn) pBtn->SetWindowText (L"评分");
pBtn = FindChildByName(L"sortord_down");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
pBtn = FindChildByName(L"sortord_up");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
up_or_down = 0;
popularity_up_or_down = FALSE;
::CheckMenuItem(menu_sortord.m_hMenu,1101,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1102,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1103,MF_CHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1104,MF_UNCHECKED);
}
else if(nID==1104)
{//nID==1104对应menu_playlist_sortord菜单的第四项
SWindow* pBtn = FindChildByName(L"btn_sortord");
// if(pBtn) pBtn->SetWindowText (L"评论");
pBtn = FindChildByName(L"sortord_down");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
pBtn = FindChildByName(L"sortord_up");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
up_or_down = 0;
popularity_up_or_down = FALSE;
::CheckMenuItem(menu_sortord.m_hMenu,1101,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1102,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1103,MF_UNCHECKED);
::CheckMenuItem(menu_sortord.m_hMenu,1104,MF_CHECKED);
}
else if(nID==11101)
{//nID==11101对应menu_PlayMode菜单的第一项
SWindow* pBtn = FindChildByName(L"btn_OrderPlay");
if(pBtn) pBtn->SetVisible(TRUE,TRUE);
pBtn = FindChildByName(L"btn_SinglePlay");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
pBtn = FindChildByName(L"btn_RandomPlay");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
pBtn = FindChildByName(L"btn_SingleCycle");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
pBtn = FindChildByName(L"btn_ListCycle");
if(pBtn) pBtn->SetVisible(FALSE,TRUE);
//.........这里部分代码省略.........
示例15: OnBtnToolsWinClose
/******************************* 工具箱窗口 ********************************************/
void CMainWnd::OnBtnToolsWinClose() //关闭按钮
{
SWindow* pWin = FindChildByName(L"win_tools");
if(pWin) pWin->SetVisible(FALSE,TRUE);
}