@all
Many many thanks for your feedback.
bbanelli wrote:Will you be going through the code for verification after users submission?
I'm sorry, I don't understand you. What do you mean?
IdeasVacuum wrote:That works perfectly, but it leaves a white border around the button. How to make that border the same colour as the Window or Container back colour?
You're right. Code to change the background color:
Code: Select all
EnableExplicit
Global ButtonImageBC
CreateImage(1, 50, 50, 24, RGB(100, 200, 255))
Procedure WindowCallback(hWnd, uMsg, wParam, lParam)
Select uMsg
Case #WM_CTLCOLORBTN
If lparam = GadgetID(1)
ProcedureReturn ButtonImageBC
EndIf
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonImageGadget(1, 50, 50, 60, 60, ImageID(1), #BS_OWNERDRAW)
SetWindowColor(0, RGB(100, 255, 100))
ButtonImageBC = CreateSolidBrush_(RGB(100, 255, 100))
;ButtonImageBC = CreateSolidBrush_(GetSysColor_(#COLOR_BTNFACE))
SetWindowCallback(@WindowCallback())
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
DeleteObject_(ButtonImageBC)
End
EndSelect
ForEver
EndIf
Little John wrote:I think in 3 code examples, SetWindowLong_() should be replaced with SetWindowLongPtr_().
Thank you. I'll replace it.
@le_magn
Profile information wrote:Location: Italia
Do you need an Italian translation?