Page 1 of 1

PB window class name

Posted: Tue May 24, 2005 6:31 pm
by Seldon
Do you know the class name PB gives to its windows opened with OpenWindow() ?? I'm using FindWindow() and I want to be 100% sure, so I'd like to check both the name of my window (title) both the class name. Thank you in advance.

Posted: Tue May 24, 2005 9:41 pm
by srod
I just ran the following program and it seems that Purebasic registers the window class as 'WindowClass_' + #window.

Code: Select all

OpenWindow(8, 100, 200, 195, 260, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "PureBasic Window")
  a$=Space(1024)
  GetClassName_(WindowID(),@a$,1024)
  Debug a$
  Repeat
    EventID.l = WaitWindowEvent()
    If EventID = #PB_Event_CloseWindow
      Quit = 1
    EndIf
  Until Quit = 1
End