Using WinBlitz3D

Blitz3D Forums/Blitz3D Beginners Area/Using WinBlitz3D

PCBGuy(Posted 2007) [#1]
I don't know how to initialize the program to look at the samples I keep getting a "function not found "WB3D_InitializeGUI" error message. Can anyone walk me throught the process?


Danny(Posted 2007) [#2]
Hi,

Make sure you have a copy of "blitz3d_gui_dll.dll" and "Blitz3D_GUI_DLL.decls" in your 'ProgramFiles\Blitz3D\userlibs' folder.

Also, for some examples you have to make sure that the Include "..\..\wb3dStyles.bb" is pointing to the correct folder..

hope that helps,

Danny


Kev(Posted 2007) [#3]
Hi PCBGuy.

like danny said, also make sure your using the latest blitz3d update.

an install guide can be found here.
http://www.winblitz3d.co.uk/forum/viewtopic.php?t=64

kev


PCBGuy(Posted 2007) [#4]
Thanks i did but ...
Now I am getting an "API_initializeGUI" error
and a "Class name" error


Kev(Posted 2007) [#5]
ummm. does the example below work?

Include "WB3DStyles.bb"


; setup gfx mode.
Graphics3D 640,480,16,3

Global RuntimeWindow_hWnd = WB3D_InitializeGUI(SystemProperty("AppHwnd"),10,10,800,600)

; cleanup any old creation events, its better to do this before we enter the main
; event loop, when some gadgets are created they generate events.
WB3D_FlushEvents 

; setup out quit flag, and loop until the flag is set.
QUIT = 0
While Not QUIT = 1
 	
	Cls
		
	; get an event of the event queue.
	event = WB3D_WaitEvent()
	
	Select event
					
		Case WB3D_EVENT_KEYPRESS
		
			; wb_eventdata holds the key code that was pressed.
			keypressed = WB3D_EventData()
			Select keypressed
				
				Case WB3D_KEY_ESCAPE	
					
					; set the flag to leave the loop.
					QUIT = 1
					
			End Select
				
		Case WB3D_EVENT_WINDOW_CLOSE

			Select WB3D_EventSource()
				Case RuntimeWindow_hWnd
					QUIT = 1
														
			End Select
			
	End Select
	
	; generate an internal blitz event
	Flip

Wend

; use notify using external winapi constants. 
WB3D_Notify "WB3D GUI Window Example","Bye, Thats It I Quit",MB_OK Or MB_ICONASTERISK
WB3D_EndGUI()
EndGraphics
End



check WB3D_InitializeGUI uses the SystemProperty("AppHwnd") as the first param.

kev


PCBGuy(Posted 2007) [#6]
I ran the above file in a test directory (C:\blitz3d\test)and edited the first line in your above file with

Include "c:\blitz3d\test\WB3DStyles.bb"

I included in the directory the .dll file and started blitz3d from that directory. The .decls is in userlibs.

I ran the above file and got a

"User lib not found" message error


Kev(Posted 2007) [#7]
Hi PCBGuy

first ensure 'blitz3d_gui_dll.dll' is in 'C:\blitz3d\test' folder and that theres not a copy in your blitz3d userlibs.

next make sure 'Blitz3D_GUI_DLL.decls' is in your blitz3d userlibs folder.

now run blitz3d and create a new sourcecode file in 'C:\blitz3d\test' that contains the above example code, call this new source file 'test.bb'

theres no need to change 'Include "WB3DStyles.bb"' as blitz3d includes from the current directory.

*EDIT - ive encounted this problem before.
by any chance you dont have two install's of blitz3d on your pc? and then using file association has open'd the version of blitz3d without the .decls in? this sometimes can happen if you have on a previous install and have copyed the blitz3d folder to a new location then reinstalled blitz3d at a later date.


kev


PCBGuy(Posted 2007) [#8]
Sorry for all the trouble .... I did all you instructed including not editing the above file. Did a search through all my directories to see no duplicate files and then ran a fresh copy of test.bb after checking all the pertinent files and got again the following:


"API_initializeGUI" error
"Class name" error

Again I am sorry I can't get this right!


Kev(Posted 2007) [#9]
no problems PCBGuy, can you download the following test.

http://www.winblitz3d.co.uk/pcbGUY_Test.zip

there's 2 .exe files, please test both and report if either work or generate the same error.

kev


Danny(Posted 2007) [#10]
Also pcbguy,

When you move/alter/rename .decls or dll files, make sure you EXIT the blitz IDE, and then reload your test.bb before compiling/running it again...

p.s. Not running windows Vista or something ugly like that are you?!?

d.


Kev(Posted 2007) [#11]

"API_initializeGUI" error
"Class name" error



by the error it looks like the HWND pointer return'd by SystemProperty("AppHwnd") is not being passed over correctly. hence why the two errors.

in the above download 'test'

example 1 uses standard HWND return'd from SystemProperty("AppHwnd").

example 2 uses a call to API_FindWindow() after setting AppTitle.

i do wonder why this happens, i recall once before having reports on the same problem that was never resolved.


p.s. Not running windows Vista or something ugly like that are you?!?



WinBlitz3D has been tested under vista, there is a couple of small problems. but not like the above error.

kev


PCBGuy(Posted 2007) [#12]
OK, I got to run the file. I ran them in the zip applied directory under c:\Blitz3D. They come up empty and then when I exit out of them they bring up the message that you wrote into the code:

"Bye, Thats It I Quit",


Kev(Posted 2007) [#13]
Hi PCBGuy,

yes they run correct then. i will take this private and email somtime today while we try and get winblitz3d working for you.

kev


PCBGuy(Posted 2007) [#14]
Problem Solved!!!!!!!

My version of Blitz3D was not up to date!

Thanks again EVERYONE for all your help!!!!!!


Kev(Posted 2007) [#15]
Great news PCBGuy. Good luck and hope to see some great WB3D stuff from you!

kev