News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Do mdi children comport menus?

Started by xandaz, November 25, 2020, 06:13:34 AM

Previous topic - Next topic

nidud

#30
deleted

Vortex

It's easy to verify the authenticity of those files, simple MD5 check :

9ac0409fdc21f94e07b627ccd575b43d *\masm32\include\\windows.inc
0b6c5c13a57db2e34ee7c2232c0665d8 *\masm32\include\winextra.inc


Jochen, could you send your MD5 values?

xandaz

    it's the way it's in the manual. i don't remember adjusting but probabily happened. take it easy JJ. ...and thanks

jj2007

Quote from: nidud on November 28, 2020, 03:29:36 AM

https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-createstructw

typedef struct tagCREATESTRUCTW {
  LPVOID    lpCreateParams;
  HINSTANCE hInstance;
  HMENU     hMenu;
  HWND      hwndParent;

Yes I know - the Masm32 SDK version is "wrong", but it works perfectly. You can name it HandleOfMyParent, and it will still work. The point is that we are a community of coders who want to exchange ideas and help each other. That can work only if we use exactly the same include files. As soon as somebody fumbles his *.inc files, it is a big waste of time for those who are trying to be helpful.

jj2007

Quote from: Vortex on November 28, 2020, 03:32:23 AM
It's easy to verify the authenticity of those files, simple MD5 check :

9ac0409fdc21f94e07b627ccd575b43d *\masm32\include\\windows.inc
0b6c5c13a57db2e34ee7c2232c0665d8 *\masm32\include\winextra.inc


Jochen, could you send your MD5 values?

Sure:

include \masm32\MasmBasic\MasmBasic.inc         ; download
  Init
  GetHashRev=1
  If_ GetHash(FileRead$(<CL$()>), LastFileSize, md5) Then PrintLine "The MD5 of ", CL$(), " is ", Hex$(xmm0)
EndOfCode


The MD5 of \Masm32\include\Windows.inc is 9AC0409F DC21F94E 07B627CC D575B43D

Source & exe attached, so that xandaz can post his values, too.

xandaz

   The code became too complex and i'm having a hard time finding a certain glitch. When i close a project and the reopen only one of the source files is loaded. JJ said something about the align_2 issue. i wonder if thta's what you ment...can soomeone help out.

jj2007

Error A2063: Symbol not defined : CREATESTRUCTW.hwndParent

I will not adjust my Windows.inc for you

xandaz


jj2007

Thanks. I've been able to assemble it, and it runs fine. The WM_MDISETMENU message succeeds without error, but there is no menu in the mdi child. However, if you move the mouse between the main and mdi captions, you will notice that the main menu changes between Edit and Build.

Have you studied Iczelion's tutorial on mdi menus?

http://www.interq.or.jp/chubu/r6/masm32/tute/tute032.html

xandaz

   Thanks JJ. What was  :skrewy: align_2 issue that you were talking about? The application only loads the full project at runtime. after closing the project it only loads one window. it's strange but i'm not sure that it has something to do with ManageOpenMode. it's spmething far simpler.

jj2007

Quote from: xandaz on November 29, 2020, 08:40:00 PMWhat was  :skrewy: align_2 issue that you were talking about?

A name conflict. I tested your code with MasmBasic, which includes essential stuff from the Masm32 SDK; for example: \Masm32\include\dialogs.inc

include \masm32\include\masm32rt.inc  ; pure Masm32

.code
start:
mov ecx, 3
align_2:
  dec ecx
  loopnz align_2
  MsgBox 0, "ok?", "Test:", MB_OK
  exit

end start

xandaz

   Yeah...well. Problem solved. It was the Final_File flag. it had to be reset. I moved things around a little like in Iczelion's tute but the result is exactlly the same. Thanks JJ