Can't seem to make a Box without a title bar

Started by User_McUser, June 25, 2025, 02:33:36 PM

Previous topic - Next topic

User_McUser

I want to draw a single box with no border or title bar next to an existing WinBatch Dialog when a button is pressed.

I tried this code to generate the box:
BoxesUp("10,10,264,264", @NORMAL)
BoxNew(1,"10,10,264,264", 0)

That does make a box in the correct spot with the correct size, but it has a title bar. "BoxNew" called with an existing box ID is supposed to update the existing box with the new style (which in this case should be borderless) but I guess maybe it doesn't work that way for Box ID 1? 🤔

My goal is to add a "fly out" window to an existing WinBatch dialog that appears to be "attached" to the main dialog window. Right now it looks like a separate, adjacent window with its own title bar.

Suggestions are appreciated, thanks! 🙂

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

User_McUser

Great, thank you! 😊

I will try to integrate these methods into my script and see how it goes. 👍

User_McUser

OK, this is working (thanks again) but now I have the issue that if the main dialog window gets moved, the box does not automatically move with it.

Is there a "window moved" event I can hook? (Doesn't seem to be.)

My workaround is to use a timer in the callback that compares the current position to the previously stored value and moves the box when they differ, updating the stored position when it does.

Are there any issues or concerns with having the callback time be 5ms? Like excessive CPU usage or something like that?

td

WIL dialogs do not have a move event that will call your UDP. A 5ms timer should not cause any problems as long as the processing you perform when responding to the event does not take too long. You eliminate that problem by disabling the dialog during processing. While not absolutely necessary, it is also a good idea to turn the timer off at the beginning of processing and turn it back on after processing is finished.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

SMF spam blocked by CleanTalk