Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi! I want to implement this solution[^] in a C++ Windows Form. But there are differences in the syntax that I can't figure out. Can anyone help?
Posted
Comments
StoyanovZ 20-Mar-14 15:30pm    
Actually, the only thing that bothers me is

[DllImportAttribute("user32.dll")]
StoyanovZ 20-Mar-14 16:15pm    
To make it more clear - I'm currently using this and I don't like the way it works.
chaau 20-Mar-14 20:40pm    
Please note that both of these methods are just reinventing the wheel. Much simpler and better option is one that is described in the comment here: http://www.codeproject.com/Messages/4771552/My-vote-of-Useless-hack-to-solve-a-problem-that-al.aspx. Please research WM_NCHITTEST message, it is very easy to implement.
StoyanovZ 21-Mar-14 15:45pm    
Thanks! I found this thread. It does the job almost perfectly. Still there is one issue - I have a toolstrip which also acts like a titlebar for my form. I want to drag the form only if the event is captured by this toolstrip. If it's captured by the form itself(the only visible part of it is like a thin border), I want to be able to resize it. Right now, if I click on the toolstrip, nothing happens and at the same time, wherever I click on the form, it starts dragging.
StoyanovZ 24-Mar-14 14:38pm    
Anyone? :/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900