I am using the following code:
const int GWL_STYLE = (-16); const UInt32 WS_POPUP = 0x80000000; const UInt32 WS_CHILD = 0x40000000; [DllImport("user32.dll", SetLastError = true)] static extern UInt32 GetWindowLong(IntPtr hWnd, int nIndex); [DllImport("user32.dll")] static extern int SetWindowLong(IntPtr hWnd, int nIndex, UInt32 dwNewLong);
and somewhere ...
SetWindowLong(this.Handle, GWL_STYLE, ((GetWindowLong(this.Handle, GWL_STYLE) & ~(WS_POPUP)) | WS_CHILD));
Will this work on both 32-bit and 64-bit machines?
If not, if I compile my application to run as an x86 process, will it still work on a 64-bit machine?
And how can I rewrite the following code in order on both 32-bit and 64-bit machines?
source share