Shell32 Icons verwenden
Verfasst: 19.01.2009 01:55
Code: Alles auswählen
EnableExplicit
#MB_USERICON = $80
Define msg.MSGBOXPARAMS
With msg
\cbSize = SizeOf(MSGBOXPARAMS)
\hwndOwner = GetForegroundWindow_(); besser hWnd des eigenen Fenster
\hInstance = LoadLibrary_("shell32.dll")
\lpszText = @"is bad?"
\lpszCaption = @"IE"
\dwStyle = #MB_USERICON | #PB_MessageRequester_YesNo
\lpszIcon = 512; index des Icons
EndWith
Select MessageBoxIndirect_(@msg)
Case #PB_MessageRequester_Yes
Debug "find ich auch"
Case #PB_MessageRequester_No
Debug "sicher?"
EndSelectCode: Alles auswählen
EnableExplicit
#MB_USERICON = $80
Define msg.MSGBOXPARAMS
With msg
\cbSize = SizeOf(MSGBOXPARAMS)
\hwndOwner = 0
\hInstance = LoadLibrary_(#PB_Compiler_Home + "purebasic.exe")
\lpszText = @"Feel the ...Pure... Power"
\lpszCaption = @"PureBasic"
\dwStyle = #MB_USERICON
\lpszIcon = 1
EndWith
MessageBoxIndirect_(@msg)