Posted: Thu Mar 13, 2003 5:13 am
Restored from previous forum. Originally posted by LJ.
Something is wrong with the follow code:
hWnd = OpenWindow(0, 0, 0, 796, 550, #PB_Window_SystemMenu, "Test")
CreateGadgetList(WindowID())
LoadImage(0,"test.bmp")
StartDrawing(WindowOutput())
DrawImage(UseImage(0), 20, 10)
StopDrawing()
ButtonGadget(15, 300, 335, 80, 24, "Quit")
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow
End
You must create a test.bmp to test this. If the ButtonGadget line is ; (rem'd) out, then the test.bmp image is displayed. But not the button. If the the LoadImage, StartDrawing, DrawImage, StopDrawing lines are ; (rem'd) out, then the button Quit is displayed but not the image. It's an either or situation. I can get either one to display on the window, but not both at the same time. Does anyone know what I'm doing wrong?
Something is wrong with the follow code:
hWnd = OpenWindow(0, 0, 0, 796, 550, #PB_Window_SystemMenu, "Test")
CreateGadgetList(WindowID())
LoadImage(0,"test.bmp")
StartDrawing(WindowOutput())
DrawImage(UseImage(0), 20, 10)
StopDrawing()
ButtonGadget(15, 300, 335, 80, 24, "Quit")
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow
End
You must create a test.bmp to test this. If the ButtonGadget line is ; (rem'd) out, then the test.bmp image is displayed. But not the button. If the the LoadImage, StartDrawing, DrawImage, StopDrawing lines are ; (rem'd) out, then the button Quit is displayed but not the image. It's an either or situation. I can get either one to display on the window, but not both at the same time. Does anyone know what I'm doing wrong?