I spawned an external app. using Createprocess API I want to remove the border of its window.
I have search the net and I found some examples using SetWindowLong and GetWindowLong but so far I have not success.
Can somebody help?
Here is my snippet:
childHwnd is the window handle of the spawned process.
long lStyle = GetWindowLong(childHwnd, GWL_STYLE);
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
SetWindowLong(childHwnd, GWL_STYLE, lStyle);
long lExStyle = GetWindowLong(childHwnd, GWL_EXSTYLE);
lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
SetWindowLong(childHwnd, GWL_EXSTYLE, lExStyle);
SetWindowPos(childHwnd, NULL, 0,0,0,0
, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
Also I read online some examples using SetWindowRgn but I can't figure out how they work.
I have search the net and I found some examples using SetWindowLong and GetWindowLong but so far I have not success.
Can somebody help?
Here is my snippet:
childHwnd is the window handle of the spawned process.
long lStyle = GetWindowLong(childHwnd, GWL_STYLE);
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
SetWindowLong(childHwnd, GWL_STYLE, lStyle);
long lExStyle = GetWindowLong(childHwnd, GWL_EXSTYLE);
lExStyle &= ~(WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE);
SetWindowLong(childHwnd, GWL_EXSTYLE, lExStyle);
SetWindowPos(childHwnd, NULL, 0,0,0,0
, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER);
Also I read online some examples using SetWindowRgn but I can't figure out how they work.