Define User Macro

Jul 14, 2011 at 12:13am
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?
Jul 14, 2011 at 1:16am
#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 Jul 14, 2011 at 1:16am
Jul 14, 2011 at 12:01pm
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.