Jelajahi Sumber

remove win process code

屈跃庭 5 tahun lalu
induk
melakukan
50feac86ab

+ 6 - 6
fhKeeper/formulahousekeeper/mywork/home.cpp

@@ -17,8 +17,8 @@
 #include "httpapi.h"
 #include "qresource.h"
 
-#include <windows.h>
-#include <tlhelp32.h>
+//#include <windows.h>
+//#include <tlhelp32.h>
 #include <stdio.h>
 #pragma execution_character_set("utf-8")
 Home::Home(QWidget *parent) :
@@ -54,7 +54,7 @@ Home::Home(QWidget *parent) :
   loadNavigate(str);
 
 
-  HANDLE hCurrentCursor = GetForegroundWindow();
+  /**HANDLE hCurrentCursor = GetForegroundWindow();
   qDebug()<<hCurrentCursor<<endl;
 //  EnumWindows(StaticEnumWindowsProc,reinterpret_cast<LPARAM>(this));
   PROCESSENTRY32 pe32;
@@ -70,10 +70,10 @@ Home::Home(QWidget *parent) :
   BOOL bMore=::Process32First(hProcessSnap,&pe32);
 
   ::CloseHandle(hProcessSnap);
-
+**/
 }
 
-BOOL Home::StaticEnumWindowsProc(HWND hwnd, LPARAM lParam)
+/**BOOL Home::StaticEnumWindowsProc(HWND hwnd, LPARAM lParam)
 {
     //窗口是否可视
     if (!::IsWindowVisible(hwnd))
@@ -125,7 +125,7 @@ BOOL Home::StaticEnumWindowsProc(HWND hwnd, LPARAM lParam)
     return TRUE;
 }
 
-
+**/
 void Home::captureScreen() {
     QScreen *screen = QGuiApplication::primaryScreen();
     QString filePathName = "timeManager_screencap.jpg";

+ 2 - 2
fhKeeper/formulahousekeeper/mywork/home.h

@@ -4,7 +4,7 @@
 #include <QMainWindow>
 #include <QTimer>
 #include <QtWebEngineWidgets>
-#include "Windows.h"
+//#include "Windows.h"
 #define GWL_HWNDPARENT = -8
 #define GCL_HICON = -14
 #define GCL_MENUNAME = -8
@@ -25,7 +25,7 @@ public slots:
     void captureScreen();
     QString getProcessList();
     void loadNavigate(QString sUrl);
-    static BOOL StaticEnumWindowsProc(HWND hwnd, LPARAM lParam);
+    //static BOOL StaticEnumWindowsProc(HWND hwnd, LPARAM lParam);
 private:
     Ui::Home *ui;
     QTimer *myTimer;