AnimateWindow bug???

i am trying to hide the window after the AnimateWindow 
function has been called however after the animation has 
taken place the window does not hide despite the call to 
ShowWindow(SW_HIDE) any ideas how i should do this. The 
code is as below:


void CMyApplicationDlg::OnSysCommand(UINT nID, LPARAM 
lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else if( (nID & 0xFFF0) == SC_MINIMIZE )
{
//add the icon to the taskbar 
Shell_NotifyIcon(NIM_ADD,pNotifyIconData);

//do slide animation here
AnimateWindow(m_hWnd,500,AW_HIDE | AW_SLIDE | 
AW_VER_POSITIVE);

//hide the current window
this->ShowWindow(SW_HIDE);

//i've tried this too
ModifyStyle(WS_VISIBLE,0)

}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
0
fad97 (1)
7/23/2003 10:53:04 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
771 Views

Similar Articles

[PageSpeed] 24

Reply:

Similar Artilces:

AnimateWindow
Hi. MSDN informs that, AnimateWindow function is available in Windows 98(I have included the required file) , but in my MFC app Debuger informs: undeclared identifier! What`s problem? Thanks! Hello, you checks the required library file ( *.lib). Regards, R.Selvam >-----Original Message----- >Hi. >MSDN informs that, AnimateWindow function is available in >Windows 98(I have included the required file) , but in my >MFC app Debuger informs: undeclared identifier! >What`s problem? >Thanks! > > >. > If you look at the declaration of AnimateWindow in winu...

Bug in COM Interop Sample?
I'm trying to run the sample program used to demonstrate Exposing .NET Framework Components to COM. (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcominteropsamplecomclientnetserver.asp). The application is crashing when it attempts to instantiate the COM ptr. Anyone have any experience with this sample, or this topic? Any idea what's going wrong here? ...

Microsoft Bug?
I'm reporting a weird problem... either in MFC or Remote Desktop (both belongs to Microsoft) I have this simple MFC code which draw a red ellipse (circle) and green background color. When view directly through local machine, it's okay. However when viewed through Remote Desktop Control (of the same color resolution), the background color overfill beyond the circle boundary. You could see this clearly in image.bmp The problem don't exist if - Viewed through VNC Viewer - Draw a rectangle instead of the same size - Draw the ellipse bigger Since I can't post any attachment...

Money 2004 bugs
I have just spent a rather unpleasant hour with Money 2004 doing a task that used to take me 15 minutes with Quicken -- downloading and categorizing my MBNA credit card statement. Problem 1: if you have multiple uncategorized transactions in the download with exactly the same payee, when you enter the category for the first, the other transactions don't inherit this information. You have to enter it for each (not so in Quicken). Problem 2: sometimes when you display a transaction for categorizing, the payee line is doubled, as is the line with the accept and enter buttons. Problem 3: Mo...

Bug or feature?
The first returns an empty string as expected but the second is null. Is this a bug or feature? SELECT RIGHT('ABC', 0) SELECT RIGHT(CAST('ABC' AS VARCHAR(MAX)), 0) Cheers, Michael On Tue, 30 Mar 2010 16:35:02 +1100, "Michael C" <mike@nospam.com> wrote: >The first returns an empty string as expected but the second is null. Is >this a bug or feature? > >SELECT RIGHT('ABC', 0) >SELECT RIGHT(CAST('ABC' AS VARCHAR(MAX)), 0) > >Cheers, >Michael > You don't say which version you are on, bu...

Pub2003 Bug: Right aligned tabs must be smaller than width of text box
I have a Publisher 2003 Trial, and found an issue that drives me crazy. In a text box a right-aligned tab must be at least 0.02" from the right border of the box. Try the following: 1) create a text box of size, say 3" x 1" 2) make sure all text box margins are set to 0" (right-click -> Format Text Box, select tab Text Box) 3) type two words separated with a single tab; the goal is now to have the first word flush left and the other flush right with the edges of the box 4) change the tabs (right-click -> Change Text -> Tabs...) by introducing a single, right-ali...

weird Contacts/email bug, but definitely a bug (OL2003)
Don't need any help, just posting this as a bug in the hope it gets fixed sometime. In the Contacts folder (phone list view), I copied Contact A's entry, pasted it, changed the name to Contact B and updated a bunch of contact items like email. All looked totally fine. But then I sent an email to both Contact A and Contact B, and when I received the bcc to myself, the To: box showed Contact B twice. I composed a new email to Contact A and Contact B. The email addressess looked good in the To: line (looked like "John Doe (john@doe.com)" which **looks** right), but ...

Windows 7 bug with ID3 v2.3 interpreter
There seems to be a bug in the Windows 7 ID3v2.3 interpreter that occurs for all ID3v2.3 tags of more than 10 Mbytes. When encountering such files, windows 7 explorer hangs for minutes on the files. The delay times of the explorer increases with the ID3 tag size. This can affect files with uncompressed album arts or mp3HD files, which have large id3 tags. Can anyone at Microsoft look at this? Thanks On Wed, 2 Dec 2009 10:11:01 -0800, fairmetoo <fairmetoo@discussions.microsoft.com> wrote: > >There seems to be a bug in the Windows 7 ID3v2.3 interpreter that occu...

