I'm developing a C++ application for Windows. I'm using the Win32 API. How can I open a window without a title bar (without controls, icon and title) and that can not be resized.
The piece of code that I am using for the application to create a window:
hWnd = CreateWindow(szWindowClass, 0, (WS_BORDER), 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, NULL, NULL, hInstance, NULL);
To do this in C#, you just define this code:
FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; ControlBox = false;
The window title for a page (often called the "title tag") is, most simply, the text that appears at the top of a visitor's web browser when viewing that page.
hWnd = CreateWindow(szWindowClass, 0, (WS_BORDER ), 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, NULL, NULL, hInstance, NULL); SetWindowLong(hWnd, GWL_STYLE, 0); //remove all window styles, check MSDN for details ShowWindow(hWnd, SW_SHOW); //display window
HWND hWnd ; hWnd = CreateWindow(szWindowClass, 0, (WS_BORDER ), 0, 0, 100, 100, NULL, NULL, Instance, NULL); SetWindowLong(hwnd, GWL_STYLE, WS_BORDER ); // With 1 point border //OR SetWindowLong(hwnd, GWL_STYLE, 0 ); // Without 1 point border = white rectangle SetWindowPos(hwnd, 0, 150, 100, 250, 250, SWP_FRAMECHANGED); if (!hWnd) return FALSE ; else ShowWindow(hwnd, SW_SHOW);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With