Thank you for your replay.
"Joseph M. Newcomer" wrote:
Many things wrong below...
On Mon, 21 May 2007 02:17:01 -0700, Yael <Yael@discussions.microsoft.com> wrote:
Hi,
When I'm minimizing my mfc dialog, it's going to the left down corner and
disappear.
I want to see my dialog in minimize..
(I want to make the button in the taskbar from my app disappear when the
main-window is minimized.)
================ Start Code ================
void CListViewDlg:nSize(UINT nType, int cx, int cy)
{
CDialog:nSize(nType, cx, cy);
if ( nType == SIZE_MINIMIZED )
{
// Show a button in the taskbar
//I see my dialog minimized, but not in the taskbar, I see it on the left
corner up.
*****
First, say something more about this dialog. Is it a modeless dialog? Is it a
dialog-based app? What is it?
*****
SetWindowLong(this->m_hWnd, GWL_STYLE, GetWindowLong(m_hWnd, GWL_STYLE) &
! WS_OVERLAPPED);
*****
! does nothing useful, because it is a logical-not operator. You meant to use ~, which is
a bitwise op
Changing the style at this point has no effect, so this line is incorrect as written and
useless when corrected.
If you don't want it in the taskbar, you must hide it. ShowWindow(SW_HIDE) would be good.
For all other OnSize operations, do ShowWindow(SW_SHOW)
******
}
}
================ End Code ==================
Thank's,
Yael
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm