News:

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

Main Menu

vc any way to make macros similar to masm?

Started by daydreamer, August 29, 2021, 01:58:42 AM

Previous topic - Next topic

daydreamer

well its easy to make macros in masm,because I am experienced
but I am less experienced in VC++ way of making macros
which I wish for,to shorten often used almost same api calls?
SendMessage several things becomes very long to write
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

LiaoMi

Quote from: daydreamer on August 29, 2021, 01:58:42 AM
well its easy to make macros in masm,because I am experienced
but I am less experienced in VC++ way of making macros
which I wish for,to shorten often used almost same api calls?
SendMessage several things becomes very long to write

Hi daydreamer,

C++ macro operations are not popular, all the rest is replaced by the templates. There is one interesting meta add-on over the C preprocessor:

https://github.com/Hirrolot/metalang99
Metalang99 is a functional language aimed at full-blown C99 preprocessor metaprogramming.
It features a wide range of concepts, including algebraic data types, control flow operators, collections, recursion, and auto-currying -- to develop both small and complex metaprograms painlessly.

TimoVJL

Quote from: daydreamer on August 29, 2021, 01:58:42 AM
SendMessage several things becomes very long to write
commctrl.h#define TreeView_GetItemPartRect(hwnd,hitem,prc,partid) do { TVGETITEMPARTRECTINFO info; info.hti = (hitem); info.prc = (prc); info.partID = (partid); (BOOL)SNDMSG((hwnd),TVM_GETITEMPARTRECT,0,(LPARAM)&info); } while (0)
May the source be with you

daydreamer

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding