|
-
December 2nd, 2003, 10:13 PM
#1
How can I make a dialog NOMOVE?
How can I make a dialog NOMOVE? When you drag mouse on titlebar, the dialog do not move.
-
December 3rd, 2003, 01:04 AM
#2
If its a dialog you created through the resource editor, in its create function (or similar) try something like:
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
or, just get rid of the title bar and use something else in its stead
Microsoft LVP - Least Valuable Professional
Please rate this post... Pleeeeeeaaassee!!! 
-
December 3rd, 2003, 01:20 AM
#3
PHP Code:
UINT CYOURDialog::OnNcHitTest(CPoint point)
{
UINT ret = CDialog::OnNcHitTest(point);
if(HTCAPTION == ret)
return HTCLIENT;
return ret;
}
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
December 3rd, 2003, 01:24 AM
#4
What I know about it you can remove the caption - that's the window style you can remove it using ModifyStyle function. Or if you like the caption you can play with WM_SIZE or better with WM_WINDOWPOSCHANGED, WM_WINDOWPOSCHANGING. You can add:
BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
//{{AFX_MSG_MAP(CTestDlg)
ON_WM_WINDOWPOSCHANGED()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
and so on. You can find this macros(ON_WM_WINDOWPOSCHANGED) in MSDN to take the message handler prototype from there, something like afx_msg LRESULT OnWindowPosChanged(LPWINDOWPOSSTRUCT ... - sorry, I never remember such things and always copy them from MSDN topics.
Good luck
-
December 3rd, 2003, 01:36 AM
#5
I have already posted the simplest way to do it.
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
December 3rd, 2003, 08:20 PM
#6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|