Bug in CImageList::DrawIndirect in MFC Version 8
The size of the IMAGELISTDRAWPARAMS struct (defined in CommCtrl.h) depends statically on the value of WINVER. However, CImageList::DrawIndirect overrides the value of the cbSize member according to the runtime version of Comctl32.dll. This messes up the display of images on XP and Vista, when WINVER is set to 0x0500 - as required for applications that can also run on Windows 2000. A workaround is to set imdlp.cbSize to sizeof(IMAGELISTDRAWPARAMS), then call AfxImageList_DrawIndirect(&imldp) instead. > The size of the IMAGELISTDRAWPARAMS struct (defined in CommCtrl.h) depends...

AnimateWindow bug???
i am trying to hide the window after the AnimateWindow function has been called however after the animation has taken place the window does not hide despite the call to ShowWindow(SW_HIDE) any ideas how i should do this. The code is as below: void CMyApplicationDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout; dlgAbout.DoModal(); } else if( (nID & 0xFFF0) == SC_MINIMIZE ) { //add the icon to the taskbar Shell_NotifyIcon(NIM_ADD,pNotifyIconData); //do slide animation here AnimateWindow(m_hWnd,500,AW_HIDE | AW_SLIDE | AW_VER_...

Bugs in documentation of CEdit::LineLength
In both of these pages http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_CEdit.3a3a.LineLength.asp and http://msdn.microsoft.com/library/ja/default.asp?url=/library/ja/vclib/html/_mfc_CEdit.3a3a.LineLength.asp MSDN says that the argument is counted in characters but the return value is counted in bytes. In each page there is one erroneous statement about the argument and two erroneous statements about the return value, so this is a total of 6 bugs. As far as I can tell, both the argument and the return value are counted in TCHARs. In an ANSI compilation, the a...

Having Problems with AnimateWindow
hi I want to hide my application on certain conditions when the application is minimized. Till now i was using ShowWindow to achieve this and it worked fine. Now when I am using the AnimateWindow API the window gets hidden but the window's entry in the taskbar remains. I am posting the code that i have written. void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == SC_MINIMIZE) { if(bMinimizeToTray) { this->AnimateWindow(200,AW_HIDE |AW_SLIDE | AW_VER_POSITIVE); // this->ShowWindow(SW_HIDE); return; } } CFrameW...

BUG in 2007
put in 850 in a1 in b1 through b10 put in 77, 77.1, 77.2,77.3 etc in c1 put =$a$1*b1 and fill down through c10 line graph c1:c10 - it is linear copy c1:c10 - paste special (value) -- still linear type in 100000 into b2 (where the 100000) was now it is not linear..... I think that bug was first reported here a couple of days ago, in this particular newsgroup -- Regards, Peo Sjoblom <bwjames9301@gmail.com> wrote in message news:1190733103.579960.250010@g4g2000hsf.googlegroups.com... > put in 850 in a1 > in b1 through b10 put in 77, 77.1, 77.2,77.3 etc > in c1 put =...

CreateNewDesktop bug
Does anybody know why the following happens? -> I create a new desktop, switch to it and load my main form. The form is shown in a maximized state (set by the properties editor at design time). The strange thing is that the form is displayed as if there was a taskbar... It stops about 20 pixels over the bottom. Normalizing and maximizing it again does not change anything... the form is always displayed as if there was a taskbar. A form without a border does not have this problem. Does anybody know why this might be happening? Wild ideas welcome, I already spent about...

Windows 98 and CRichEditCtrl bug?
I am currently having problems trying to catch the MouseMove messages in Win98 in a CRichEditCtrl while the left mouse button is pressed. In Windows 2k/XP the message handler works just fine, but in Win98 it never catches the MouseMove message. I have tried using the Spy Tool to view the messages and I see none. Setting the options to "All Windows" and filtering all but mouse messages, once the mouse button is pressed, all mouse messages stop. Strangely enough, if I select to see all message and if I hold down the mouse long enough, all messages stop. It is as if pressing the mouse ...

Is it a bug?
ROUND(((2226-123.36-39.34-303)-1600)*0.05, 2) == 8.01 No. If you increase the DP to about 10 DP without the ROUND Function you will see the answer is 8.014999999999900 ROUND rounds it up to 8.01 Gord Dibben MS Excel MVP On Mon, 10 Dec 2007 08:45:26 +0800, "Cai Bing Lin" <half_worm{at} 163.com> wrote: >ROUND(((2226-123.36-39.34-303)-1600)*0.05, 2) == 8.01 > thank you . But when I use VBA. It will be 8.02? why? To 13 decimal places without the Round function (((2226-123.36-39.34-303)-1600)*0.05) is 8.0150000000000 "Gord Dibben" <gorddibbAT...

Reminder resets...Bug or design?
In Outlook 2003 with BCM, when I go into Calendar, it seems the order in which things are clicked can cause some "resetting" like this... SEQUENCE#1 Click New Appointment > set reminder to 2 weeks > see it has defaulted to 8am > so I check [x]All Day... it *resets the reminder to 18 hours*. This doesn't seem right. SEQUENCE#2 If I click New Appointment > check [x]All Day to override 8am > then set reminder to 2 weeks ... all is ok Should the order in which things are checked/set really matter? Thanks This is normal behavior. The default reminder for al...

Bug In Outlook 2003?
When you respond, forward, etc. a message Outlook tags it so when you open the message it says "You forwarded/responded this message. Click here to find all related messages." However, if you file the message away into a folder, that "flag" disappears. How do we keep that flag? Obviously we don't want to keep all of our messages in our inbox for all time. Best, -Auri Rahimzadeh You mean when you file it to e.g. a subfolder of the Inbox? The information bar sticks with me. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Navigation ...

Fonction API AnimateWindow dans VBA appliqu� � Excel
Bonjour, Quelqu'un peut-il me dire pr�cis�ment quel code utiliser pour me servir de cette fonction API? J'ai cherch�, mais cela ne marche pas ou bien je n'ai pas compris. D'avance merci, Jean-michel news://msnews.microsoft.com/microsoft.public.fr.excel -- John johnf202 at hotmail dot com "imej-clavier" <imej-clavier@wanadoo.fr> wrote in message news:4177a4d2$0$31731$8fcfb975@news.wanadoo.fr... > Bonjour, > Quelqu'un peut-il me dire pr�cis�ment quel code ut...

Bug in Excel 2007. Impossible to add new data to exsiting chart ??
Gentlemen, I have an existing Excel file (Office 2003) that we opened in Excel 2007. No compatibility problem were found. The date page (Salesdata) consist of two columns A4 to A186 (Date format from April1993 until July2008 ) and B4 to B186 (Sales/normal value data April1993 until July 2008) Next there are 12 charts (January until December) Each chart contains the month value of each year. Example, The March chart contains the data from March 1994 until April 2007. Problem/Bug: When we try to add the data of March 2008 (A183:B183) to the chart March it doesn't work ???? We made a cop...

Project Accounting
1. create an U of M with 2 level of measurement (eg: DOZEN=12 PC) 2. create an Item (eg: itemX) with U of M, assign above U of M 3. create a project with project type=FIXED PRICE 4. enter itemX as a buget item of this project, enter 2 lines, one for PC and one for DOZEN 5. Enter a project inventory transfer for this project, cost category and item 6. after specifying/selecting the U of M (either PC or DOZEN), message pop out: you can change the U of M of Fixed Price/Cost Price project type is this a limitation or bug? any work-around? ...

Money 2004 bug or feature?
Money 2004 is my first exposure to the MS Money. I not only backup to my HD, I also back up to a removeable disk. Whenever I backup to the removeable disk, I can't eject the medium until I bring up the backup dialog and change the backup location away from the removeable disk. With Quicken 6, once I backup, the program is done with the removeable disk and I can eject without having to redirect the backup location. Is this a feature or bug in Money? "Dick Watson" <littlegreengecko@mindspring.com> wrote in message news:<e#plsBucDHA.2112@TK2MSFTNGP10.phx.gbl>... > ...

Hidden ActiveX gets focus
Hi, i have a MFC CDialog that contains several controls and ActiveX'es. Depending on the configuration of the dialog, I have to hide an ActiveX (I tried different ways like ::ShowWindow(...) or ::SetWindowPos(...) etc. to do that). The ActiveX gets hidden as it should. Let's say, I have the following tab order: Edit1 (ActiveX) - Edit2 (ActiveX, hidden) - Button - Edit3 (ActiveX, hidden) I jump from control to control by pressing the tab-key. What I expect is that the focus jumps from Edit1 to Button and back to Edit1 and so on. But.... What really happens is that: - Edit1 is foc...

Need opinion about GUI design / OS behavior bug...
I work on a highly customized GUI app, and I had my boss complain about the (undefined) behavior of the caret (such as the one in an edit control, etc.) when menus (either context menus or the menu bar drop down menus) are brought up. At first we thought it was a bug in my custom GUI stuff, but then we looked at a bunch of other Windows apps, and the behavior in general seems to be undefined and inconsistent. What I'm talking about is the behavior of the flashing caret when menus are brought up. Normally the caret flashes on and off and if you pop up a modal dialog or the control l...

AnimateWindow function problem
hi I want to hide my application on certain conditions when the application is minimized. Till now i was using ShowWindow to achieve this and it worked fine. Now when I am using the AnimateWindow API the window gets hidden but the window's entry in the taskbar remains. I am posting the code that i have written. void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == SC_MINIMIZE) { if(bMinimizeToTray) { this->AnimateWindow(200,AW_HIDE |AW_SLIDE | AW_VER_POSITIVE); // this->ShowWindow(SW_HIDE); return; } } CFrameWnd::O...