Beispiel #1
0
EventWindow::EventWindow() :
    handle(NULL),
    logger(Logger::Get("EventWindow"))
{
    HINSTANCE instanceHandle = GetModuleHandle(NULL);
    InitializeWindowClass(instanceHandle);

    this->handle = ::CreateWindowW(
        windowClassName,
        L"Kroll Event Window Instance",
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT,
        CW_USEDEFAULT,
        CW_USEDEFAULT,
        CW_USEDEFAULT,
        0,
        0,
        instanceHandle,
        0);

    if (!this->handle)
    {
        std::string error("Could not create event window: ");
        error.append(Win32Utils::QuickFormatMessage(GetLastError()));
        logger->Critical(error);
    }

    SetWindowLongPtr(handle, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
}
Beispiel #2
0
WindowClass::WindowClass()
{
    //Constructor
    InitializeWindowClass();

    //Set properties defined in the xml
    //SetWindowsProperties();
}