What goes wrong with WindowID with parent from other file

Just starting out? Need help? Post your questions and find answers here.
User avatar
doctorized
Addict
Addict
Posts: 856
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

What goes wrong with WindowID with parent from other file

Post by doctorized »

I have a main file with the main Window and some other Windows. I call a pbi file including another window. Every window, exept the main one, has parent, WindowID(#MainWindow). For the windows in the same pb file with the main window everything is fine. When I show a second window, I cannot access the main window. But the window from the pbi file is not acting the same. When that window is present, I can use the main window. I shouldn't be able to do it. What is wrong? Main window has flags:

Code: Select all

#PB_Window_MinimizeGadget | #PB_Window_ScreenCentered
All others in main file:

Code: Select all

#PB_Window_SystemMenu | #PB_Window_WindowCentered, WindowID(#MainWindow)
in pbi

Code: Select all

#PB_Window_SystemMenu | #PB_Window_WindowCentered, WindowID(Window))
Window, #MainWindow, is passed as parameter in the procedure call, for example:

Code: Select all

Procedure.s InputRequesterEx(title$, text$, width.i=330, height.i=115, Window.i = 0, returnLen.i = 0, isPassword.a = 0)
I have checked that #MainWindow is passed correctly and WindowID returns the same number in every case. Also, enumeration in pbi starts from $AAA, in main window from zero.
User avatar
STARGÅTE
Addict
Addict
Posts: 2084
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: What goes wrong with WindowID with parent from other fil

Post by STARGÅTE »

I have no idea what you want to say.
  • What do you mean with "When I show a second window, I cannot access the main window."?
  • Or "When that window is present, I can use the main window. I shouldn't be able to do it."?
  • Or "Also, enumeration in pbi starts from $AAA, in main window from zero."?
Probably a translation problem.

Further, it would be helpful to have an executable code that indicates the issue.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
ChrisR
Addict
Addict
Posts: 1150
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: What goes wrong with WindowID with parent from other fil

Post by ChrisR »

Wouldn't it be related to the WindowID!
WindowID(#MainWindow)
WindowID(Window)
Maybe try to define #MainWindow in DeclareModule
Post Reply