It is an old discussion on MASM32 forum. Timo and Vortex should remember.
I tried the following simple solution on Windows 11.
My application is a dialogBox based
hStatus = CreateStatusWindow(WS_CHILD|WS_VISIBLE,"Welcome",__hWnd,IDC_STATUSBAR_01) ;
SetWindowTheme(hStatus,NULL,L" ") ;
SendMessage(hStatus,SB_SETPARTS,(WPARAM) 2,(LPARAM) StatWidths) ;
SendMessage(hStatus,(UINT) SB_SETBKCOLOR,0,(LPARAM) 255) ;
SendMessage(hStatus,(UINT) SB_SETTEXT,(WPARAM)(INT) 0,(LPARAM) (LPSTR) "Welcome") ;
ShowWindow(hStatus,SW_SHOW) ;