ich möchte ein SetGadgetText ohne Rahmen erstellen. Das klappt soweit auch ganz gut.
Wenn ich aber ein HyperLinkGadget hinzufüge und einen Button drücke, verzerrt sich die Schrift vom Hyperlink.
Getestet mit XP-Skin Unterstützung einschalten in den Compiler-Optionen, dann passt der Hyperlink aber die Rahmen sind da.
XP-Skin Unterstützung ausgeschaltet, wird der Hyperlink verzerrt aber die Rahmen sind weg.
Könnt ihr mir einen kleinen Tipp geben, wie man dieses Problem lösen könnte?
Hier noch ein kleines Beispiel.
Code: Alles auswählen
Enumeration #PB_Compiler_EnumerationValue
#Window_0
#Window_1
EndEnumeration
Enumeration #PB_Compiler_EnumerationValue
#Text_0
#Button_0
#Hyperlink_0
#Editor_0
#Editor_1
EndEnumeration
Enumeration #PB_Compiler_EnumerationValue
#Font_0
#Font_1
#Font_2
EndEnumeration
LoadFont(#Font_0,"Arial Narrow", 24)
LoadFont(#Font_1,"Arial Narrow", 16)
LoadFont(#Font_2,"Arial Narrow", 14)
Procedure OpenWindow_0()
OpenWindow(#Window_0, 0, 0, 570, 150, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(#Window_0, RGB(0,0,0))
ButtonGadget(#Button_0, 42, 115, 100, 25, "Neues Fenster")
HyperLinkGadget(#Hyperlink_0, 50, 60, 240, 40, "Google", RGB(100,0,155))
SetGadgetColor(#Hyperlink_0, #PB_Gadget_FrontColor,RGB(0,255,255))
SetGadgetColor(#Hyperlink_0, #PB_Gadget_BackColor,RGB(0,0,0))
SetGadgetFont(#Hyperlink_0, FontID(#Font_0))
EditorGadget(#Editor_0, 300, 20, 110, 120, #PB_Editor_ReadOnly)
SetGadgetColor(#Editor_0, #PB_Gadget_FrontColor,RGB(255,128,64))
SetGadgetColor(#Editor_0, #PB_Gadget_BackColor,RGB(0,0,0))
SetGadgetFont(#Editor_0, FontID(#Font_1))
SetGadgetText(#Editor_0,"Test")
SetWindowLong_(GadgetID(#Editor_0), #GWL_EXSTYLE, GetWindowLong_(GadgetID(#Editor_0), #GWL_EXSTYLE) &(~#WS_EX_CLIENTEDGE))
SetWindowPos_(GadgetID(#Editor_0), 0, 0, 0, 0, 0, #SWP_SHOWWINDOW | #SWP_NOSIZE | #SWP_NOMOVE | #SWP_FRAMECHANGED)
EditorGadget(#Editor_1, 420, 20, 70, 120, #ES_RIGHT | #PB_Editor_ReadOnly)
SetGadgetColor(#Editor_1, #PB_Gadget_FrontColor,RGB(0,255,0))
SetGadgetColor(#Editor_1, #PB_Gadget_BackColor,RGB(0,0,0))
SetGadgetFont(#Editor_1, FontID(#Font_2))
SetGadgetText(#Editor_1,"ok")
SetWindowLong_(GadgetID(#Editor_1), #GWL_EXSTYLE, GetWindowLong_(GadgetID(#Editor_1), #GWL_EXSTYLE) &(~#WS_EX_CLIENTEDGE))
SetWindowPos_(GadgetID(#Editor_1), 0, 0, 0, 0, 0, #SWP_SHOWWINDOW | #SWP_NOSIZE | #SWP_NOMOVE | #SWP_FRAMECHANGED)
EndProcedure
Procedure OpenWindow_1()
OpenWindow(#Window_1, 0, 0, 80, 90, "Neues Fenster", #PB_Window_Tool | #PB_Window_WindowCentered)
TextGadget(#Text_0, 0, 0, 60, 80, "Neues Fenster")
SetGadgetFont(#Text_0, FontID(#Font_1))
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_0
OpenWindow_1()
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure
OpenWindow_0()
Repeat
event = WaitWindowEvent()
Until Window_0_Events(event) = #False
EndThomas

