| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 896 人关注过本帖
标题:一个月搞定,有一段程序不甚明了,求助高手 !!!
只看楼主 加入收藏
紫雨微云zhy
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-6-9
收藏
 问题点数:0 回复次数:1 
一个月搞定,有一段程序不甚明了,求助高手 !!!
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{ // if(Use_Window_Control)      Application->OnMessage = ProcessMessage ;
  CustomCaption = "软件";
  Caption = "";
  WindowCanvas = new TCanvas;
  // this code determines if we are running on NT3.X
  TOSVersionInfo ver;
  ver.dwOSVersionInfoSize = sizeof(TOSVersionInfo);
  GetVersionEx( &ver);
  if(ver.dwMajorVersion < 4)
    {
    // if the OS is NT 3.5, the custom caption won't be drawn
    // use the Caption property as usual, since the custom
    // caption won't be able to draw the string.
    IsNT35 = true;
    Caption = CustomCaption;
    }
  else   IsNT35 = false;
}
/*void __fastcall TForm1::WM_Not_Close (TMessage &message)
{
//message.Result=1; //禁止关机
TForm::Dispatch(&message);
}*/
void __fastcall TForm1::ProcessMessage (TMsg &message, bool &handled)
{ //去掉屏保两方法
  if (message.message == WM_SYSCOMMAND && message.wParam == SC_SCREENSAVE)
           handled = true ;
  else     handled = false ;
}
void __fastcall TForm1::WM_Screen_Start(TMessage &msg)
{
  if(msg.WParam!=SC_SCREENSAVE)
      TForm::Dispatch(&msg);
}

///&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
void __fastcall TForm1::WMNCActivate(TWMNCActivate &Msg)
{
  Msg.Result = true;              // always handle this message;
  if ((bool)Msg.Active == false)  // if non-active draw default
  {                               //  non-active title bar
    DefWindowProc( Handle, Msg.Msg, Msg.Active, 0 );
    // add code here to draw caption when window is inactive.
    // in this example, we leave the inactive caption alone.
    return;
  }
  TMessage PaintMsg;            // if active, do same thing as WMNCPaint
  PaintMsg.Msg    = Msg.Msg;    // create a MSG to pass to WMNCPaint and
  PaintMsg.WParam = Msg.Active; // call the function directly so painting
  WMNCPaint(PaintMsg);          // happens now.
}

搜索更多相关主题的帖子: property running custom 软件 
2010-06-09 16:02
快速回复:一个月搞定,有一段程序不甚明了,求助高手 !!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050438 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved