Diese Version funktioniert auch, wenn in den Compileroptionen ein Icon eingetragen ist.
Code: Alles auswählen
EnableExplicit
Define nWnd
Define hWnd
Define hMenu
Define ExStyle
nWnd = OpenWindow (#PB_Any, 0, 0, 300, 150, "Dialogfenster", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
hWnd = WindowID (nWnd)
;Icon aus Fenster entfernen
SetClassLongPtr_(hWnd, #GCL_HICON, 0)
HideWindow (nWnd, #True)
ExStyle = GetWindowLongPtr_(hWnd, #GWL_EXSTYLE)
SetWindowLongPtr_(hWnd, #GWL_EXSTYLE, ExStyle | #WS_EX_DLGMODALFRAME)
HideWindow (nWnd, #False)
;Systemmenü schrumpfen (stolen by Fluid Byte)
hMenu = GetSystemMenu_(hWnd,0)
RemoveMenu_(hMenu,#SC_RESTORE,0)
RemoveMenu_(hMenu,#SC_SIZE,0)
RemoveMenu_(hMenu,#SC_MINIMIZE,0)
RemoveMenu_(hMenu,#SC_MAXIMIZE,0)
RemoveMenu_(hMenu,0,0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Win7 x64
Pb 5.11 x64