Blitz+ users a new way of opening windows...

BlitzPlus Forums/BlitzPlus Programming/Blitz+ users a new way of opening windows...

Drago(Posted 2003) [#1]
'k Any program that used Findwindow to get the HWND of the blitz basic window doesn't work anymore, this includes both mine and peters OpenGL extensions since we used that method... the reason is that it doesn't seem to be a "GX_WIN32_CLASS" anymore for the window class

So is there anyway around this, or do I have to find the window another way...

Also how do you get the HWND of Gadgets? since unless I've gone blind there is no reference to this in the docs.
later.


Drago(Posted 2003) [#2]
'k if you use a dll call to find window you can't find it.
but if you wrote a wrapper to get the window. you put NULL in as the class
ie
findwindow(NULL,title);

where title is a array of chars


Shagwana(Posted 2003) [#3]
Theres a new command in blitz+ to help now...

pWindow=createwindow(...)
hwnd=QueryObject(pwindow,1)


Online doc located here


Nigel Brown(Posted 2003) [#4]
I guess this is why none of my popup menus appear anymore, If I replace FindWindow("GX_WIN32_CLASS", "WindowNmame" ) with QueryObject( window, 1 ) I get a valid return from QueryObject but not from FindWindow or Find Menu, SubMenu. Why are these types not supported under the new QueryObject command ???


Difference(Posted 2003) [#5]
I will be updateing my code shortly.

For now simple use "BLITZMAX_WINDOW_CLASS" instead of "GX_WIN32_CLASS"


cyberseth(Posted 2003) [#6]
Listen to Shagwana. It's far easier to just say:

win = CreateWindow(...)
hwnd = QueryObject(win,1)

Oh no, for some reason the GetMenu() API call doesn't like hwnd's collected from QueryObject() and you can't use QueryObject() on a menu item.. So you have to use "BLITZMAX_WINDOW_CLASS" instead, as Peter said.


JaviCervera(Posted 2003) [#7]
you must specify "Blitz Runtime Class" as the class of the Window.


Difference(Posted 2003) [#8]
"Blitz Runtime Class" is for B3D

"GX_WIN32_CLASS" is for B+ version 1.1
"BLITZMAX_WINDOW_CLASS" is for B+ version 1.34