<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Fenstergröße]]></title><description><![CDATA[<p>Abend</p>
<p>Ich möchte von meinem Fenster die Koordinaten des Punktes haben, der links ganz untern ist und von dem, de rechts ganz oben ist.</p>
<p>Aber nicht die vom Clientrekt. Kann mit jemadn bei der Ermittlung helfen?</p>
<p>ich würde hierfür die POINT strukt verwenden wollen</p>
<p>vielen Dank für schnelle Antworten</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173207/fenstergröße</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 01:10:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173207.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Feb 2007 20:47:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fenstergröße on Mon, 12 Feb 2007 20:47:11 GMT]]></title><description><![CDATA[<p>Abend</p>
<p>Ich möchte von meinem Fenster die Koordinaten des Punktes haben, der links ganz untern ist und von dem, de rechts ganz oben ist.</p>
<p>Aber nicht die vom Clientrekt. Kann mit jemadn bei der Ermittlung helfen?</p>
<p>ich würde hierfür die POINT strukt verwenden wollen</p>
<p>vielen Dank für schnelle Antworten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227742</guid><dc:creator><![CDATA[*g]]></dc:creator><pubDate>Mon, 12 Feb 2007 20:47:11 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Mon, 12 Feb 2007 21:05:18 GMT]]></title><description><![CDATA[<p>GetWindowRect() ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227758</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Mon, 12 Feb 2007 21:05:18 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Mon, 12 Feb 2007 21:14:39 GMT]]></title><description><![CDATA[<p>Okay, ich kann mein Problem verdammt schlecht erklären...</p>
<p>aber folgendes: Ich habe eine Window Klasse(in der ich die ganze WndProc aushebeln konnte!!!!:</p>
<p>Folgendes Prob tritt auf: ich kann entweder kein Fullscreenmodus erzeugen, da die Korrdinaten ncihtmmehr stimmen, obwohl ich:</p>
<pre><code class="language-cpp">win.create(L&quot;window 1&quot;, L&quot;window 1&quot;, WS_OVERLAPPEDWINDOW, false, 0, 0, 640, 480, 32);
win.show();
win.center();
win.resize(0, 0, 800, 600);
</code></pre>
<p>nur gemacht habe...</p>
<p>oder da Fenster ändert seine Größe, wenn ich die center Funktion mehrmals hintereinader aufrufe...<br />
Kann mir jemand helfen bzw einen verbesserungsvorschlage geben? ich bin echt am verzweifeln...</p>
<pre><code class="language-cpp">class Window
{
private:
	::HWND__*					handle_;
	bool						active_;
	std::basic_string&lt;wchar_t&gt;	class_name_;
	std::basic_string&lt;wchar_t&gt;	caption_;
	int							bits_per_pel_;
	bool						full_screen_mode_;
	WindowRect					window_size_;

private:
	static _w64 long static_window_proc(::HWND__* hwnd, unsigned int msg, 
									    unsigned int wParam, _w64 long lParam);

	virtual _w64 long window_proc(unsigned int msg, unsigned int wParam, _w64 long lParam);

protected:
	// massage handling functions...
	virtual void on_activate_app(::HWND__* hwnd, bool activate, unsigned long thread_id);
	virtual void on_close		(::HWND__* hwnd);
	virtual bool on_create		(::HWND__* hwnd, ::CREATESTRUCTW* create_struct);
	virtual void on_destroy		(::HWND__* hwnd);

public:
	// constructor
	Window(void);
	// destructor
	~Window(void);

	// destroy the window
	void destroy(void);

	// create
	bool create(const std::basic_string&lt;wchar_t&gt;&amp;	class_name,
				const std::basic_string&lt;wchar_t&gt;&amp;	caption,
				long								style,
				bool								fullscreen,
				int									x,
				int									y,
				int									width,
				int									height,
				int									bpp);

	// show the window
	void show(void);
	// hide the window
	void hide(void);
	// center the window
	void center(void);
	// minimize the window
	void minimize(void);
	// maximize the window
	void maximize(void);
	// 
	void restore_dimension(void);
	// is window minimized?
	bool is_minimized(void) const;
	// is maximized?
	bool is_maximized(void) const;
	//
	void resize(const int&amp; x, const int&amp; y, 
				const int&amp; width, const int&amp; height);
	// set full screen mode
	bool change_to_full_screen(void);
	// set windowed mode
	void change_to_windowed_mode(void);
	// 
	bool is_full_screen_mode(void) const;
	//
	bool is_active(void) const;

	std::basic_string&lt;wchar_t&gt; get_class_name	(void) const;
	std::basic_string&lt;wchar_t&gt; get_caption		(void) const;

	void set_caption(const std::basic_string&lt;wchar_t&gt;&amp; caption);

	void set_window_rect		(const WindowRect&amp; rect);
	void set_window_x			(const int&amp; x);
	void set_window_y			(const int&amp; y);
	void set_window_width		(const int&amp; width);
	void set_window_height		(const int&amp; height);

	WindowRect get_window_rect	(void) const;
	int get_window_x			(void) const;
	int get_window_y			(void) const;
	int get_window_height		(void) const;
	int get_window_width		(void) const;

	void set_sytle(const unsigned long&amp; style);
	unsigned long get_style(void) const;

	::HWND__* get_handle(void) const;

	// void take_snapshoot(void);
};
</code></pre>
<pre><code class="language-cpp">_w64 long Window::static_window_proc(::HWND__* hwnd, unsigned int msg, 
									 unsigned int wParam, _w64 long lParam)
{
// disable BOOL to bool cast warning
#pragma warning(disable : 4311)
#pragma warning(disable : 4312)

	Window* window;

	// don't ask me^^ but the follow stuff make your window independent from the wndProc!!!
	if(msg == WM_CREATE)
	{
		window = static_cast&lt;Window*&gt;(((::LPCREATESTRUCT) lParam)-&gt;lpCreateParams);

		::SetWindowLongPtrW(hwnd, GWL_USERDATA, reinterpret_cast&lt;long&gt;(window));
	}
	else
	{
		window = reinterpret_cast&lt;Window*&gt;(::GetWindowLongPtrW(hwnd, GWL_USERDATA));

		if(!window)
			return(::DefWindowProcW(hwnd, msg, wParam,lParam));

	}

// enable BOOL to bool cast warning
#pragma warning(default : 4311)
#pragma warning(default : 4312)

	window-&gt;handle_ = hwnd;

	return(window-&gt;window_proc(msg, wParam, lParam));
}

_w64 long Window::window_proc(unsigned int msg, unsigned int wParam, _w64 long lParam)
{
	if(msg == WM_SIZE || msg == WM_MOVE)
	{
		::RECT rect;
		::GetClientRect(handle_, &amp;rect);

		window_size_.x_ = rect.left;
		window_size_.y_ = rect.top;
		window_size_.width_ = rect.right - rect.left;
		window_size_.height_ = rect.bottom - rect.top;
	}
	/*
	// window size was changed?
	if(msg == WM_SIZE)
	{
		::RECT rect;
		::GetWindowRect(handle_, &amp;rect);
		//::RECT rect = {0, 0, LOWORD(lParam), HIWORD(lParam)};
		//::AdjustWindowRectEx(&amp;rect, get_style(), false, 0);
		cout &lt;&lt; rect.left &lt;&lt; &quot; &quot; &lt;&lt; rect.right &lt;&lt; &quot; &quot; &lt;&lt; rect.top &lt;&lt; &quot; &quot; &lt;&lt; rect.bottom &lt;&lt; &quot;\n&quot;;
		window_size_.width_  = rect.right  - rect.left;
		window_size_.height_ = rect.bottom - rect.top;

		LOG(LOG_INFO, L&quot;size w: %d h: %d&quot;, window_size_.width_, window_size_.height_);
	}
	// window was moved?
	else if(msg == WM_MOVE)
	{
		::RECT rect;
		::GetWindowRect(handle_, &amp;rect);

		// --&gt; should be correct
		window_size_.x_ = rect.left;
		window_size_.y_ = rect.top;

		LOG(LOG_INFO, L&quot;move x: %d y: %d&quot;, window_size_.x_, window_size_.y_);
	}
	*/

	// just handle the windowX messages
	switch(msg)
	{
#pragma warning(disable : 4800) 
		HANDLE_MSG(handle_, WM_ACTIVATEAPP,		on_activate_app);
		HANDLE_MSG(handle_, WM_CREATE,			on_create);
		HANDLE_MSG(handle_, WM_CLOSE,			on_close);
		HANDLE_MSG(handle_, WM_DESTROY,			on_destroy);
#pragma warning(default : 4800) 
	}

	return(::DefWindowProcW(handle_, msg, wParam, lParam));
}

void Window::on_activate_app(::HWND__* hwnd, bool activate, unsigned long thread_id)
{
	active_ = activate;
}

void Window::on_close(::HWND__* hwnd)
{
	destroy();
}

bool Window::on_create(::HWND__* hwnd, ::CREATESTRUCTW* create_struct)
{
	return(true);
}

void Window::on_destroy(::HWND__* hwnd)
{
	::PostQuitMessage(0);
}

Window::Window(void) : handle_(0)
{

}

Window::~Window(void)
{	
	if(handle_)
		destroy();
}

bool Window::create(const std::basic_string&lt;wchar_t&gt;&amp; class_name, 
					const std::basic_string&lt;wchar_t&gt;&amp; caption, 
					long style, 
					bool full_screen, 
					int x, 
					int y, 
					int width, 
					int height, 
					int bpp)
{
	DEBUG_STACK;

	class_name_				= class_name;
	caption_				= caption;
	bits_per_pel_			= bpp;

	window_size_.x_			= x;
	window_size_.y_			= y;
	window_size_.width_		= width;
	window_size_.height_	= height;

	::WNDCLASSEXW window_class;
	// zero WNDCLASSEX
	::ZeroMemory(&amp;window_class,		sizeof(::WNDCLASSEXW));

	// initialize WNDCLASSEX
	window_class.cbSize				= sizeof(WNDCLASSEX);
	window_class.style				= CS_VREDRAW | CS_HREDRAW;
	window_class.lpfnWndProc		= reinterpret_cast&lt;::WNDPROC&gt;(static_window_proc);
	window_class.cbClsExtra			= 0;
	window_class.cbWndExtra			= 0;
	window_class.hInstance			= ::GetModuleHandleW(0);
	window_class.hIcon				= ::LoadIcon	(0,		IDI_APPLICATION);
	window_class.hCursor			= ::LoadCursor	(0,	IDC_ARROW);
	window_class.hbrBackground		= static_cast&lt;::HBRUSH__*&gt;(::GetStockObject(0));
	window_class.lpszMenuName		= 0;
	window_class.lpszClassName		= class_name_.c_str();
	window_class.hIconSm			= ::LoadIcon(0, IDI_APPLICATION);

	// try to register the window class
	if(!::RegisterClassEx(&amp;window_class))
	{
		::MessageBoxW(0, L&quot;Application requires Unicode support&quot;,
			caption_.c_str(), MB_ICONERROR);

		return(LOG(LOG_ERROR, L&quot;Can't register window class!&quot;));
	}

	// create a window
	handle_ = ::CreateWindowExW(0,
								class_name_.c_str(), 
								caption_.c_str(), 
								style, 
								x, 
								y, 
								width, 
								height, 
								0, 
								0, 
								::GetModuleHandleW(0), 
								this);

	// window dosn't exist?
	if(!handle_)
		return(LOG(LOG_ERROR, L&quot;Can't create window!&quot;));

	// full screen wanted?
	if(full_screen)
		change_to_full_screen();

	LOG(LOG_INFO, L&quot;window was successful created(wcn: %s)&quot;, class_name_.c_str());
	return(true);
}

void Window::destroy(void)
{
	DEBUG_STACK;
	LOG(LOG_INFO, L&quot;destroy window(wcn: %s)&quot;, class_name_.c_str());

	// change on windowed mode
	if(full_screen_mode_)
		::ChangeDisplaySettingsW(0 ,0);

	if(handle_)
	{
		DestroyWindow(handle_);
	}

	handle_ = 0;

	::UnregisterClassW(class_name_.c_str(), ::GetModuleHandleW(0));
}

void Window::show(void)
{
	::ShowWindow(handle_, SW_NORMAL);
}

void Window::hide(void)
{
	::ShowWindow(handle_, SW_HIDE);
}

void Window::center(void)
{
	if(!full_screen_mode_ || !handle_)
		return;

	// create a window rectangle
	::RECT window_rect = {0, 0, window_size_.width_, window_size_.height_};

	// get the true window size
	::AdjustWindowRectEx(&amp;window_rect, get_style(), false, 0);

	// calculate the centered window position
	int center_x = ::GetSystemMetrics(SM_CXFULLSCREEN)/2-(abs&lt;long&gt;(window_rect.left)+window_rect.right)/2;
	int center_y = ::GetSystemMetrics(SM_CYFULLSCREEN)/2-(abs&lt;long&gt;(window_rect.top)+window_rect.bottom)/2;

	// move window
	::MoveWindow(handle_, center_x, center_y, window_rect.right - window_rect.left, 
				 window_rect.bottom - window_rect.top, true);

	LOG(LOG_INFO, L&quot;center window(w: %d h: %d)&quot;, window_size_.width_, window_size_.height_);
}

void Window::minimize(void)
{
	::ShowWindow(handle_, SW_MINIMIZE);
}

void Window::maximize(void)
{
	::ShowWindow(handle_, SW_MAXIMIZE);
}

void Window::restore_dimension(void)
{
	::ShowWindow(handle_, SW_RESTORE);
}

bool Window::is_minimized(void) const
{
	return(::IsIconic(handle_) ? 1 : 0);
}

bool Window::is_maximized(void) const
{
	return(::IsZoomed(handle_) ? 1 : 0);
}

void Window::resize(const int&amp; x, const int&amp; y, const int&amp; 
					width, const int&amp; height)
{
	::MoveWindow(handle_, x, y, width, height, true);
}

bool Window::change_to_full_screen(void)
{
	::DEVMODEW screenSetting;
	::ZeroMemory(&amp;screenSetting, sizeof(screenSetting));

	// set screen settings
	screenSetting.dmSize		= sizeof(::DEVMODEW);
	screenSetting.dmPelsWidth	= window_size_.width_;
	screenSetting.dmPelsHeight	= window_size_.height_;
	screenSetting.dmBitsPerPel	= bits_per_pel_;
	screenSetting.dmFields		= DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;

	// try to change into the full screen mode
	if(::ChangeDisplaySettingsW(&amp;screenSetting, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL)
	{
		full_screen_mode_ = true; 

		LOG(LOG_INFO, L&quot;Successful changed into the full screen mode&quot;);

		return(true);
	}

	return(LOG(LOG_ERROR, L&quot;Your video card dosn't support the full screen mode(w: %d h: %d bpp: %d)&quot;, 
						  window_size_.width_, window_size_.height_, bits_per_pel_));
}

void Window::change_to_windowed_mode(void)
{
	::ChangeDisplaySettingsW(0, 0);

	full_screen_mode_ = false;
}

bool Window::is_full_screen_mode(void) const
{
	 return(full_screen_mode_);
}

bool Window::is_active(void) const
{
	return(active_);
}

std::basic_string&lt;wchar_t&gt; Window::get_class_name(void) const
{
	return(class_name_);
}

std::basic_string&lt;wchar_t&gt; Window::get_caption(void) const
{
	return(caption_);
}

void Window::set_caption(const std::basic_string&lt;wchar_t&gt;&amp; caption)
{
	caption_ = caption;
}

void Window::set_window_rect(const WindowRect&amp; rect)
{
	resize(rect.x_, rect.y_, rect.width_, rect.width_);
}

void Window::set_window_x(const int&amp; x)
{
	resize(x, window_size_.y_, window_size_.width_, window_size_.height_);
}

void Window::set_window_y(const int&amp; y)
{
	resize(window_size_.x_, y, window_size_.width_, window_size_.height_);
}

void Window::set_window_width(const int&amp; width)
{
	resize(window_size_.x_, window_size_.y_, width, window_size_.height_);
}

void Window::set_window_height(const int&amp; height)
{
	resize(window_size_.x_, window_size_.y_, window_size_.width_, height);
}

WindowRect Window::get_window_rect(void) const
{
	return(window_size_);
}

int Window::get_window_x(void) const
{
	return(window_size_.x_);
}

int Window::get_window_y(void) const
{
	return(window_size_.y_);
}

int Window::get_window_width(void) const
{
	return(window_size_.width_);
}

int Window::get_window_height(void) const
{
	return(window_size_.height_);
}

void Window::set_sytle(const unsigned long&amp; style)
{
	::SetWindowLongW(handle_, GWL_STYLE, style);
}

unsigned long Window::get_style(void) const
{
	return(::GetWindowLongW(handle_, GWL_STYLE));
}

::HWND__* Window::get_handle(void) const
{
	return(handle_);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1227768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227768</guid><dc:creator><![CDATA[*g]]></dc:creator><pubDate>Mon, 12 Feb 2007 21:14:39 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Mon, 12 Feb 2007 21:17:18 GMT]]></title><description><![CDATA[<p>Aussschlaggebend ist folgendes:</p>
<pre><code class="language-cpp">_w64 long Window::window_proc(unsigned int msg, unsigned int wParam, _w64 long lParam)
{
    if(msg == WM_SIZE || msg == WM_MOVE)
    {
        ::RECT rect;
        ::GetClientRect(handle_, &amp;rect);

        window_size_.x_ = rect.left;
        window_size_.y_ = rect.top;
        window_size_.width_ = rect.right - rect.left;
        window_size_.height_ = rect.bottom - rect.top;
    }
    /*
    // window size was changed?
    if(msg == WM_SIZE)
    {
        ::RECT rect;
        ::GetWindowRect(handle_, &amp;rect);
        //::RECT rect = {0, 0, LOWORD(lParam), HIWORD(lParam)};
        //::AdjustWindowRectEx(&amp;rect, get_style(), false, 0);
        cout &lt;&lt; rect.left &lt;&lt; &quot; &quot; &lt;&lt; rect.right &lt;&lt; &quot; &quot; &lt;&lt; rect.top &lt;&lt; &quot; &quot; &lt;&lt; rect.bottom &lt;&lt; &quot;\n&quot;;
        window_size_.width_  = rect.right  - rect.left;
        window_size_.height_ = rect.bottom - rect.top;

        LOG(LOG_INFO, L&quot;size w: %d h: %d&quot;, window_size_.width_, window_size_.height_);
    }
    // window was moved?
    else if(msg == WM_MOVE)
    {
        ::RECT rect;
        ::GetWindowRect(handle_, &amp;rect);

        // --&gt; should be correct
        window_size_.x_ = rect.left;
        window_size_.y_ = rect.top;

        LOG(LOG_INFO, L&quot;move x: %d y: %d&quot;, window_size_.x_, window_size_.y_);
    }
    */

    // just handle the windowX messages
    switch(msg)
    {
#pragma warning(disable : 4800)
        HANDLE_MSG(handle_, WM_ACTIVATEAPP,        on_activate_app);
        HANDLE_MSG(handle_, WM_CREATE,            on_create);
        HANDLE_MSG(handle_, WM_CLOSE,            on_close);
        HANDLE_MSG(handle_, WM_DESTROY,            on_destroy);
#pragma warning(default : 4800)
    }

    return(::DefWindowProcW(handle_, msg, wParam, lParam));
}
</code></pre>
<p>und:</p>
<pre><code class="language-cpp">void Window::center(void)
{
    if(!full_screen_mode_ || !handle_)
        return;

    // create a window rectangle
    ::RECT window_rect = {0, 0, window_size_.width_, window_size_.height_};

    // get the true window size
    ::AdjustWindowRectEx(&amp;window_rect, get_style(), false, 0);

    // calculate the centered window position
    int center_x = ::GetSystemMetrics(SM_CXFULLSCREEN)/2-(abs&lt;long&gt;(window_rect.left)+window_rect.right)/2;
    int center_y = ::GetSystemMetrics(SM_CYFULLSCREEN)/2-(abs&lt;long&gt;(window_rect.top)+window_rect.bottom)/2;

    // move window
    ::MoveWindow(handle_, center_x, center_y, window_rect.right - window_rect.left,
                 window_rect.bottom - window_rect.top, true);

    LOG(LOG_INFO, L&quot;center window(w: %d h: %d)&quot;, window_size_.width_, window_size_.height_);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1227771</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227771</guid><dc:creator><![CDATA[*g]]></dc:creator><pubDate>Mon, 12 Feb 2007 21:17:18 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Mon, 12 Feb 2007 22:22:11 GMT]]></title><description><![CDATA[<p>AdjustWindowRectEx() würde ich bei der Center()-Funktion gar nicht aufrufen. Die Funktion soll doch nur das Fenster zentrieren, wenn es bereits ne Größe hat oder nich?</p>
<pre><code class="language-cpp">void Window::center(void)
{
    if(!full_screen_mode_ || !handle_)
        return;

    // create a window rectangle
    ::RECT window_rect;

    // get current window size
    ::GetWindowRect(hWnd,&amp;window_rect);

    // calculate the centered window position
    int center_x = ::GetSystemMetrics(SM_CXFULLSCREEN)/2-(window_rect.right-window_rect.left)/2;
    int center_y = ::GetSystemMetrics(SM_CYFULLSCREEN)/2-(window_rect.bottom-window_rect.top)/2;

    // move window
    ::MoveWindow(handle_, center_x, center_y, window_rect.right - window_rect.left,
                 window_rect.bottom - window_rect.top, true);

    LOG(LOG_INFO, L&quot;center window(w: %d h: %d)&quot;, window_size_.width_, window_size_.height_);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1227810</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227810</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Mon, 12 Feb 2007 22:22:11 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Mon, 12 Feb 2007 22:31:57 GMT]]></title><description><![CDATA[<p>Das wirds wohl gewesen sein. THX --&gt; und ich musste den Einkommentierten Code nutzen, damit es funzte!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227814</guid><dc:creator><![CDATA[*g]]></dc:creator><pubDate>Mon, 12 Feb 2007 22:31:57 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Sun, 18 Feb 2007 14:04:20 GMT]]></title><description><![CDATA[<p>Leider gibt es mit meienr Klasse ein neues Problem:</p>
<p>Das hier funktioniert prima:</p>
<pre><code class="language-cpp">win.create(L&quot;window 1&quot;, L&quot;window 1&quot;, WS_OVERLAPPEDWINDOW, false, 0, 0, 640, 480, 32);
win.show();
win.center();
win.resize(0, 0, 800, 600);
</code></pre>
<p>--&gt; kracht und sagt mir, dass es in der create Funktion zu einem illegalen Memory Acces gekommen ist und verweist auf die xstring.h...</p>
<pre><code class="language-cpp">Window* win = 0;
win-&gt;create(L&quot;wixstr&quot;, L&quot;wixstr&quot;, WS_OVERLAPPEDWINDOW, false, 0, 0, 640, 480, 32);
if(win)
   delete win;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230608</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230608</guid><dc:creator><![CDATA[*g]]></dc:creator><pubDate>Sun, 18 Feb 2007 14:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to Fenstergröße on Sun, 18 Feb 2007 14:31:11 GMT]]></title><description><![CDATA[<p>*g schrieb:</p>
<blockquote>
<p>--&gt; kracht und sagt mir, dass es in der create Funktion zu einem illegalen Memory Acces gekommen ist und verweist auf die xstring.h...</p>
<pre><code class="language-cpp">Window* win = 0;
win-&gt;create(L&quot;wixstr&quot;, L&quot;wixstr&quot;, WS_OVERLAPPEDWINDOW, false, 0, 0, 640, 480, 32);
if(win)
   delete win;
</code></pre>
</blockquote>
<p>Wie soll das fnktionieren, wenn Dein Fenster Objekt nicht allokiert wurde. Hier fehlt zumindest ein win = new Window();</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230626</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sun, 18 Feb 2007 14:31:11 GMT</pubDate></item></channel></rss>