Hi everyone!

I wrote a small aplication which creates a window and react on events
like WM_KEYDOWN and WM_KEYUP untill an event WM_CLOSE shows. I didn't
need window to be visible so I have created window with (0,0)
coordinates and (0,0) width and height. But I still see the window in
the taskbar. I have tried to create it with SW_HIDE option but then my
application won't work. Does anyone have idea how to fix it?

Here is the code:

#include
#include "stdio.h"

const char g_szClassName[] = "myWindowClass";

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
lParam)
{

boolean processed;
LRESULT result;

result = 0;
processed = false;

switch (msg)
{
case WM_KEYDOWN:
processed = true;
printf("Key down\n");
break;


case WM_KEYUP:
processed = true;
printf("Key up\n");
break;

case WM_CLOSE:
DestroyWindow(hwnd);
PostQuitMessage(0);
break;
}

if (!processed)
result = DefWindowProc(hwnd, msg, wParam, lParam);

return result;
}

int main()
{
WNDCLASSEX wc;
HWND hwnd;
MSG Msg;
HINSTANCE hInstance = NULL;

wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = NULL;
wc.hCursor = NULL;
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = g_szClassName;
wc.hIconSm = NULL;

if(!RegisterClassEx(&wc))
{
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}

hwnd = CreateWindow
(
g_szClassName,
// TEXT("widhout text"),
NULL,
WS_POPUP,
0, 0 , 0, 0,
NULL,
NULL,
hInstance,
NULL
);
if(hwnd == NULL)
{
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}

ShowWindow(hwnd, SW_SHOWNORMAL);
UpdateWindow(hwnd);

while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}

return Msg.wParam;
}