lately i'v been using ATC for doing some nice stuff to make coding easy,
i'v tried to avoid the long typing of creating menus via WM_CREATE and try making use of oop without resource file.
below is the example,
i'll release source code as soon as i finish some stuff around,
tell me what you think :)

comment *
create a simple menu tree as folows:
Note: (x) means a popup menu handler, below used 3 popup menu handles
[ File | Edit ]
+-Open... +-Copy
|-Save As... |-Cut
+-test1 (0) +-test2 (1)
+-submenu test1-1 +-submenu test2-1
|-submenu test1-2 |-submenu test2-2
|-test3 (2)
+-submenu test3-1

mov obj5, new(CMenu,hWnd,3) ; create array with 3 menu handlers for sub menu popups
set obj5 as CMenu

pcall obj5.CreatePopup
pcall obj5.AddPopupMenu,CTEXT("File")
pcall obj5.AddSubMenu,1,CTEXT("Open...")
pcall obj5.AddSubMenu,2,CTEXT("Save As...")
pcall obj5.CreatePopupEx,0
pcall obj5.AddPopupMenuEx,0,CTEXT("test1")
pcall obj5.AddSubMenuEx,0,3,CTEXT("submenu test1-1")
pcall obj5.AddSubMenuEx,0,4,CTEXT("submenu test1-2")

pcall obj5.CreatePopup
pcall obj5.AddPopupMenu,CTEXT("Edit")
pcall obj5.AddSubMenu,5,CTEXT("Copy")
pcall obj5.AddSubMenu,6,CTEXT("Cut")
pcall obj5.CreatePopupEx,1
pcall obj5.AddPopupMenuEx,1,CTEXT("test2")
pcall obj5.AddSubMenuEx,1,7,CTEXT("submenu test2-1")
pcall obj5.AddSubMenuEx,1,8,CTEXT("submenu test2-2")
pcall obj5.CreatePopupEx,2
pcall obj5.SetSubMenuEx,1
pcall obj5.AddPopupMenuEx,2,CTEXT("test3")
pcall obj5.AddSubMenuEx,2,9,CTEXT("submenu test3-1")

pcall obj5.setMenu
Posted on 2004-06-19 18:25:05 by wizzra
Great stuff :)
I too found wrapping some common controls functionality in classes to be useful.
So far I have CListView and CProgressBar but we also much earlier (unltrano and I) wrote a CD3DApplication class we simply called CApp. I found I didn't use it as much.
Posted on 2004-07-08 00:35:45 by Homer
I think we all need to learn from the MFC . The AFX team did great job, and the sourcecode is most educational. It shows what classes can/should be made, and I'd add to it stuff that Joel Spolsky mentioned soon - managed memory. My first step to managed memory I guess was the vFile. Another thing that I'd like to see implemented is a Flash OCX implemented in a window, using ATC/OA32 ^_^ . But first I and Homer will have to complete the COM stuff. At least we'll try again :)
Posted on 2004-07-08 04:15:26 by Ultrano
Glad to hear that.
Looking forward to sorting out the COM issue, and then posting mountains of COM related stuff.
Besides that, my current GameDev project requires it :)
Posted on 2004-07-08 06:33:07 by Homer
Hi EvilHomer & Ultrano,

well i started for my self a small wrappers, i am sure it can be helpful if users will dev it more (like open source alike), but there should be rules as the afc.
the one in the zip are just stuff i did for my self.
included in it are few classes, and example.
Posted on 2004-07-08 14:56:38 by wizzra
Nice :alright: though, there is one approach that I think is not really appropriate in asm: using many single-line procedures that only fetch a variable, like in your CFont:

CFont_GetUnderline proc me
mov eax,.CFont.m_fdwUnderline
CFont_GetUnderline endp

C++ coders do this too much (I guess you used to be one ;)). Small rules like this improve the overall performance of apps.
But overall, I like the idea of AFC :grin: Posted on 2004-07-08 15:50:27 by Ultrano
hi Ultrano,

yeah i know what you mean, but the whole C++ idea is to keep 'private' members 'hidden' and be accessed only from public fucntions.

well, of course in asm we can do whatever we want, but it just an class model that the prorammer wants to have.

i am mostly not a c++ coder, i have bk but mostly i do C.

yeah, the AFC Idea is really nice.
if it gets bigger and bigger, and ppl code thier own wrappers and add it to the AFC library, we will have a very nice set of classes to share.
Posted on 2004-07-08 17:00:57 by wizzra

you can add your Classes to the Win32AFC library and make it grow. :)
Posted on 2004-07-11 13:36:29 by wizzra