News:

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

Of Mice and Messages

Started by NoCforMe, October 04, 2011, 07:36:55 PM

Previous topic - Next topic

dedndave

some of the other functions that can create dialogs or controls...
CreateDialog
CreateDialogIndirect
CreateDialogIndirectParam
CreateDialogParam
DialogBox
DialogBoxIndirect
DialogBoxIndirectParam
DialogBoxParam
MessageBox
MessageBoxEx
MessageBoxIndirect


NoCforMe

I really do not have the patience to go through 4,400 lines of almost totally uncommented assembly language (DlgEdit.asm) to find out where these controls are created.

dedndave

oh - and i do ?   :lol

that particular file isn't so bad
i opened it with Notepad and used Find to locate "CreateWindow"

a coupled popped right up...
.if hCur
invoke CreateWindowEx,0,
addr szStaticClass,0,
WS_CHILD or WS_VISIBLE or SS_WHITERECT or WS_BORDER or SS_NOTIFY,
xP,yP,6,6,
hPar,0,hInstance,0
.else
invoke CreateWindowEx,0,
addr szStaticClass,0,
WS_CHILD or WS_VISIBLE or SS_GRAYRECT or WS_BORDER or SS_NOTIFY or WS_CLIPSIBLINGS or WS_CLIPCHILDREN,
xP,yP,6,6,
hPar,0,hInstance,0
.endif

i would have used a register to hold the style bits, then a single CreateWindowEx in that case   :P
        .if hCur
                mov eax,WS_CHILD or WS_VISIBLE or SS_WHITERECT or WS_BORDER or SS_NOTIFY
        .else
                mov eax,WS_CHILD or WS_VISIBLE or SS_GRAYRECT or WS_BORDER or SS_NOTIFY or WS_CLIPSIBLINGS or WS_CLIPCHILDREN
        .endif
        invoke CreateWindowEx,0,
        addr szStaticClass,0,eax,
        xP,yP,6,6,
        hPar,0,hInstance,0


there are many more lines that use "CreateWindow"

i see he also uses CreateDialogIndirectParam several times in that file

qWord

NoCforMe,
what are you exactly trying to do? - what is so hard on creating child controls?
FPU in a trice: SmplMath
It's that simple!

dedndave

i didn't get much time to play, today - back to it tomorrow   :P

dedndave

my move window code seems to have a bug - well, at least one   :bg
my head hurts - lol
i am going to set it aside for the moment and put together a "display messages" window
that should go better

dedndave

ok - i got one bug fixed - the main one
for window move, however, you must move slowly - lol
i know what is happening and how to fix it
the mouse gets outside the child window before the window move happens
then, that proc no longer gets WM_MOUSEMOVE messages
but, i thought you might like to play with what i have so far....