>>I need some way of hooking the mouse event when it right clicks on the window's taskbar button to display a popup menu
>>I need to still have the window menu
No need to hook mouse..... for titleless dialog/window just add WS_SYSMENU style on 'PreSubclassWindow()' handler.....
Something like this :
void CMyDlg::PreSubclassWindow(
{
// TODO: Add your specialized code here and/or call the base class
// Attach a system menu to this window
LONG lStyle = GetWindowLong( this->GetSafeHwnd(), GWL_STYLE );
SetWindowLong( this->GetSafeHwnd(), GWL_STYLE, lStyle | WS_SYSMENU );
CDialog::PreSubclassWindow
}
This will invoke system menu when you right click on window's taskbar button .
-MAHESH
Main Topics
Browse All Topics





by: bdunz19Posted on 2007-01-05 at 15:12:52ID: 18255656
Also, now that I think about it, keeping the buttons from being drawn at all would work to, but I don't know where that is done either as it does not apear to be in WM_NCPAINT. Just a thought...