I'm doing a program on Windows Vista, and what I'd like to do is a program that has got a main window, and has got another window that control the main one, like Microsoft Access.
Can anyone help me out how to do it if possible.

Thanks Dan08.

Dani AI

Generated

Short answer: yes — you can have a small “controller” window that drives a main window, but there are several ways to do it and some are better than others.

’s MDI hint is one approach, and and were right to point you at GUI toolkits. Practical guidance that complements those replies:

  • Prefer an embedded/docked pane inside the main window if you want the controller to feel like part of the app (cleaner UI, easier state management). Modern toolkits give docking primitives (for example Qt exposes QDockWidget).
  • If you want multiple document windows inside a parent, MDI exists but is dated and can feel clunky on current desktops. A separate modeless window (a controller dialog) is the simplest to implement but looks less integrated.
  • Architect the interaction with a simple pattern: keep the application state in a model, expose a small public API on the main window (open/close/change view, etc.), and have the controller call those methods or emit events. This keeps logic testable and avoids tight coupling.

Important tips and cautions:

  • Do not rely on low-level hacks like forcibly reparenting top-level windows across processes unless you really must — it’s fragile. See Microsoft’s SetParent documentation for the risks.
  • GUI updates must run on the toolkit’s main/UI thread. If you use background threads, marshal results back via the toolkit’s safe call (for example, framework-specific methods such as wx.CallAfter, Qt’s queued signals/invokes, or Tk’s .after).
  • If using Tk, prefer embedding with PanedWindow/Frame rather than floating Toplevels for an “inside the main window” feel. If using wx or Qt, pick their docking/AUI features to avoid reimplementing window-management.

Pick the toolkit that already provides the behaviour you want (docking or panes) and design a small controller API. That keeps the implementation robust and straightforward without brittle platform hacks.

Recommended Answers

All 3 Replies

Google MDI + the toolkit of your choice.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.