Exemplo n.º 1
0
void t_windows_game::create_window()
{
    register_window_class( g_application_instance, m_class_name.c_str(), m_icon_id );

    g_main_window_handle = CreateWindow( m_class_name.c_str(),
                                         get_main_window_caption().c_str(),
                                         WS_POPUP | WS_VISIBLE,
                                         0, 0, g_window_width, g_window_height, NULL, NULL,
                                         g_application_instance, NULL);
}
Exemplo n.º 2
0
debugview_info::debugview_info(debugger_windows_interface &debugger, debugwin_info &owner, HWND parent, debug_view_type type) :
	debugbase_info(debugger),
	m_owner(owner),
	m_view(nullptr),
	m_wnd(nullptr),
	m_hscroll(nullptr),
	m_vscroll(nullptr)
{
	register_window_class();

	// create the child view
	m_wnd = CreateWindowEx(DEBUG_VIEW_STYLE_EX, TEXT("MAMEDebugView"), nullptr, DEBUG_VIEW_STYLE,
			0, 0, 100, 100, parent, nullptr, GetModuleHandleUni(), this);
	if (m_wnd == nullptr)
		goto cleanup;

	// create the scroll bars
	m_hscroll = CreateWindowEx(HSCROLL_STYLE_EX, TEXT("SCROLLBAR"), nullptr, HSCROLL_STYLE,
			0, 0, 100, CW_USEDEFAULT, m_wnd, nullptr, GetModuleHandleUni(), this);
	m_vscroll = CreateWindowEx(VSCROLL_STYLE_EX, TEXT("SCROLLBAR"), nullptr, VSCROLL_STYLE,
			0, 0, CW_USEDEFAULT, 100, m_wnd, nullptr, GetModuleHandleUni(), this);
	if ((m_hscroll == nullptr) || (m_vscroll == nullptr))
		goto cleanup;

	// create the debug view
	m_view = machine().debug_view().alloc_view(type, &debugview_info::static_update, this);
	if (m_view == nullptr)
		goto cleanup;

	return;

cleanup:
	if (m_hscroll != nullptr)
		DestroyWindow(m_hscroll);
	m_hscroll = nullptr;
	if (m_vscroll != nullptr)
		DestroyWindow(m_vscroll);
	m_vscroll = nullptr;
	if (m_wnd != nullptr)
		DestroyWindow(m_wnd);
	m_wnd = nullptr;
	if (m_view != nullptr)
		machine().debug_view().free_view(*m_view);
	m_view = nullptr;
}
Exemplo n.º 3
0
bool dhUserPrefs::create_window(void){
DWORD screen_width;
DWORD screen_height;
CString window_name;

   if(!register_window_class()){

      return false;

   }

   if(m_app_name != NULL)
	{
		window_name.Format("%s : User Preferences",m_app_name);
   }
	else
	{
      window_name = "User Preferences";
   }

   screen_width=GetSystemMetrics(SM_CXSCREEN);
   screen_height=GetSystemMetrics(SM_CYSCREEN);

   m_window = CreateWindowEx(WS_EX_APPWINDOW|WS_EX_DLGMODALFRAME,
                             user_pref_wnd_class_name,
                             window_name,
                             WS_CAPTION|WS_VISIBLE,
                             (screen_width - window_width)/2,
                             (screen_height - window_height)/2,
                             window_width,
                             window_height,
                             NULL,                           //WindowParent
                             NULL,                           //Menu
                             GetModuleHandle(NULL),          //Instance
                             NULL);                          //lpParam


   add_widgets();

   return true;

}
Exemplo n.º 4
0
debugwin_info::debugwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler) :
	debugbase_info(debugger),
	m_is_main_console(is_main_console),
	m_next(NULL),
	m_wnd(NULL),
	m_handler(handler),
	m_minwidth(200),
	m_maxwidth(0),
	m_minheight(200),
	m_maxheight(0),
	m_ignore_char_lparam(0)
{
	register_window_class();

	m_wnd = win_create_window_ex_utf8(DEBUG_WINDOW_STYLE_EX, "MAMEDebugWindow", title, DEBUG_WINDOW_STYLE,
			0, 0, 100, 100, win_window_list->m_hwnd, create_standard_menubar(), GetModuleHandleUni(), this);
	if (m_wnd == NULL)
		return;

	RECT work_bounds;
	SystemParametersInfo(SPI_GETWORKAREA, 0, &work_bounds, 0);
	m_maxwidth = work_bounds.right - work_bounds.left;
	m_maxheight = work_bounds.bottom - work_bounds.top;
}
Exemplo n.º 5
0
void core_win32::init()
{
    register_window_class();
    create_window();
}