PVGadgets QuickStart

Top  Previous  Next

If you are having problems with any functions from the PVGadgets Library, make sure your Main Events Loop contains the proper functions and code to initialize the PVGadgets and make them work.

 

If the Gadget or Form you have created needs any of the following, simply copy and paste it into your project.

 

 

;This must be called at the start of your program

Init_PVDynamic()

 

 

Procedure WindowCallback(WindowID,Message,wParam,lParam)

ReturnValue=#PB_ProcessPureBasicEvents

 

If Message=#WM_GETMINMAXINFO

ReturnValue=PVDynamic_LockWindow(WindowID,lParam)

EndIf

 

If Message=#WM_SIZE

ReturnValue=PVDynamic_Resize(WindowID)

EndIf

 

If Message=#WM_CTLCOLORSTATIC Or Message=#WM_CTLCOLOREDIT Or Message=#WM_CTLCOLORLISTBOX

ReturnValue=PVDynamic_ColorGadget(lParam,wParam)

EndIf

 

If Message=#WM_MEASUREITEM

ReturnValue=PVDynamic_MenuBarSize(WindowID,lParam)

EndIf

If Message=#WM_DRAWITEM

ReturnValue=PVDynamic_MenuBar(lParam,-1,-1)

EndIf

 

ProcedureReturn  ReturnValue

EndProcedure

 

 

;This must be called after your Form has been created

SetWindowCallback(@WindowCallback())