Hi,
does anyone know a sort of Visual Editor, wich let me place controls on a form and give me the correct coordinates for CreateWindowEx API?
And please don't say "Use RC files!" :)
Posted on 2001-09-27 12:08:47 by bazik
well its there in DP, but u shall have to wait;)
till then well "use rc files":grin:
Posted on 2001-09-27 12:17:11 by MovingFulcrum
Should be simple enough to do with the MASM OOP model :)

As it would be perfect for placing all the different controls in a Linked List.

Each Control (Object) would have its only co-ordinates.

Each Control (Object) inherits an Interface called "Paint", such that come time to paint all the objects in place, they will know what type of control it is thu a polymorphic paint method, and paint the proper picture.

From there.. maybe a dialog box to edit width and height of an object... (so i would add these variables to the interface to standardize them all with a common name).

And lastly one more method to add to the interface, to generate "create" code for each object. Then all you have to do is set their style flags l8r, when pasted into your code.



Hell, you could also standardize a Style flags variable for all controls, and input this in this as well.


Heres a basic idea pictorally...




CPaint will provide the "statements" for 'mPaint', 'mCreate', 'xPos', 'yPos', 'xSize', 'ySize'. This insures that all the names are the same between all that inherits the interface. (Saves typings and protects from type-o's). You provide method functions for each unique class for the 'mPaint' and 'mCreate'.

The linked list will assume that all the objects in the list are "CPaint" objects (irregardless of weather its a Button or DropBox or whatever). Polymorphism will automatically make sure that if it is a Button, the Button's function for mPaint or mCreate is called. Thus all 'management' is done!

NaN
Posted on 2001-09-27 14:14:04 by NaN