Fairly new to these forums, apologies if this is the wrong section.
I've been scratching my head about an issue for a few days, I'm trying to use the win32 setWindowPos function to resize+reposition the google chrome window. So far it doesn't work, maybe I'm getting the wrong handle, if I understand the chrome process setup - each tab gets a new process and each process has its own handle? The code I'm using to find the chrome handle is the following:
C++ code:
HWND handle = FindWindow(TEXT("Chrome_WidgetWin_1"),NULL);
I'm then passing that handle as an argument to setWindowPos
SetWindowPos(handle, HWND_TOPMOST, 0, 0, iwidth, iheight, SWP_NOMOVE | SWP_SHOWWINDOW);
Doing the above with any other program gives me a resized window that is in focus. Doing that with the chrome handle does nothing. If possible can someone suggest reading material that explains how to get the proper handle(hwnd)? Or suggest some pseudo code that can point me in the right direction?