void CSystemDlg::OnRefreshPsList() { // TODO: Add your command handler code here if (m_list_process.IsWindowVisible()) GetProcessList(); if (m_list_windows.IsWindowVisible()) GetWindowsList(); }
void GrabScreen::Init(GrabYourScreen &_program) { program = &_program; editFileNameGrab <<= AppendFileName(GetDesktopFolder(), "ScreenGrab.avi"); editFileNameGrab.Type(t_("Video file"), ".avi"); editTime <<= 5; editFrameRate <<= 1; opGrabMouse <<= true; swGrabMode.Add("Desktop"); swGrabMode.Add("Window"); #if defined(PLATFORM_WIN32) swGrabMode.Add("Rectangle"); #endif swGrabMode.MinCaseHeight(20); swGrabMode.SetData(0); swGrabMode.WhenAction = THISBACK(SwGrabMode_Action); SwGrabMode_Action(); #if defined(PLATFORM_WIN32) butGrab.WhenPush = THISBACK(ButGrab_Push); #else butGrab.Enable(false); editFileNameGrab.Enable(false); editTime.Enable(false); editFrameRate.Enable(false); opGrabMouse.Enable(false); editLeft.Hide(); editTop.Hide(); editWidth.Hide(); editHeight.Hide(); left.Hide(); top.Hide(); width.Hide(); height.Hide(); #endif editLeft <<= 100; editWidth <<= 1000; editTop <<= 100; editHeight <<= 900; String extension; editFileNameSnap <<= AppendFileName(GetDesktopFolder(), "ScreenSnap.jpg"); editFileNameSnap.Type(t_("Image file"), ".jpg"); butSnap.WhenPush = THISBACK(ButSnap_Push); Array<int64> hWnd, processId; Array<String> name, fileName, caption; GetWindowsList(hWnd, processId, name, fileName, caption, false); Sort(caption); for (int i = 0; i < caption.GetCount(); ++i) { if (!Trim(caption[i]).IsEmpty()) editWindowTitle.Add(caption[i]); } editWindowTitle.SetData(editWindowTitle.GetValue(0)); SetTimeCallback(-1000, THISBACK(Timer)); }
void CSystemDlg::ShowSelectWindow(void) { switch (m_tab.GetCurSel()) { case 0: m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_SHOW); if(m_list_process.GetItemCount() == 0) GetProcessList(); break; case 1: m_list_windows.ShowWindow(SW_SHOW); m_list_process.ShowWindow(SW_HIDE); if(m_list_windows.GetItemCount() == 0) GetWindowsList(); break; default: break; } }
void CSystemDlg::ShowSelectWindow() { switch (m_tab.GetCurSel()) { case 0: m_info.ShowWindow(SW_HIDE); m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_SHOW); m_list_dialupass.ShowWindow(SW_HIDE); if (m_list_process.GetItemCount() == 0) GetProcessList(); break; case 1: m_info.ShowWindow(SW_HIDE); m_list_windows.ShowWindow(SW_SHOW); m_list_process.ShowWindow(SW_HIDE); m_list_dialupass.ShowWindow(SW_HIDE); if (m_list_windows.GetItemCount() == 0) GetWindowsList(); break; case 2: m_info.ShowWindow(SW_HIDE); m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_HIDE); m_list_dialupass.ShowWindow(SW_SHOW); if (m_list_dialupass.GetItemCount() == 0) GetDialupassList(); break; case 3: m_info.ShowWindow(SW_SHOW); m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_HIDE); m_list_dialupass.ShowWindow(SW_HIDE); if (m_info.GetItemCount() == 0) GetInfo(); break; } }