Angus Comber
2004-05-16 19:51:58 UTC
Hello
I want to create a simple window which will be a small rectangle with some
text. I don't want a minimize box, maximise, resize, or a title bar.
I have tried something like this:
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = NULL; // LoadIcon(hInstance, (LPCTSTR)IDI_WINMAINTEST);
wcex.hCursor = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_IOHAND));
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = NULL; // LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
RegisterClassEx(&wcex);
hWnd = CreateWindow(szWindowClass, NULL, WS_DLGFRAME | WS_BORDER ,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
But I still get the Title bar.
How can I do this? Do I perhaps need to create a dialog window rather than
a normal window?
Angus Comber
***@NOSPAMiteloffice.com
I want to create a simple window which will be a small rectangle with some
text. I don't want a minimize box, maximise, resize, or a title bar.
I have tried something like this:
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = NULL; // LoadIcon(hInstance, (LPCTSTR)IDI_WINMAINTEST);
wcex.hCursor = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_IOHAND));
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = NULL; // LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL);
RegisterClassEx(&wcex);
hWnd = CreateWindow(szWindowClass, NULL, WS_DLGFRAME | WS_BORDER ,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
But I still get the Title bar.
How can I do this? Do I perhaps need to create a dialog window rather than
a normal window?
Angus Comber
***@NOSPAMiteloffice.com