<?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[Run-Time Error - Variable nicht initialisiert????]]></title><description><![CDATA[<p>Mein Programm sollte beim drücken eines Buttons den Text eines Edit-fields ändern, aber dann:</p>
<pre><code>Run-Time Check Failure #3 - The variable 'textfield_zoom' is being used without being initialized.
</code></pre>
<p>Hier der Quellcode:</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc (HWND fenster, UINT message, WPARAM wParam, LPARAM lParam) 
{ 
HDC hdc; 
PAINTSTRUCT ps;
HWND button_start;
HWND button_end;
HWND button_zoom;
HWND button_unzoom;
HWND button_delete;
HWND textfield_zoom;
HWND textfield_unzoom;
HWND textfield_delete;
int int_zoom;
int int_unzoom;
int int_delete;

switch (message) 
{ 

	case WM_CREATE:
		button_start		= CreateWindow (
											  &quot;button&quot;, &quot;START&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 20, 50, 30, 
											  fenster, (HMENU)1,
											  hInst, NULL
										   ); 
		button_end			= CreateWindow (
											  &quot;button&quot;, &quot;END&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  90, 20, 50, 30,
											  fenster, (HMENU)2,
											  hInst, NULL
										   ); 
		button_zoom			= CreateWindow (
											  &quot;button&quot;, &quot;ZOOM&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 70, 70, 30, 
											  fenster, (HMENU)3,
											  hInst, NULL
										   ); 
		textfield_zoom		= CreateWindow (
											  &quot;edit&quot;, &quot;SHIFT&quot;, 
											  WS_CHILD | WS_VISIBLE | ES_READONLY, 
											  110, 70, 150, 30, 
											  fenster, NULL,
											  hInst, NULL
										   ); 
		button_unzoom		= CreateWindow (
											  &quot;button&quot;, &quot;UNZOOM&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 120, 70, 30,
											  fenster, (HMENU)4,
											  hInst, NULL
										   ); 
		textfield_unzoom	= CreateWindow (
											  &quot;edit&quot;, &quot;ALT&quot;, 
											  WS_CHILD | WS_VISIBLE | ES_READONLY, 
											  110, 120, 150, 30, 
											  fenster, NULL,
											  hInst, NULL
										   ); 
		button_delete		= CreateWindow (
											  &quot;button&quot;, &quot;DELETE&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 170, 70, 30,
											  fenster, (HMENU)5,
											  hInst, NULL
										   ); 
		textfield_delete	= CreateWindow (
											  &quot;edit&quot;, &quot;BACKSPACE&quot;, 
											  WS_CHILD | WS_VISIBLE | ES_READONLY, 
											  110, 170, 150, 30, 
											  fenster, NULL,
											  hInst, NULL
										   ); 
		return 0 ;

	case WM_COMMAND: 
		if(LOWORD(wParam) == 1) 
		{ 
			int c_x,c_y,hs;
			bool i=true;
			long x,y;
			HWND h;
			HDC dc;

			h = FindWindow(NULL,&quot;ioUrbanTerror&quot;); 
			dc = GetDC(h); 
			c_x =800/2;
			c_y=600/2;
			hs=26/2; 
			while(i==true) { 
				if(GetAsyncKeyState(0x08)) { 
					i=false;
				} 
				if(GetAsyncKeyState(VK_SHIFT)) { 
					hs=600/2;
				} 
				if(GetAsyncKeyState(0x01)) { 
					hs=26/2;
				} 
				if(GetAsyncKeyState(VK_MENU)) {
					hs=26/2;
				}
				for(x=c_x-hs;x&lt;c_x+hs;x++) { 
					SetPixel(dc,x,c_y,RGB(255,0,0)); 
				} 
				for(y=c_y-hs;y&lt;c_y+hs;y++) { 
					SetPixel(dc,c_x,y,RGB(255,0,0)); 
				} 
				Sleep(5); 
			} 
			ReleaseDC(h, dc); 
		} 
		if(LOWORD(wParam) == 2) 
		{ 
			PostQuitMessage(0);
		} 
		if(LOWORD(wParam) == 3) 
		{ 
			SetWindowText(textfield_zoom,&quot;Taste drücken...&quot;);
		} 
		if(LOWORD(wParam) == 4) 
		{ 
			SetWindowText(textfield_unzoom,&quot;Taste drücken...&quot;);
		} 
		if(LOWORD(wParam) == 5) 
		{ 
			SetWindowText(textfield_delete,&quot;Taste drücken...&quot;);
		} 
		return 0;

	case WM_DESTROY: 
		PostQuitMessage(0);  
		return 0; 
} 

return DefWindowProc (fenster, message, wParam, lParam); 
}
</code></pre>
<p>Ich weiss nicht ob ich blind bin, aber ich seh den Fehler einfach nicht, hoffe einer von euch Pros findet ein bisschen zeit für mich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/210237/run-time-error-variable-nicht-initialisiert</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 02:52:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/210237.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Apr 2008 20:03:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Run-Time Error - Variable nicht initialisiert???? on Tue, 08 Apr 2008 20:03:44 GMT]]></title><description><![CDATA[<p>Mein Programm sollte beim drücken eines Buttons den Text eines Edit-fields ändern, aber dann:</p>
<pre><code>Run-Time Check Failure #3 - The variable 'textfield_zoom' is being used without being initialized.
</code></pre>
<p>Hier der Quellcode:</p>
<pre><code class="language-cpp">LRESULT CALLBACK WndProc (HWND fenster, UINT message, WPARAM wParam, LPARAM lParam) 
{ 
HDC hdc; 
PAINTSTRUCT ps;
HWND button_start;
HWND button_end;
HWND button_zoom;
HWND button_unzoom;
HWND button_delete;
HWND textfield_zoom;
HWND textfield_unzoom;
HWND textfield_delete;
int int_zoom;
int int_unzoom;
int int_delete;

switch (message) 
{ 

	case WM_CREATE:
		button_start		= CreateWindow (
											  &quot;button&quot;, &quot;START&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 20, 50, 30, 
											  fenster, (HMENU)1,
											  hInst, NULL
										   ); 
		button_end			= CreateWindow (
											  &quot;button&quot;, &quot;END&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  90, 20, 50, 30,
											  fenster, (HMENU)2,
											  hInst, NULL
										   ); 
		button_zoom			= CreateWindow (
											  &quot;button&quot;, &quot;ZOOM&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 70, 70, 30, 
											  fenster, (HMENU)3,
											  hInst, NULL
										   ); 
		textfield_zoom		= CreateWindow (
											  &quot;edit&quot;, &quot;SHIFT&quot;, 
											  WS_CHILD | WS_VISIBLE | ES_READONLY, 
											  110, 70, 150, 30, 
											  fenster, NULL,
											  hInst, NULL
										   ); 
		button_unzoom		= CreateWindow (
											  &quot;button&quot;, &quot;UNZOOM&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 120, 70, 30,
											  fenster, (HMENU)4,
											  hInst, NULL
										   ); 
		textfield_unzoom	= CreateWindow (
											  &quot;edit&quot;, &quot;ALT&quot;, 
											  WS_CHILD | WS_VISIBLE | ES_READONLY, 
											  110, 120, 150, 30, 
											  fenster, NULL,
											  hInst, NULL
										   ); 
		button_delete		= CreateWindow (
											  &quot;button&quot;, &quot;DELETE&quot;, 
											  WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
											  20, 170, 70, 30,
											  fenster, (HMENU)5,
											  hInst, NULL
										   ); 
		textfield_delete	= CreateWindow (
											  &quot;edit&quot;, &quot;BACKSPACE&quot;, 
											  WS_CHILD | WS_VISIBLE | ES_READONLY, 
											  110, 170, 150, 30, 
											  fenster, NULL,
											  hInst, NULL
										   ); 
		return 0 ;

	case WM_COMMAND: 
		if(LOWORD(wParam) == 1) 
		{ 
			int c_x,c_y,hs;
			bool i=true;
			long x,y;
			HWND h;
			HDC dc;

			h = FindWindow(NULL,&quot;ioUrbanTerror&quot;); 
			dc = GetDC(h); 
			c_x =800/2;
			c_y=600/2;
			hs=26/2; 
			while(i==true) { 
				if(GetAsyncKeyState(0x08)) { 
					i=false;
				} 
				if(GetAsyncKeyState(VK_SHIFT)) { 
					hs=600/2;
				} 
				if(GetAsyncKeyState(0x01)) { 
					hs=26/2;
				} 
				if(GetAsyncKeyState(VK_MENU)) {
					hs=26/2;
				}
				for(x=c_x-hs;x&lt;c_x+hs;x++) { 
					SetPixel(dc,x,c_y,RGB(255,0,0)); 
				} 
				for(y=c_y-hs;y&lt;c_y+hs;y++) { 
					SetPixel(dc,c_x,y,RGB(255,0,0)); 
				} 
				Sleep(5); 
			} 
			ReleaseDC(h, dc); 
		} 
		if(LOWORD(wParam) == 2) 
		{ 
			PostQuitMessage(0);
		} 
		if(LOWORD(wParam) == 3) 
		{ 
			SetWindowText(textfield_zoom,&quot;Taste drücken...&quot;);
		} 
		if(LOWORD(wParam) == 4) 
		{ 
			SetWindowText(textfield_unzoom,&quot;Taste drücken...&quot;);
		} 
		if(LOWORD(wParam) == 5) 
		{ 
			SetWindowText(textfield_delete,&quot;Taste drücken...&quot;);
		} 
		return 0;

	case WM_DESTROY: 
		PostQuitMessage(0);  
		return 0; 
} 

return DefWindowProc (fenster, message, wParam, lParam); 
}
</code></pre>
<p>Ich weiss nicht ob ich blind bin, aber ich seh den Fehler einfach nicht, hoffe einer von euch Pros findet ein bisschen zeit für mich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1488737</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1488737</guid><dc:creator><![CDATA[Argus Magnus]]></dc:creator><pubDate>Tue, 08 Apr 2008 20:03:44 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Error - Variable nicht initialisiert???? on Tue, 08 Apr 2008 20:16:26 GMT]]></title><description><![CDATA[<p>Du solltest den Lebensbereich einer Variablen beachten, bei jedem Funktionsaufruf sind die lokalen Variablen wieder unbelegt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1488741</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1488741</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Tue, 08 Apr 2008 20:16:26 GMT</pubDate></item><item><title><![CDATA[Reply to Run-Time Error - Variable nicht initialisiert???? on Tue, 08 Apr 2008 20:42:52 GMT]]></title><description><![CDATA[<p>ich danke dir <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1488751</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1488751</guid><dc:creator><![CDATA[Argus Magnus]]></dc:creator><pubDate>Tue, 08 Apr 2008 20:42:52 GMT</pubDate></item></channel></rss>