Try to create a new window

So I' am just messing around with the window.h header and I' am trying to create a simple window. I thought I had the code down right, but there is no window actually popping up

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <windows.h>
#include <winable.h>
#include <stdio.h>

using namespace std;

int main (HINSTANCE hInstance, HWND hWnd)
{
    cout<< "Loading 'me.exe'";
    Sleep(1000);
    cout<< " .";
    Sleep(1000);
    cout<< " .";
    Sleep(1000);
    cout<< " .";
    Sleep(2000);
    
    CreateWindowEx(WS_EX_OVERLAPPEDWINDOW, "1", "tEST", WS_OVERLAPPEDWINDOW, 200, 300, 700, 500, NULL, NULL, hInstance, NULL);
    
    ShowWindow (hWnd, SW_SHOWNORMAL);
    
    cin.ignore(1000);
    cin.get();
    
    }
Wow! Not even close! You've better check out some tutorials or books. Here's mine....

http://www.jose.it-berater.org/smfforum/index.php?topic=3389.0
And check MSDN, e.g. CreateWindowEx

For the second param (the class name) it says:

A null-terminated string or a class atom created by a previous call to the RegisterClass or RegisterClassEx function  


Andy

(wonders... is this a real question???)
Last edited on
Start with this tutorial if you're really serious...

http://www.winprog.org/tutorial/
Topic archived. No new replies allowed.