Define User Macro

I use GetDlgItem(hwnd,id_control) quite a bit.

How could I #define a macro so that instead of writing all of that out, I could simply say something like --

SPECWINDOW(hwnd,id_control)

where the hwnd and id_control parameters would be entered by me each time.

IOW, the SPECWINDOW would simply replace GetDlgItem of my code?
#define SPECWINDOW GetDlgItem
Though I'm not sure why you'd want to do this, it's barely a difference for typing.
Last edited on
Thanks. I was just using that as an example. I will probably want to do more complicated #defines, but I want to know how to do it if I need to.
Topic archived. No new replies allowed.