BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

can someone change this delphi code to c++?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (WinAPI)
View previous topic :: View next topic  
Author Message
morz
Guest





PostPosted: Sun Feb 12, 2006 5:10 am    Post subject: can someone change this delphi code to c++? Reply with quote



procedure TForm1.WMNCHitTest(var Message: TMessage);
begin
inherited;
{cancel any sizing hit except HTLEFT}
if message.result in
[HTTOPLEFT,HTTOP,HTTOPRIGHT,HTRIGHT,HTBOTTOMRIGHT,
HTBOTTOM,HTBOTTOMLEFT] then
message.Result := HTCLIENT;
end;
Back to top
Perseid
Guest





PostPosted: Sun Feb 12, 2006 9:03 am    Post subject: Re: can someone change this delphi code to c++? Reply with quote



"morz" <blackrosezy (AT) gmail (DOT) com> Spat the Words

Quote:
procedure TForm1.WMNCHitTest(var Message: TMessage);
begin
inherited;
{cancel any sizing hit except HTLEFT}
if message.result in
[HTTOPLEFT,HTTOP,HTTOPRIGHT,HTRIGHT,HTBOTTOMRIGHT,
HTBOTTOM,HTBOTTOMLEFT] then
message.Result := HTCLIENT;
end;




Here's some code that does this.


class TForm1 : public TForm
{

private: // User declarations
void __fastcall MyWMNCHitTest(TMessage &Msg);

public: // User declarations

BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_NCHITTEST, TMessage, MyWMNCHitTest)
END_MESSAGE_MAP(TForm)

}


void __fastcall TForm1::MyWMNCHitTest(TMessage &Msg) {
Msg.Result=(int)DefWindowProc(Handle, Msg.Msg, Msg.WParam, Msg.LParam);
if (Msg.Result==HTBOTTOM || Msg.Result==HTBOTTOMLEFT ||
Msg.Result==HTBOTTOMRIGHT || Msg.Result==HTRIGHT ||
Msg.Result==HTTOPLEFT || Msg.Result==HTTOPRIGHT ||
Msg.Result==HTTOP)
Msg.Result=HTCLIENT;
}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (WinAPI) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.