Posted: Tue May 02, 2006 2:11 pm
Any chances to release the source in the future?
http://www.purebasic.com
https://www.purebasic.fr/english/
I have DirectX 9.0c installed. And unlike my other computer, this graphics card usually works pretty well.netmaestro wrote:Ah, interesting. Thanks for the feedback, I suspect the issue there is that it uses a windowed screen and sprite3d graphics, which requires dx7 or better to be available. I'll put cleaner code in there so it ends gracefully if it can't run. (I'm guessing no dx7 is the issue, anyway) The reason for the cpu usage will be that it can't verify the background so it's always trying to update it. Good one, thanks again.
Wow - what a tutorial that will be. Anxiously awaiting.netmaestro wrote:Yes, for sure. I haven't done it yet because I don't want a lot of half-written versions floating around. Once it's released it'll come as a full package w/source & graphics.
Yes, ditto. Very nice.rsts wrote:Wow - what a tutorial that will be. Anxiously awaiting.
Code: Select all
Procedure.l myCallback(hwnd.l,uMsg.l,wParam.l,lParam.l)
Select uMsg
Case #WM_ERASEBKGND
ProcedureReturn #False
Case #WM_PAINT
For i=1 To 2
x = GadgetX(i)
y = GadgetY(i)
SetRect_(rect.RECT,x,y,x+GadgetWidth(i),y+GadgetHeight(i))
ValidateRect_(hwnd,rect)
RedrawWindow_(GadgetID(i),0,0,$407)
Next
PaintDesktop_(BeginPaint_(hwnd,ps.PAINTSTRUCT))
EndPaint_(hwnd,ps)
Case #WM_SIZING,#WM_MOVING
InvalidateRect_(hwnd,0,1)
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(0,100,100,320,240,"",#PB_Window_SystemMenu|#PB_Window_SizeGadget)
;SmartWindowRefresh(0,1)
CreateGadgetList(WindowID(0))
ButtonGadget(1,5,5,100,50,"Hello")
EditorGadget(2,5,60,100,175)
SetWindowCallback(@myCallback(),0)
InvalidateRect_(WindowID(0),0,1)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf