How can I remove icon from windows title bar without ditching close button?
int clickX = GET_X_LPARAM(lParam);
int clickY = GET_Y_LPARAM(lParam);
CRect frameRect;
mainFrame.GetWindowRect(&frameRect);
int titleBarHeight = GetSystemMetrics(SM_CYCAPTION);
if (clickX >= frameRect.left &&
clickX <= frameRect.right &&
clickY >= frameRect.top &&
clickY <= frameRect.top + titleBarHeight)
{
TrackPopupMenu(m_systemMenu);
}
Tags: c++ windows user-interface mfc
Source: By as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- How do I use the C socket API in C++ on Linux?
- Embedding Windows Media Player for all browsers. Will help in making it portable.
- Register Windows program with mailto protocol programmatically.
- How do I see preview JPEG file of PDF on Windows?
- What are the best ways to access Exchange using PHP?
- Visual Studio Setup Project - Per User Registry Settings.
- What is the best file copy alternative than the Windows defaults?
- How can I retrieve a windows filename?
- What's the difference between MVC and MVP?
- How do I map Streams in C#. Mapping Streams to Data Structures in C#: Can I understand the structure of Streams?
- How do I install Debian in Windows?
- How do I capture TAB key in text box?
- How do I create a tree view preferences dialog?
- Windows Equivalent of 'nice'.
- How do you create a sparse array?