I've found two tutorials on how to drag a window from a custom title bar.. the problem is.. none of the tutorials work.
The first tutorial.. found on Catch22.com's website..
tells me that I need to handle the WM_NCHITEST event.. and have it to return the value of HTCAPTION to signify the caption bar was clicked.
The problem is.. if I attempt to handle any portion of the WM_NCHITEST event.. my screen freezes.. and I am unable to perform ANY actions on the window.. not even clicks.. or mouse movements.
Here is some sample code I used to try to handle the WM_NCHITEST event:
case WM_NCHITTEST:
if (mouseclicked == true)
{return HTCAPTION;}
break;
Also.. on another tutorial found at
http://www.flipcode.com/archives/Win...Skinning.shtml
I was told that if sent the window message: SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION,NULL);
On a left mouse click.. the window would be fooled into believing that the caption bar was clicked.. and thusly begin to drag as though the caption bar WAS clicked. However.. the above method also.. did not work.
Does any one know why neither of the two window drag methods mentioned above.. worked?
Also.. can someone please offer up another suggestion as to how one would be able to drag a window (with a custom title bar) using Win32?