当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 如题~ ......
    摘要: 在asp中,如何引用"(双引号) ,例如我把一个字符串中的"(双引号)替换成(单引号),请指点 ......


在xp下speedbutton的背景色问题

我在winxp下运行,发现speedbutton的down属性设了true以后,背景色变成了白色。  
  但是我希望它的背景色是灰的,怎么设。  
  我修改了speedbutton的winproc事件,当重画时,修改背景色为灰,但是不行。  
  如果down属性设为false,又可以。  
  请问是怎么回事?

NO.1   作者: duduwolf

当down=true时,speedbutton的背景色就自动变为他的parent的颜色了

NO.2   作者: jishiping

刚刚试了一下,看了一下效果和源程序,这样改写:  
  void   __fastcall   TMySpeedButton::WndProc(TMessage&   Msg)  
  {  
          TRect   Rect;  
          TControlCanvas*   Canvas;  
          Graphics::TBitmap*   Bmp;  
   
          TControl::WndProc(Msg);  
          if   (Msg.Msg!=WM_PAINT)   return;  
   
          Canvas   =   new   TControlCanvas;  
          Canvas->Control   =   this;  
          Bmp   =   new   Graphics::TBitmap;  
          Rect   =   this->ClientRect;  
          Bmp->Width   =   Rect.Width();  
          Bmp->Height   =   Rect.Height();  
          Bmp->Canvas->CopyRect(Rect,  
                  Canvas,   Rect);  
          Bmp->Transparent   =   true;  
          for(int   n=0;   n<2;   n++)   {  
                  if   (n==1   &&   !Btn->Down)   break;  
   
                  //对于Down的情形,需要做2次处理  
                  Bmp->TransparentColor   =     n==1   ?    
                          clBtnHighlight   :   clBtnFace;  
                  Canvas->Brush->Color   =   FColor;  
                  Canvas->FillRect(Rect);  
                  Canvas->Draw(Rect.left,   Rect.top,   Bmp);  
          }  
          delete   Bmp;     delete   Canvas;  
  }


    摘要: 数据库在独立的机器上,别指望向这台机器上载文件。 文件是通过webservice调用,插入到数据库中去的。 只要不用存储过程,怎么都行。 分多多。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE