|
int SetAcadBackgroundColorTo(unsigned long colModel, unsigned long colLayout, unsigned long &oldColModel, unsigned long &oldColModel3d, unsigned long &oldColLayout)
{
AcColorSettings ColorSettings;
BOOL bStat=0;
bStat = acedGetCurrentColors(&ColorSettings);
oldColModel = ColorSettings.dwGfxModelBkColor;
oldColLayout = ColorSettings.dwGfxLayoutBkColor;
oldColModel3d = ColorSettings.dwParallelBkColor;
ColorSettings.dwGfxModelBkColor = colModel; // 2D-Wireframe background color
ColorSettings.dwParallelBkColor = colModel; // 3D-VisuStyle background color
ColorSettings.dwGfxLayoutBkColor = colLayout;
if (oldColModel != ColorSettings.dwGfxModelBkColor || oldColLayout != ColorSettings.dwGfxLayoutBkColor || oldColModel3d != ColorSettings.dwParallelBkColor)
{
if (bStat = acedSetCurrentColors(&ColorSettings))
bStat = acedColorSettingsChanged(TRUE, TRUE, TRUE);
}
return (int)bStat;
}
int SetAcadBackgroundColorWhite(unsigned long &oldColModel, unsigned long &oldColModel3d, unsigned long &oldColLayout)
{
DWORD white=(unsigned long)RGB(0xff, 0xff, 0xff);
return SetAcadBackgroundColorTo(white, white, oldColModel, oldColModel3d, oldColLayout);
} |
|