The MASM Forum

General => The Laboratory => Topic started by: K_F on August 01, 2019, 06:02:44 AM

Title: Looking for that winProc MSG tracker of Daves
Post by: K_F on August 01, 2019, 06:02:44 AM
Reveals messages sent to a windows procedure.

Tried searching for it here, and my disks.
Anyone know where it is
Thanks.
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: HSE on August 01, 2019, 07:26:08 AM
Dave use Spy++ from M$.
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: K_F on August 02, 2019, 03:48:16 AM
DednDave made a nice little utility of his own... not  the MS one.
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: jj2007 on August 02, 2019, 04:01:25 AM
GuiMenu equ @File, &Open, &Save, -, E&xit, @Edit, Undo, Copy, Paste
include \masm32\MasmBasic\Res\MbGui.asm
Event Message
  inc msgCount
  deb 4, "msg", chg:msgCount    ; see deb (http://\masm32\masmbasic\mbguide.rtf#.Mbdeb)
GuiEnd


Title: Re: Looking for that winProc MSG tracker of Daves
Post by: HSE on August 02, 2019, 04:41:43 AM
Quote from: K_F on August 02, 2019, 03:48:16 AM
DednDave made a nice little utility of his own... not  the MS one.

He sugest Spy:
        http://masm32.com/board/index.php?topic=4453.msg47713#msg47713

Original (also free) application was Kirchmar Kobik (1999).
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: K_F on August 02, 2019, 05:41:49 AM
Thanks.. I'll try both.
;)
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: aw27 on August 02, 2019, 06:46:13 AM
spyxx.exe and spyxx_amd64.exe are distributed with VS 2019 and earlier.

Very old SDKs had the source code for spy.exe, which is sort of the same (32-bit).
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: K_F on August 03, 2019, 06:27:13 AM
I've had this weird problem, in that my MDI child proc was not recognising the WM_CREATE message, although Spyxx showed the message passing through this window proc ???.
I traced it down to the WM_CREATE section, setting MsgBox windows as an indication that the execution had arrived at that point.
This whole dam week, I've been trying different angles around this proc with Zip, Nudder, no result.

I cannot tell what I've done exactly after all this 'dancing around'.. but now it's working after going through the same set of code combinations many times.
Has anybody had this problem, or is it peculiar to the latest Masm64 'compiler'.

It has driven me nutz this week  :hmmm: :dazzled:
Oh.. I created the MDI Child window with the CreateWindowEx Function.



mTYPE_proc proc hWin:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD

; mov eax, uMsg
; RegVal eax
    .if uMsg == WM_CREATE
mov eax, 10810
RegVal eax
Invoke mTYPE_InitMem, Memory_Heap.h_MainHeap, c_MEMALLOC_8MB
RegVal eax
Invoke mTYPE_CreateControls,hWin
RegVal eax
.elseif uMsg == WM_MDICREATE
; mov eax, 10820
; RegVal eax
.endif

    invoke DefMDIChildProc,hWin,uMsg,wParam,lParam
    ret
mTYPE_proc endp
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: HSE on August 03, 2019, 07:44:30 AM
Quote from: K_F on August 03, 2019, 06:27:13 AM
Oh.. I created the MDI Child window with the CreateWindowEx Function.

Why you don't try CreateMDIWindow?
Title: Re: Looking for that winProc MSG tracker of Daves
Post by: K_F on August 03, 2019, 08:40:30 AM
Suppose I could.

Want to play more.. Subclassing..etc ;)