Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to make a form non-moveable. Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Make a form non-moveable. 06-Jul-04
Category
Win API
Language
CBuilder 1.x
Views
509
User Rating
10
# Votes
1
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			1   
2   //-----------------------------UNIT1.H-------------------------------------
3   
4   #ifndef Unit1H
5   #define Unit1H
6   //---------------------------------------------------------------------------
7   #include <Classes.hpp>
8   #include <Controls.hpp>
9   #include <StdCtrls.hpp>
10  #include <Forms.hpp>
11  //---------------------------------------------------------------------------
12  class TForm1 : public TForm
13  {
14  __published:	// IDE-managed Components
15  private:	// User declarations
16   void __fastcall WMWindowPosChanging(TMessage &Message);
17  
18  public:		// User declarations
19          __fastcall TForm1(TComponent* Owner);
20              BEGIN_MESSAGE_MAP
21              VCL_MESSAGE_HANDLER(WM_WINDOWPOSCHANGING, TMessage,WMWindowPosChanging)
22              END_MESSAGE_MAP(TForm)
23  
24  };
25  //---------------------------------------------------------------------------
26  extern PACKAGE TForm1 *Form1;
27  //---------------------------------------------------------------------------
28  #endif
29  
30  
31  //-----------------------------UNIT1.CPP----------------------------------
32  #include <vcl.h>
33  #pragma hdrstop
34  
35  #include "Unit1.h"
36  //---------------------------------------------------------------------------
37  #pragma package(smart_init)
38  #pragma resource "*.dfm"
39  TForm1 *Form1;
40  //---------------------------------------------------------------------------
41  __fastcall TForm1::TForm1(TComponent* Owner)
42          : TForm(Owner)
43  {
44  }
45  //---------------------------------------------------------------------------
46  
47      void __fastcall TForm1::WMWindowPosChanging(TMessage &Message)
48      {
49          WINDOWPOS *wp = (WINDOWPOS*)Message.LParam;
50          wp->flags |= SWP_NOMOVE;
51          Message.Result = 0;
52      }
53  
54  


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC