Preprocessor Directives in MFC Applications
I have defined a preprocessor define #SHOW_LJ_DATA in my project settings. In another .h file, I have the following:
Now here's the situation. I have two dialogs within one MFC application. One is called LJDlg and the other one is called NAPIEDlg. Depending on which dialog is opened, as you can see from this code, I select one port versus another to create sockets with (so that both windows can be opened at the same time). Problem is, I can't just define both #SHOW_LJ_DATA and #SHOW_NAPIE_DATA as a macro for that one project. If I do that, then it will always default to SHOW_LJ_DATA and therefore the wrong port number for the NAPIEDlg. I really don't want to have to move the NAPIE stuff to another application as it is a complete pain in the ass to do. Thanks for any help.
#define LJ_DATA_SERVER_PORT_NUM 5003
#define NAPIE_DATA_SERVER_PORT_NUM 5004
#define SIOC_SERVER_PORT_NUM LJ_DATA_SERVER_PORT_NUM
#define SIOC_SERVER_PORT_NUM NAPIE_DATA_SERVER_PORT_NUM
#define SIOC_SERVER_PORT_NUM 5002