Location:
Search - DefWindowProc
Search list
Description: ①、重载对话框的消息函数:
void OnNcLButtonDown(UINT nHitTest, CPoint point)
//单击标题栏时是响应 void OnNcMouseMove(UINT nHitTest, CPoint point)
//Mous 在标题移动时响应 LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
②、添加关键成员函数为:BOOL DrawTitleBar(CDC *pDC)
③、添加完消息涵数后,在.cpp中实现它们的代码(点击查看代码附件):
好了运行你的序程,即可出现漂亮的界面。说明在设计对话框时最好只选上Title Bars,其它不要.消息函数要手动添加。只本程序是在VC++6.0 +WinXP环境下完成的。
经过实践证明,仅仅画一个窗口很容易,多窗口程序软件实现统一风格很难。如若有机会的话,我会和大家继续探讨如何将设计好的漂亮窗口子类化,让程序所有的窗口有统一风格,美化窗口的其它控件并可自动随窗口改变而调整大小。我想那才是我们大家关心的。对不?
Platform: |
Size: 1260276 |
Author: sailor |
Hits:
Description:
LoadLibrary GetProcAddress FreeLibrary LocalFree GetVersionEx CloseHandle MapViewOfFile UnmapViewOfFile ExitProcess SetUnhandledExceptionFilter CWinApp OpenMutex CreateMutex CreateThread DeviceIoControl CString GetLogicalDrives GetDriveType CreateFile GetSystemDirectory FindFirstFile GetLastError CopyFile FindClose Sleep CDialog CDataExchange CWnd DestroyIcon LoadIcon GetSystemMenu CMenu LoadString AppendMenu IsIconic CPaintDC SendMessage GetSystemMetrics CRect GetClientRect DrawIcon DefWindowProc ShowWindow
Platform: |
Size: 10214 |
Author: 王中才 |
Hits:
Description: Rectangle GetDC SetROP2 ReleaseDC CreateRectRgn SelectClipRgn DeleteObject SelectObject CreatePen CreateSolidBrush SetTextColor SetBkColor SetRect LockResource UnlockResource GetCursor LoadCursor GetStockObject LineTo SetCursor ShowCursor DrawText LoadString MessageBox CreateFontIndirect GetTextMetrics ClientToScreen SetCursorPos GetMessageTime GetKeyState GetClientRect SetWindowPos BeginPaint EndPaint DefWindowProc
Platform: |
Size: 95919 |
Author: 安新军 |
Hits:
Description: ①、重载对话框的消息函数:
void OnNcLButtonDown(UINT nHitTest, CPoint point)
//单击标题栏时是响应 void OnNcMouseMove(UINT nHitTest, CPoint point)
//Mous 在标题移动时响应 LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
②、添加关键成员函数为:BOOL DrawTitleBar(CDC *pDC)
③、添加完消息涵数后,在.cpp中实现它们的代码(点击查看代码附件):
好了运行你的序程,即可出现漂亮的界面。说明在设计对话框时最好只选上Title Bars,其它不要.消息函数要手动添加。只本程序是在VC++6.0 +WinXP环境下完成的。
经过实践证明,仅仅画一个窗口很容易,多窗口程序软件实现统一风格很难。如若有机会的话,我会和大家继续探讨如何将设计好的漂亮窗口子类化,让程序所有的窗口有统一风格,美化窗口的其它控件并可自动随窗口改变而调整大小。我想那才是我们大家关心的。对不?
-err
Platform: |
Size: 1259520 |
Author: sailor |
Hits:
Description: Rectangle GetDC SetROP2 ReleaseDC CreateRectRgn SelectClipRgn DeleteObject SelectObject CreatePen CreateSolidBrush SetTextColor SetBkColor SetRect LockResource UnlockResource GetCursor LoadCursor GetStockObject LineTo SetCursor ShowCursor DrawText LoadString MessageBox CreateFontIndirect GetTextMetrics ClientToScreen SetCursorPos GetMessageTime GetKeyState GetClientRect SetWindowPos BeginPaint EndPaint DefWindowProc
Platform: |
Size: 2931712 |
Author: 安新军 |
Hits:
Description: 怎么才能使主界面一启动就隐藏窗口
对话框
可以在对话框中重载虚函数DefWindowProc[]。
LRESULT CMyDlg::DefWindowProc[UINT message, WPARAM wParam, LPARAM lParam]
{
if[message==133]
ShowWindow[SW_HIDE]
return CDialog::DefWindowProc[message, wParam, lParam]
}
框架
BOOL CMainFrame::PreCreateWindow[CREATESTRUCT& cs]
{
cs.style=WS_POPUO //使得主界面不可见
cs.dwExStyle |= WS_EX_TOOLWINDOW //不显示任务按钮
if[ !CFrameWnd::PreCreateWindow[cs] ]
return FALSE
return TRUE
}
-How to make one start on the main interface window of the dialog box can be hidden in the dialog box overloaded virtual function DefWindowProc []. LRESULT CMyDlg:: DefWindowProc [UINT message, WPARAM wParam, LPARAM lParam] [if [message == 133] ShowWindow [SW_HIDE] return CDialog:: DefWindowProc [message, wParam, lParam] ] framework BOOL CMainFrame:: PreCreateWindow [CREATESTRUCT & cs] [cs.style = WS_POPUO // enable the main interface is not visible cs.dwExStyle | = WS_EX_TOOLWINDOW // mission button is not displayed if [! CFrameWnd:: PreCreateWindow [cs]] return FALSE return TRUE ]
Platform: |
Size: 36864 |
Author: piit_9 |
Hits:
Description: 用C++实现的计算机图形中的种子填充算法,对学习编程和计算机图形学的很有帮助.-LoadIcon LoadCursor RegisterClass MessageBox CreateWindow ShowWindow UpdateWindow GetMessage TranslateMessage DispatchMessage SetPixel GetPixel InvalidateRect BeginPaint EndPaint PostQuitMessage DefWindowProc
Platform: |
Size: 38912 |
Author: yxs |
Hits: