DBG+GUI: improved window proc query code
This commit is contained in:
parent
b45f19da5e
commit
5aaa585c96
|
@ -101,7 +101,7 @@ typedef struct
|
|||
DWORD threadId;
|
||||
DWORD style;
|
||||
DWORD styleEx;
|
||||
duint wndProc;//not used yet
|
||||
duint wndProc;
|
||||
bool enabled;
|
||||
RECT position;
|
||||
char windowTitle[MAX_COMMENT_SIZE];
|
||||
|
|
|
@ -180,6 +180,7 @@ static WINDOW_INFO getWindowInfo(HWND hWnd)
|
|||
GetWindowRect(hWnd, &info.position); //Get Window Rect
|
||||
info.style = GetWindowLong(hWnd, GWL_STYLE); //Get Window Style
|
||||
info.styleEx = GetWindowLong(hWnd, GWL_EXSTYLE); //Get Window Stye ex
|
||||
info.wndProc = (IsWindowUnicode(hWnd) ? GetClassLongPtrW : GetClassLongPtrA)(hWnd, GCLP_WNDPROC); //Get Window Proc (thanks to ThunderCls!)
|
||||
info.enabled = IsWindowEnabled(hWnd) == TRUE;
|
||||
info.parent = (duint)GetParent(hWnd); //Get Parent Window
|
||||
info.threadId = GetWindowThreadProcessId(hWnd, nullptr); //Get Window Thread Id
|
||||
|
|
|
@ -326,14 +326,7 @@ void HandlesView::enumWindows()
|
|||
for(auto i = 0; i < count; i++)
|
||||
{
|
||||
mWindowsTable->setCellContent(i, 0, ToHexString(windows[i].handle));
|
||||
auto hwnd = HWND(windows[i].handle);
|
||||
duint classproc;
|
||||
//Thanks to ThunderCls!
|
||||
if(IsWindowUnicode(hwnd))
|
||||
classproc = GetClassLongW(hwnd, GCL_WNDPROC);
|
||||
else
|
||||
classproc = GetClassLongA(hwnd, GCL_WNDPROC);
|
||||
mWindowsTable->setCellContent(i, 1, ToPtrString(classproc));
|
||||
mWindowsTable->setCellContent(i, 1, ToPtrString(windows[i].wndProc));
|
||||
mWindowsTable->setCellContent(i, 2, QString(windows[i].windowTitle));
|
||||
mWindowsTable->setCellContent(i, 3, QString(windows[i].windowClass));
|
||||
char threadname[MAX_THREAD_NAME_SIZE];
|
||||
|
|
Loading…
Reference in New Issue