首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

关于去掉网格刻度背景有关问题

2012-04-05 
关于去掉网格刻度背景问题?我绘制完了一个网格,现在在每个网格对应的位置上写刻度,但是刻度值的背景是白色

关于去掉网格刻度背景问题?
我绘制完了一个网格,现在在每个网格对应的位置上写刻度,但是刻度值的背景是白色的,我想让刻度值的背景跟窗口界面的背景一样,既白色背景变成透明,下面是我写X轴刻度值的代码。各位帮帮忙,最好能给些代码来。
先谢谢了!!
/*写X轴刻度值*/
                  CString   str;
str.Format( "0 ");
pDC-> TextOut(35,   305,   str);
str.Format( "50 ");
pDC-> TextOut(90,   313,   str);
str.Format( "100 ");
pDC-> TextOut(140,   313,   str);
str.Format( "150 ");
pDC-> TextOut(190,   313,   str);
str.Format( "200 ");
pDC-> TextOut(240,   313,   str);
str.Format( "250 ");
pDC-> TextOut(290,   313,   str);
                  str.Format( "300 ");
pDC-> TextOut(340,   313,   str);
str.Format( "350 ");
pDC-> TextOut(390,   313,   str);
str.Format( "400 ");
pDC-> TextOut(440,   313,   str);
str.Format( "450 ");
pDC-> TextOut(490,   313,   str);
str.Format( "500 ");
pDC-> TextOut(540,   313,   str);
str.Format( "550 ");
pDC-> TextOut(590,   313,   str);
str.Format( "600 ");
pDC-> TextOut(640,   313,   str);
str.Format( "650 ");
pDC-> TextOut(690,   313,   str);
str.Format( "700 ");
pDC-> TextOut(740,   313,   str);
str.Format( "750 ");
pDC-> TextOut(790,   313,   str);
str.Format( "800 ");
pDC-> TextOut(840,   313,   str);
str.Format( "t   (毫秒) ");
pDC-> TextOut(872,   320,   str);

[解决办法]
pDC-> SetBkMode(TRANSPARENT);

热点排行