flat assembler
Message board for the users of flat assembler.

Index > Windows > MDI Windows and Toolbars...

Author
Thread Post new topic Reply to topic
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 27 Jan 2007, 22:32
As the title suggests, I'm trying to write an MDI application with a toolbar, but I have no idea how to go about it using the API. I think mostly it's not knowing which flags to use and which method to create windows. For MDI children it's SendMessage WM_MDICREATE vs CreatewindowEx and for ReBar I can't even get it to create a subwindow.

Anyone have a step by step list/example of what I have to do for either of these tasks?

Many thanks in advance!
Post 27 Jan 2007, 22:32
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 31 Jan 2007, 06:20
Here's an example that was convert to fasm from masm. This might be what your looking for. But to recompile it you'll have to download my include files from my website: http://users.egl.net/talktomatt/default.html


Description: MDI Example [NOW WORKS WITH STANDARD WIN32 API CALLS]
[Update 2/2/07 - fixed one major and minor bugs]
[Update 2/3/07 Previous fix wasn't good enough, so here's another.]

Download
Filename: mdidemo.rar
Filesize: 7.38 KB
Downloaded: 432 Time(s)



Last edited by madmatt on 03 Feb 2007, 06:11; edited 3 times in total
Post 31 Jan 2007, 06:20
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 31 Jan 2007, 22:31
I can't believe I had to install DX9 for 1 API call Laughing BUT... that example program looks great thank you very much!

Now I just gotta work out ReBar's...

Thanks again!
Post 31 Jan 2007, 22:31
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 31 Jan 2007, 22:40
Woooops! Sorry about that, i've reposted it without the dx9 stuff, which is my personal library for graphics and stuff. It now uses just standard win32 calls.
Post 31 Jan 2007, 22:40
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 01 Feb 2007, 01:52
FYI for all you PC gamers, Atari: 80 Games comes w/ DirectX 9.0b on the CD-ROM (last I checked, and it's quite awesome, too!).

If you have a really slow connection (e.g., 56k), you might be better off just buying this (quite cheap nowadays!). Smile
Post 01 Feb 2007, 01:52
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 01 Feb 2007, 16:23
madmatt there is one critical bug in your example - when you handle
Code:
.elseif [wParam] = 1804    

It shoul be like this to not to hang when there's no childs
correct
Code:
.elseif [wParam] = 1804
                     mov     eax, 1
                     .while  eax <> 0
                             invoke  SendMessage, [hClient], WM_MDIGETACTIVE, 0, 0
                             .if     eax, ne, 0
                                     push    eax
                                     invoke  SendMessage, [hClient], WM_MDIDESTROY, eax, 0
                                     pop     eax
                             .endif
                     .endw
    

_________________
Any offers?
Post 01 Feb 2007, 16:23
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 02 Feb 2007, 07:50
Yeh, thanks asmfan. Also corrected small problem with the menu text. New version posted above.
Post 02 Feb 2007, 07:50
View user's profile Send private message Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan 02 Feb 2007, 16:00
yep, still bug Wink
Code:
 .elseif [wParam] = 1804
                     mov     eax, 0
                     .while  eax <> 0
    

you never enter the loop)
Code:
                     mov     eax, 1
    

is better)

_________________
Any offers?
Post 02 Feb 2007, 16:00
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 03 Feb 2007, 06:09
asmfan: thanks, again Confused

Well hopefully, truly, fixed this time Very Happy . I removed the loop and now deletes one window at a time.
Post 03 Feb 2007, 06:09
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.