Creating a window using CreateWindowEx without an icon

With C #, I could easily get the effect that I need:

standard window without icon in title bar

However, I am having problems with the same as using the Win32 API in C. I don’t know how to create a window with no icon (in general), but still a title, a minimize button and a close button.

I registered my class correctly, but I cannot figure out what to do for window styles / advanced window styles.

static const TCHAR lpctszTitle[] = TEXT("Stuff"), lpctszClass[] =
  TEXT("StuffClass");

HWND hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TOPMOST, lpctszClass,
  lpctszTitle, WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX,
  CW_USEDEFAULT, 0, 250, 55, NULL, NULL, hThisInstance, NULL);

The above code:

standard window WITH an icon in the title bar

which still has an icon in the title bar and is not what I wanted.

+5
source share
2 answers

, . Alt + Tab , ?

WS_EX_DLGMODALFRAME . , WinForms .

, . hIcon hIconSm WNDCLASSEX 0.

:

static const TCHAR lpctszTitle[] = TEXT("Stuff"), lpctszClass[] =
  TEXT("StuffClass");

HWND hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TOPMOST, lpctszClass,
  lpctszTitle, WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX,
  CW_USEDEFAULT, 0, 250, 55, NULL, NULL, hThisInstance, NULL);
+7

Spy ++ , , HWND. #, C.

+1

All Articles