cannot see window

Started by
2 comments, last by paymonh 21 years, 8 months ago
hi this is what i have : i am using :http://www.gamedev.net/reference/articles/article1607.asp #define WIN32_LEAN_AND_MEAN #include "stdafx.h" #include "CInput8.h" #include <iostream.h> #include <fstream.h> #include <windows.h> #include <dinput.h> ofstream fout("general.txt", ios::out);// | ios::app); // renders the program void Render(void) { Read_Keyboard(); Read_Mouse(); // stuff if (KeyDown(DIK_SPACE)) { } if (KeyUp(DIK_SPACE)) { } if (KeyPress(DIK_RETURN)) { } // stuff float mx, my; Get_Movement(mx, my); //cursor_x += mx; //cursor_y += my; if (Button_Down(LEFT_BUTTON)) { } } // de-initiates the program void Destroy(void) { Release_Mouse(); Release_Keyboard(); Shutdown_CInput8(); } int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hWnd = CreateWindowEx( 0, "window1", "window1", WS_VISIBLE|WS_POPUP|WS_CAPTION|WS_SYSMENU, 200, 200, 400, 200, NULL, NULL, hInstance, NULL ); Init_CInput8(hInstance); // takes handle to the window as parameter Init_Keyboard(hWnd); // takes instance handle as parameter Init_Mouse(hWnd); // takes instance handle as parameter Render(); Destroy(); return 0; } /////////////// how come i do not see the window that i created? how do i look at the results? ie. mouse_righ, mouse_left .. thanks
Advertisement
My win32 init code has UpdateWindow(hWnd); right after CreateWindowEx(....). I don''t know what this function does, look it up in MSDN.

Proceeding on a brutal rampage is the obvious choice.
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)
HWND hWnd = CreateWindowEx(
0, "window1", "window1",
WS_VISIBLE|WS_POPUP|WS_CAPTION|WS_SYSMENU,
CW_USEDEFAULT, SW_SHOW, 0, 0, NULL, NULL, hInstance, NULL );
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);

this does not work either
You need to define a window class using the WNDCLASSEX structure and then reigster the class using RegisterClassEx. Then use this window class to create the window.

This topic is closed to new replies.

Advertisement