ON_UPDATE_COMMAND_UI(EXE_BUTTON_RESOURCE, OnUpdateExeButtonResource)
void EXE::OnUpdateExeButtonResource(CCmdUI* pCmdUI)
{
pCmdUI->Enable(exe_flag);
}
This EXE application will load another DLL class.
DLL class is having a menu item resource with ID DLL_MENU_RESOURCE.
Unfortunately, EXE_BUTTON_RESOURCE and DLL_MENU_RESOURCE is having the
same resource ID. To avoid them have conflict ID is pretty difficult,
as they are two separate projects.
Whenever exe_flag, which is the member for EXE turn to false, this
will affect menu in DLL too. Clicking on DLL_MENU_RESOURCE menu will
have no effect at all.
How can I avoid this trap? Having manual inspection on their
resource.h files is not an option for me, as they are 2 separate
projects, managed by 2 separate teams.
This is a known limitation of Visual Studio. It is necessary to
manage the teams' usage of ID numbers so they do not overlap.