News:

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

LOOK HERE User Defined Static Control that hides!!!

Started by xandaz, February 02, 2012, 12:06:50 PM

Previous topic - Next topic

jj2007

Quote from: qWord on February 06, 2012, 01:00:24 PM
so it requires adminstator rights for reading C:\ ?
No, I have full rights here, I can even create files in C:\WINDOWS\system32\*
By the way: why should it read from C: if my Masm32 installation is on D:??
As Dave wrote, the error is "not a valid Win32 application". Only the xl11 app shows this behaviour, the others work fine.

qWord

Quote from: jj2007 on February 06, 2012, 01:26:37 PMOnly the xl11 app shows this behaviour, the others work fine.
thx - seems link.exe version 11.00.40825.2 produce incompatible/invalid EXEs ...
FPU in a trice: SmplMath
It's that simple!

dedndave

you are correct, qWord



the other 2 apps work ok under XP MCE SP3

there may be a linker v11 command-line switch that makes compatible PE files   :P

qWord

there is a second possibility: the PE loader of XPSP3 is buggy  :bg
FPU in a trice: SmplMath
It's that simple!

qWord

that's funny:  the only difference bettween the EXEs created by link v10 and v11 are 10 byte in the DOS-Header (offset 0x80-0x89)
FPU in a trice: SmplMath
It's that simple!

jj2007

Quote from: qWord on February 06, 2012, 02:21:00 PM
that's funny:  the only difference bettween the EXEs created by link v10 and v11 are 10 byte in the DOS-Header (offset 0x80-0x89)

There are some more. What prevents it from running is IMAGE_OPTIONAL_HEADER Major subsystem version, 2 bytes at 100h.

xandaz

   Hi guys... How about the STXN_HEIGHTCHANGED? Can anyone see why it doesn't get to the main window proc? Or does it and i'm (as usually) overlooking some details?
   Thanks.
   Nice JJ. I rarely think of moving data into a register unless m2m. I guess i should keep that in mind. ASM is supposed to be higinic.
   Later

qWord

Quote from: xandaz on February 06, 2012, 04:31:38 PMHi guys... How about the STXN_HEIGHTCHANGED? Can anyone see why it doesn't get to the main window proc?
in the WM_TIMER-handler:
            invoke GetParent,hWnd
            mov edx,eax
            invoke  SendMessage,edx,WM_NOTIFY,0,addr stxnsc


Quote from: jj2007 on February 06, 2012, 03:07:36 PMWhat prevents it from running is IMAGE_OPTIONAL_HEADER Major subsystem version, 2 bytes at 100h.
yep, that's it.
FPU in a trice: SmplMath
It's that simple!

xandaz

   Q? Why
mov edx,eax
!i SendMessage,edx,...

    That doesnt work either.... am i misinterpreting something? It's a bit hard for me to understand english when it's spoken by natives.

xandaz

Oh it's
GetParent,hWnd
and not
GetWindow,....
Sorry. My mistake. Yep.... INVALID_WINDOW_HANDLE.Thanks

xandaz

    I'm having a hard time understanding why the hWndParent member is not valid when i send the STXN_HC. The first version i made works fine now i have to get the parent's window handle. Why is that?

xandaz

    It was kinda hard but it worked out. Yeah Q, the rects what not correctly filled. The Rectangle is not in client coordinates. I'm sure that someone might find it useful. How didnt i know that already?
    Also in the Chevproc edi was pointing to the wrong structure and that's why i could use the handle to send the STXN_ADDCONTENT.
    Well, thanks a lot guys for your pacience.
    Latest version following....

xandaz

    Hi guys... i moved a little further and decided to add an explorer control to the Extra Controls Lib. I came across a little problem. The messages from the child controls of the EXPLORER class windows dont message to the main proc. Can this be done without subclassing? If these child controls were children to the main winow, the main winowProc would recieve the messages. Why not so in this case?

qWord

Child windows sends their notifications only to the parent window. If the messsages are needed by the grandparent, simply redirect them in your ExplorerProc  as needed.
FPU in a trice: SmplMath
It's that simple!

xandaz

    Have you looked into the example? The parent windows isn't getting the WM_MOUSEMOVE from the two child controls.