丰满人妻一区二区三区无码AV|国产乱色国产精品免费视频|国产精品一区二区不卡的视频|2020精品国产福利在线观看香蕉

    1. <rp id="2o2at"><nav id="2o2at"></nav></rp>
      
      

      <rt id="2o2at"></rt>
      <ruby id="2o2at"><nav id="2o2at"></nav></ruby>

    2. <rp id="2o2at"><meter id="2o2at"></meter></rp>

        <tt id="2o2at"><form id="2o2at"></form></tt>

      1. <source id="2o2at"></source>

          首頁 > 編程 > Java > 正文

          制作透明窗體

          2019-09-06 23:33:16
          字體:
          來源:轉載
          供稿:網友

                              1.重載CreateParams函數,設置透明風格
          2.然后重載它的WM_ERASEBKGND消息。
          代碼片段:

          .h File
          class TYourForm:public TForm
          {
          private:
          /tvoid __fastcall WMNC(TMessage &Message);
          public:
          /t__fastcall TYourForm(TComponent *Owner);
          /tBEGIN_MESSAGE_MAP
          /t  VCL_MESSAGE_HANDLER(WM_ERASEBKGND,TMessage,WMNC);
          /tEND_MESSAGE_MAP(TForm);
          protected:
          /tvirtual void __fastcall CreateParams(TCreateParams &Params);
          }


          .cpp File

          void __fastcall TYourForm::CreateParams(TCreateParams &Params)
          {
           TForm::CreateParams(Params);
           Params.EX_STYLE|=WS_EX_TRANSPARENT;
          }
          void __fastcall TYourForm::WMNC(TMessage &Message)
          {
           SetBkMode(GetWindowDC(this->Handle),OPAQUE);
           ReleaseDC(this->Handle,GetWindowDC(this->Handle)) ;
           Messgae.Result=1;
          }
          發表評論 共有條評論
          用戶名: 密碼:
          驗證碼: 匿名發表
          1. <rp id="2o2at"><nav id="2o2at"></nav></rp>
            
            

            <rt id="2o2at"></rt>
            <ruby id="2o2at"><nav id="2o2at"></nav></ruby>

          2. <rp id="2o2at"><meter id="2o2at"></meter></rp>

              <tt id="2o2at"><form id="2o2at"></form></tt>

            1. <source id="2o2at"></source>