void GestureEnable(HWND windowHandle) { setWindowHandle(windowHandle, false); }
void TouchEnable(HWND windowHandle) { setWindowHandle(windowHandle, true); }
bool RenderWindow::create(const Application* application, const std::string& name, bool windowed, int width, int height) { Window::create (name, windowed, width, height); { _solidBrush = (HBRUSH)(CreateSolidBrush(RGB(0,0,0))); static const WCHAR* const windowClassStr = (L"IBLBaker Render Target Class"); WNDCLASSEX windowClass = { sizeof(WNDCLASSEX), CS_OWNDC, windowProc, 0, 0, application->instance(), 0, LoadCursor(0, IDC_ARROW), _solidBrush, 0, windowClassStr, 0 }; //set the icon instance for this application that we are creating for windowClass.hIcon = LoadIcon (application->instance(), MAKEINTRESOURCE(IDI_DEFAULT)); if (RegisterClassEx (&windowClass)) { // adjust the window size so that the client area matches the arguments RECT size = { 0, 0, Window::width(), Window::height()}; const std::string& windowNameStr = windowName(); std::wstring windowNameW (windowNameStr.begin(), windowNameStr.end()); HINSTANCE instance = application->instance(); AdjustWindowRect(&size, WS_OVERLAPPEDWINDOW, FALSE); DWORD fullWidth = (size.right - size.left); DWORD fullHeight = (size.bottom - size.top); //create window WindowHandle handle = CreateWindow ((WCHAR*)windowClassStr, (WCHAR*)windowNameW.c_str(), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, fullWidth, fullHeight, 0, 0, instance, this); if (handle) { setWindowHandle (handle); ShowWindow (windowHandle(), SW_SHOWNORMAL); updateBounds(); clientResize(handle, width, height); UpdateWindow (windowHandle()); return true; } else { THROW ("Failed to create window handle"); } } } return false; }