c++winapiform-designer

Draw Window with Controls


Ok so I'm planning on doing a Form designer in WINAPI. I know it's going to be hard but I'm having a problem just starting.. My only problem that I foresee so far is figuring out how to draw the controls and draw a form onto the screen. I'm sure I can do the rest.

When I look at the C# form designer, I see that on screen, it actually shows a window and a list of controls and when you drag a button onto that window, it draws a button in that position. Is that a real button or just an image that is drag-able? Is that a real form/window with an exit button, etc.. or is it a picture that is drag-able?

I'm trying to figure out how to draw that form/window within my main window. Any ideas?


Solution

  • It depends, in many cases it is a real window.

    For example in Qt, MFC, C++Builder when you are using a WYSIWYG form designer. They really create a form but with the ability of drag-and-drop controls.

    If you want build a tool like them, You should create windows, dialogs, buttons, edits, ... dynamically and attach them to you main form.