Ejemplo n.º 1
0
HWND MainWindow::createMainWindow()
{
	auto windowClass = loadString(m_instance, IDC_LAUNCHGRID);

	DWORD exStyle = 0;
	if (settings::settings()[L"general"][L"bottomWindow"].asNumber())
	{
		LOG(L"creating on-desktop window");
		m_parent = createTransparentWindow(m_instance, SW_SHOWNOACTIVATE, windowClass.c_str());
	}
	else
	{
		LOG(L"creating topmost window");
		exStyle = WS_EX_WINDOWEDGE | WS_EX_TOPMOST;
		m_parent = nullptr;
	}
	LOG(L"window position: %i, %i", int(settings::cache()[L"left"].asNumber(10)), int(settings::cache()[L"top"].asNumber(10)));
	auto wnd = CreateWindowEx(exStyle, windowClass.c_str(), loadString(m_instance, IDS_APP_TITLE).c_str(), WS_POPUP,
		int(settings::cache()[L"left"].asNumber(10)), int(settings::cache()[L"top"].asNumber(10)), 240, 120, m_parent, nullptr, m_instance, nullptr);
	LOG(L"window created: %x", unsigned(wnd));
	SetWindowLong(wnd, GWL_USERDATA, reinterpret_cast<LONG>(this));
	return wnd;
}
Ejemplo n.º 2
0
PluginCarbonWindow::PluginCarbonWindow(PluginView* pluginView)
    : m_windowRef(createTransparentWindow())
    , m_ownerPluginView(pluginView)
{
    ASSERT(m_windowRef);
}