News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Create Window Wrapper

Started by jbullard, August 22, 2006, 11:06:58 AM

Previous topic - Next topic

hutch--

Jason,

Have a look at an example in the masm32 example code called MASM1K. (masm32\examples\exampl08\masm1k) It is pretty close to the bare bones of what it takes to make a window and in fact it is a very small amount of code. The virtues of this OS based technique is that it is self contained and very efficient in size terms. The window styles can be extracted out of the Microsoft reference material for CreateWindowEx() and you have both the extended styles (the 1st argument) and the normal windows styles which are ORRED together in the normal manner to produce the end result that you want.

Dialogs internally do the same thing but have additional code for keyboard handling and font size based scaling. The internal dialog engine in Windows is a good compromise if you need a controls style interface with buttons and the like as components. You can create dialog interfaces with either a dialog editor that produces an RC script that you compile using RC.EXE or alternatively you can use an OS based technique that build dialogs from in memory templates, this method has been developed in the masm32 project and has a set of supporting macros to make it easy to use.

The fun part if this is the direction you are going in is you can encapsulate complete windows, custom controls and the like in object modules built in masm and then use them with VC as the format is the same.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jbullard

@zooba
Yeah, luckily I have been using Visual Styles in manifest files ever since VB6 so I definitely know my way with them.  That was the first thing that I tried to do in discovering MASM and learning to create Windows.  Once I found out that it would work I was like man, this is so much easier and faster than what I had learned before.   :dazzled:

@hutch
What I ended up doing was removing the dialogs and extra windows and just went to one window.  I think I need to learn everything with one before going on with more.  However, I will keep that in the back of my mind as I progress.  Thanks.

Jason