sodasoft
12-21-2003, 02:48 AM
I'm getting client coordinates in full-screen mode as though there is a title bar. I tried calling SetWindowLong to turn off various windowed style bits but it doesn't help. I am still getting client coordinates that are off.
this is how I turn off the window style bits:
dw_flags=GetWindowLong(g_DX.hwnd, GWL_STYLE);
dw_flags&=~(WS_SYSMENU);
dw_flags&=~(WS_CAPTION);
dw_flags&=~(WS_BORDER);
dw_flags&=~(WS_MINIMIZEBOX);
dw_flags|=WS_POPUP;
dw_ex_flags=WS_EX_TOPMOST;
When the user pressed ALT+ENTER, I am not destroying the game window handle, although I destroy dx objects and surfaces, and recreate them.
How do you solve this? I've thought about turning off the window cursor and drawing my own cursor and blitting it using "adjusted" coordinates ie basically, I get the height of the title bar, and subtract it from the coordinates WM_MOUSEMOVE gives me. But surely there is a better way.
this is how I turn off the window style bits:
dw_flags=GetWindowLong(g_DX.hwnd, GWL_STYLE);
dw_flags&=~(WS_SYSMENU);
dw_flags&=~(WS_CAPTION);
dw_flags&=~(WS_BORDER);
dw_flags&=~(WS_MINIMIZEBOX);
dw_flags|=WS_POPUP;
dw_ex_flags=WS_EX_TOPMOST;
When the user pressed ALT+ENTER, I am not destroying the game window handle, although I destroy dx objects and surfaces, and recreate them.
How do you solve this? I've thought about turning off the window cursor and drawing my own cursor and blitting it using "adjusted" coordinates ie basically, I get the height of the title bar, and subtract it from the coordinates WM_MOUSEMOVE gives me. But surely there is a better way.