Programma list gemaakt om alle windows met hun handle weer te geven.
This commit is contained in:
1
cpp/list/dev/copy.bat
Normal file
1
cpp/list/dev/copy.bat
Normal file
@@ -0,0 +1 @@
|
|||||||
|
copy list.exe ..\..\..\java\native\
|
||||||
2
cpp/list/dev/copy.mak
Normal file
2
cpp/list/dev/copy.mak
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
all-after:
|
||||||
|
copy.bat
|
||||||
59
cpp/list/dev/list.dev
Normal file
59
cpp/list/dev/list.dev
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
[Project]
|
||||||
|
FileName=list.dev
|
||||||
|
Name=list
|
||||||
|
UnitCount=1
|
||||||
|
Type=1
|
||||||
|
Ver=1
|
||||||
|
ObjFiles=
|
||||||
|
Includes=
|
||||||
|
Libs=
|
||||||
|
PrivateResource=
|
||||||
|
ResourceIncludes=
|
||||||
|
MakeIncludes=copy.mak
|
||||||
|
Compiler=
|
||||||
|
CppCompiler=
|
||||||
|
Linker=
|
||||||
|
IsCpp=1
|
||||||
|
Icon=
|
||||||
|
ExeOutput=
|
||||||
|
ObjectOutput=
|
||||||
|
OverrideOutput=0
|
||||||
|
OverrideOutputName=List.exe
|
||||||
|
HostApplication=
|
||||||
|
Folders=
|
||||||
|
CommandLine=
|
||||||
|
UseCustomMakefile=0
|
||||||
|
CustomMakefile=
|
||||||
|
IncludeVersionInfo=0
|
||||||
|
SupportXPThemes=0
|
||||||
|
CompilerSet=0
|
||||||
|
CompilerSettings=0000000000000000000000
|
||||||
|
|
||||||
|
[Unit1]
|
||||||
|
FileName=..\main.cpp
|
||||||
|
CompileCpp=1
|
||||||
|
Folder=
|
||||||
|
Compile=1
|
||||||
|
Link=1
|
||||||
|
Priority=1000
|
||||||
|
OverrideBuildCmd=0
|
||||||
|
BuildCmd=
|
||||||
|
|
||||||
|
[VersionInfo]
|
||||||
|
Major=0
|
||||||
|
Minor=1
|
||||||
|
Release=1
|
||||||
|
Build=1
|
||||||
|
LanguageID=1033
|
||||||
|
CharsetID=1252
|
||||||
|
CompanyName=
|
||||||
|
FileVersion=
|
||||||
|
FileDescription=Developed using the Dev-C++ IDE
|
||||||
|
InternalName=
|
||||||
|
LegalCopyright=
|
||||||
|
LegalTrademarks=
|
||||||
|
OriginalFilename=
|
||||||
|
ProductName=
|
||||||
|
ProductVersion=
|
||||||
|
AutoIncBuildNr=0
|
||||||
|
|
||||||
21
cpp/list/main.cpp
Normal file
21
cpp/list/main.cpp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
BOOL CALLBACK EnumProc(HWND hWnd, LPARAM lParam);
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
EnumWindows(EnumProc, 0);
|
||||||
|
int a;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CALLBACK EnumProc(HWND hWnd, LPARAM lParam) {
|
||||||
|
TCHAR title[500];
|
||||||
|
ZeroMemory(title, sizeof(title));
|
||||||
|
GetWindowText(hWnd, title, sizeof(title) / sizeof(title[0]));
|
||||||
|
cout << hWnd << endl << title << endl;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
BIN
java/native/list.exe
Normal file
BIN
java/native/list.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user