Hi boodhi,
here is my explanation (based on observations)
Since all controls under windows are (only) windows, different properties and behaviors are registered by the classes. (see RegisterClassEx function and WNDCLASSEX structure)
You can only assign a class to windows and controls when creating them. (see CreateWindowEx function)
For the main window PB uses a (free selectable) name "WindowClass_0", like
Code: Select all
Protected hWnd = CreateWindowEx_(0,"WindowClass_0","The title of my window",#WS_OVERLAPPEDWINDOW,x,y,430,430,#Null, #Null, wc\hInstance, #Null)
So the main window name is not tied to specifications from windows, but freely selectable.
I have not yet found an explanation for the different numbers.
If I want to search for my own program via EnumChild(), I always check the "Classname" beforehand so that I don't get any surprises.
I remember that we had a (short) discussion on PB should make the Classname available to us by adding a parameter but Fred (unfortunately) refused.
There are samples of doing it by yourself with CreateWindowEx_.
BTW: The PB-IDE on my system has a Classname == "WindowClass_2" and the "Debug Output - " window uses WindowClass_2242169232944.
Hope this helps, or motivated others to supplement.