Asked By spuds111
18-Apr-07 06:57 PM
On Apr 19, 7:02 am, Narasimham <Narasim...@>
Not sure if this is the best way but it was the only way I could find
try the following (c++)
[DllImport("USER32", EntryPoint="SetWindowLongA",
SetLastError=true,
CharSet=CharSet::Unicode, ExactSpelling=true,
CallingConvention=CallingConvention::Winapi)]
static int apiSetWindowLongA(IntPtr WindowHandle, int Index,
int NewVal);
[DllImport("USER32", EntryPoint="GetWindowLongA",
SetLastError=true,
CharSet=CharSet::Unicode, ExactSpelling=true,
CallingConvention=CallingConvention::Winapi)]
static int apiGetWindowLongA(IntPtr WindowHandle, int Index);
private: void RemoveMenu()
{int WS_SYSMENU = '\x80' << 12;
int GWL_STYLE = (-16);
int dwStyle;
dwStyle = apiGetWindowLongA(Handle, GWL_STYLE);
apiSetWindowLongA(Handle, GWL_STYLE, dwStyle &=
~WS_SYSMENU);
}