Hello! I am trying to setup a full screen borderless window that will allow me to see Windows 8 music/search charms. Similar to this:
How would I allow the search and music controls to show up over the game? Also, how I would I go about enabling the Windows Key and FN Shortcuts in DirectInput? Here is my window code:
WNDCLASSEX wc;
DEVMODE dmScreenSettings;
int posX, posY;
ApplicationHandle = this;
hInstance = GetModuleHandle(NULL);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, ApplicationIcon);
wc.hIconSm = wc.hIcon;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = Title;
wc.cbSize = sizeof(WNDCLASSEX);
RegisterClassEx(&wc);
width = GetSystemMetrics(SM_CXSCREEN);
height = GetSystemMetrics(SM_CYSCREEN);
if (FullScreen)
{
posX = posY = 0;
if (!Borderless)
{
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = (unsigned long) width;
dmScreenSettings.dmPelsHeight = (unsigned long) height;
dmScreenSettings.dmBitsPerPel = 32;
dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);
}
}
else
{
width = DefaultWindowedWidth;
height = DefaultWindowedHeight;
posX = (GetSystemMetrics(SM_CXSCREEN) - width) / 2;
posY = 3;
/*posY = (GetSystemMetrics(SM_CYSCREEN) - screenHeight) / 2;*/
}
if (Borderless)
Window = CreateWindowEx(WS_EX_APPWINDOW, Title, Title, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_POPUP, posX, posY, width, height, NULL, NULL, hInstance, NULL);
else
Window = CreateWindowEx(WS_EX_APPWINDOW, Title, Title, WS_CLIPSIBLINGS | WS_CLIPCHILDREN, posX, posY, width, height, NULL, NULL, hInstance, NULL);
if (Window == NULL)
return false;
ShowWindow(Window, SW_SHOW);
SetForegroundWindow(Window);
SetFocus(Window);
ShowCursor(IsCursorVisible);
Thanks!