Hello again!

I attempted to add the SW_HIDE and SW_SHOW to the app 
accordingly, however it did not hide the form/window.I am 
using Visual C++ .NET 2003 right now, and can someone 
email a project that uses the ShowWindow(SW_HIDE) and 
ShowWindow(SW_SHOW), to my email address which is 
straightwaytek at homail dot com
0
10/14/2003 3:18:53 AM
vc.mfc 33608 articles. 0 followers. Follow

9 Replies
520 Views

Similar Articles

[PageSpeed] 38

What are you trying to hide? Is it MDI or SDI? For MDI, if you want to hide the view, you
will need to hide the parent frame.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"James Simpson" <straightwaytek@hotmail.com> wrote in message
news:0d8001c39201$e5462d30$a101280a@phx.gbl...
| I attempted to add the SW_HIDE and SW_SHOW to the app
| accordingly, however it did not hide the form/window.I am
| using Visual C++ .NET 2003 right now, and can someone
| email a project that uses the ShowWindow(SW_HIDE) and
| ShowWindow(SW_SHOW), to my email address which is
| straightwaytek at homail dot com

0
ajaykalra (6840)
10/14/2003 4:42:05 AM
It's me James again,
I am using SDI.  I've tried the ShowWindow(SW_SHOW) to 
make a window popup, but that doesn't work, and I tried 
to do a ShowWindow(SW_HIDE) to a window I want to hide, 
but that doesn't seem to work either!  If someone can 
post a reply to help me, that would be great.
0
10/14/2003 4:49:56 AM
Well, sorry for not e-mailing this to you but if you ask here I prefer to
answer here.  It's only a guess but are you hiding the main window or a
child?  As I understand it you should be hiding the main window.  By
coincidence I just added show/hide and notify icon capability to a MFC SDI
app this evening, I've also done the same with a dialog app.  In my case I
wanted to hide on minimise and add a notify icon then on double click on the
notify icon I'd show the window and delete the notify icon.  My OnSize
(detects minimise) and OnLButtonDblClk (double click on the notify icon)
handlers look like this:

void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
    CFrameWnd::OnSize(nType, cx, cy);
    if (nType == SIZE_MINIMIZED)
    {
        // Hide our main window
        ShowWindow(SW_HIDE);
        // Create a notify icon
        NotifyIcon(NIM_ADD, AfxGetApp()->LoadIcon(IDR_MAINFRAME));
        m_Visible = false;
    }
    else
    {
        ShowWindow(SW_SHOW);
    }
}

void CMainFrame::OnLButtonDblClk(UINT nFlags, CPoint point)
{
    if (m_Visible)
    {
        CFrameWnd::OnLButtonDblClk(nFlags, point);
    }
    else
    {
        // Left button double click while hidden
        OnNotifyMenuOpen();
    }
}

void CMainFrame::OnNotifyMenuOpen()
{
    m_Visible = true;
    // Don't need the tray icon any more
    NotifyIcon(NIM_DELETE, NULL);

    // ShowWindow doesn't show a hidden window if you try to restore it and
it isn't minimised
    ShowWindow(SW_SHOW);
    ShowWindow(SW_RESTORE);
}

For the dialog case all of this functionality was in my CDialog derived
class.  In both cases the window hides when minimised and shows when the
notify icon is double clicked, just as expected.

"James Simpson" <straightwaytek@hotmail.com> wrote in message
news:0d8001c39201$e5462d30$a101280a@phx.gbl...
> I attempted to add the SW_HIDE and SW_SHOW to the app
> accordingly, however it did not hide the form/window.I am
> using Visual C++ .NET 2003 right now, and can someone
> email a project that uses the ShowWindow(SW_HIDE) and
> ShowWindow(SW_SHOW), to my email address which is
> straightwaytek at homail dot com


0
mairda (55)
10/14/2003 4:53:32 AM
What are you trying to hide? What type of window is it? Can you post the code?

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"James Simpson" <straightwaytek@hotmail.com> wrote in message
news:09e301c3920e$9d502aa0$a401280a@phx.gbl...
| It's me James again,
| I am using SDI.  I've tried the ShowWindow(SW_SHOW) to
| make a window popup, but that doesn't work, and I tried
| to do a ShowWindow(SW_HIDE) to a window I want to hide,
| but that doesn't seem to work either!  If someone can
| post a reply to help me, that would be great.

0
ajaykalra (6840)
10/14/2003 5:05:07 AM
I've tried yet again to implement the show and hide part 
of ShowWindows, but with no success whatsoever. I don't 
want to this to seem like asking too much, but I ask that 
someone can send me an exapmle of the ShowWindows command 
in a Visual C++ SDI project to assist me.  You can send 
this to me via my email address which is
straightwaytek at hotmail dot com 

Thanks in advance,
James Simpson
0
10/14/2003 5:09:28 AM
The type of application I need the code for is a SDI MFC 
Application which I am using Microsoft Visual C++ .NET 
2003 to make
0
10/14/2003 12:46:04 PM
AppWizard does this for you.  Create a SDI project, and note the code
contained in the app's InitInstance() method.  There's a big ShowWindow()
right there!  If that example does not answer your question, perhaps a
different question is in order.

"James Simpson" <straightwaytek@hotmail.com> wrote in message
news:0a0101c39211$57b9a770$a401280a@phx.gbl...
> I've tried yet again to implement the show and hide part
> of ShowWindows, but with no success whatsoever. I don't
> want to this to seem like asking too much, but I ask that
> someone can send me an exapmle of the ShowWindows command
> in a Visual C++ SDI project to assist me.  You can send
> this to me via my email address which is
> straightwaytek at hotmail dot com
>
> Thanks in advance,
> James Simpson


0
david.crow (132)
10/14/2003 2:14:03 PM
Are you trying to hide the SDI child window (the view) or the application's
main window?  That's pretty much three times someone has asked what type of
window you are trying to hide.  Please, you need to give us a better feel
for the context you are having the problem in, otherwise everything is a
guess.  FWIW, I don't think you can hide a SDI child using ShowWindow(), it
certainly didn't work when I accidentally put the code I posted last night
in the view rather than the main frame.

"James Simpson" <straightwaytek@hotmail.com> wrote in message
news:132601c39251$2132ced0$a101280a@phx.gbl...
> The type of application I need the code for is a SDI MFC
> Application which I am using Microsoft Visual C++ .NET
> 2003 to make


0
mairda (55)
10/14/2003 9:15:33 PM
Thank you David Crow for your comment. I finally figured 
out how to hide windows, and make them reappear, just 
like I wanted to.  Your advice is greatly appreciated, as 
your comment was the first answer that yielded any 
results.  Thanks to you, my app is almost ready for 
release.  

Sincerely,
James Simpson
0
anonymous (74725)
10/15/2003 1:41:09 AM
Reply:

Similar Artilces:

Hello again!
I attempted to add the SW_HIDE and SW_SHOW to the app accordingly, however it did not hide the form/window.I am using Visual C++ .NET 2003 right now, and can someone email a project that uses the ShowWindow(SW_HIDE) and ShowWindow(SW_SHOW), to my email address which is straightwaytek at homail dot com What are you trying to hide? Is it MDI or SDI? For MDI, if you want to hide the view, you will need to hide the parent frame. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "James Simpson" <straightwaytek@hotmail.com> wrote in message news:0d8001c39201$e5462d30$a101280a@p...

hello
hello, this is my first post. I have the dmeo of Microsoft retail management sofwtare and so far I like it. I run a retail store which sells all items under $2.00. we use around 40 to 50 suppliers. Basically all i want to do is be able to select a supplier from a list. see all the items they supply to we buy from that supplier. pick the items id like. place a purchase order. and when we recieve delivery recieve that purchase order and record my payment method. So far Microsft Retail Management POS has provided that for me. but the problem is for everythinbg to work i actually need to ...

hello
hello! ...

hello
hello i need help with out look!i cant sing up mail i dont know how to use mail and how to sing in it not let me do it.do u can help me please how to...? please send me aswer to my e mail double_bro@hotmail.com In news:806DFD44-B7DA-4381-8B93-67B152465846@microsoft.com, igor <igor@discussions.microsoft.com> typed: > hello i need help with out look!i cant sing up mail I can't teach you to sing, up or down, but do you perhaps mean "sign up" ? > i dont know how > to use mail and how to sing in it not let me do it.do u can help me > please how to...? Sorry, ...

HELLO
HIYA -- \m/ O_O \m/ Laura..... :) Liverpool, England Rock on =) -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35016 View this thread: http://www.excelforum.com/showthread.php?threadid=560202 ...

hello 08-06-10
I need help with my email in windows You haven't given us much to go on. Do you have an existing email address? If so, what is the part of your email address after the @ symbol? That part represents your mail service provider. Your mail provider will typically have a web page that shows how to set up an email program. If you need more help, tell us the name of your email service provider. If you currently don't have an email address, we can help with that also. Gary VanderMolen, Microsoft MVP (Mail) "jonny figueroa" wrote in message news:#uJrOLcNLHA.4824@TK2...

Hello #4
I have a spread sheet that is designed to track staff days off. Everyone has either Sunday, Monday, Tuesday or Thursday, Friday Saturday. On every 2nd week, a person will have a fourth day off being Wednesday. I have set my sheets to require if it is week 1 or week 2. And presently I have conditional formating used to shade the names of those off on their respective day. But I need to on the second week show the additional 4th day off. I have tried multiple lines in the format string, but I have no luck. Here is the formula I tried:=$AH$59="B"=$E$59="WEDNESDAY" Additio...

hello
fot testing ...

Hello from picasa
Does anyone know how to send movie files from picasa through Hello! It transfer them into jpg. and cannot be viewed You can't send movies using Hello. I use yousendit.com to send movie files to my friends. It's free. tabysbroom wrote: > Does anyone know how to send movie files from picasa through Hello! It > transfer them into jpg. and cannot be viewed ...

Hello all, I need help with an erased sheet!
Here's my problem: I use an excel sheet to complete daily work at my business, basically a balance sheet showing deposits, sales, etc. Rather than merely using the "Blank Sheet" file for the new month of Jan, the Dec06 file was opened, cleaned off and made ready for a new month of work. The issue with this is that he did not rename the file and saved the blank sheet as Dec06. The backup copy of this sheet is on a disk that, of course, is corrupted. I've spent 6 hours using various recovery programs and have only gotten pieces of a couple other months, and they aren't use...

hello?
There's something with my mail program. No send Is your account a "Yahoo PLUS" account (required). Check the Yahoo website for the instructions and settings to access it from Windows Mail, you may find instructions listed as for Outlook Express - those will work. If you choose to post back, please copy and paste the entire error message for more specific instructions. "Jim" <jimhappy2@yahoo.com> wrote in message news:#JFmeXozKHA.4752@TK2MSFTNGP04.phx.gbl... > There's something with my mail program. No send "Jim" <ji...

hello
Hello I am just testing my email account Posting to live newsgroups is NOT a good test. Do something else for a test next time! -- Bob Larson Access World Forums Super Moderator Utter Access VIP Tutorials at http://www.btabdevelopment.com __________________________________ If my post was helpful to you, please rate the post. "Naila Popal" wrote: > Hello > > I am just testing my email account > ...

Hello
We have an Exchange 2003 server with Sp1 on it. We are an ISP and host multiple domains on the server, we want to know if we can create a public calender for an organization which will enable them to use the public calender through either their Outlook clients or OWA. I have no idea on how to set this up, Any help is appreciated. Thanks, Venu Create a calendar in public folders they can access it either from there, or in OWA by going to https://domain/public and browsing to it. If it's company wide, you can create shortcuts on the desktop to them directly. Sincerely, Daniel Tate...

hello
I wank to ask you that I make 1 worksheet and then give page break and then i want to chnge in 2 page and i dontwant to any change in my 1st page. so what to do ...

hello! WTB SELL ME YOUR software OEM or Retail LARGE and SMALL QTY
WTB: MICROSOFT OEM SOFTWARE WTB: MS WIN 95, 98, 98SE, 2K, XP, OFFICE 2000, XP, 97, 95 PRO-Vista ultimate, basic, premium Small business.. Looks at the list below. Wanted to buy.. Microsoft OEM and RETAIL Software in small and large quantities. Buying in areas of 1-2000 or more! The more the better! Here is a partial list below. Email us with what you have! Office 2000 SBE Office 2000 PRO Office XP SBE Office XP PRO Office 2003 Office 2007 Pro, Ultimate Office 97 PRO Office 97 SBE WIN 95, 98, 98 SE, 2000 PRO and XP Windows 2000 Server Windows 2000 Server +5, 10 or 25 SBE Server 2...

Hello there
I am new on www.officefrustration.com so sorry in case i am posting in the inappropriate zone. I really like this forum a lot. It is very instructive and even surprisingly well done. Nice to meet you. -- fitflopsgc What you are seeing at officefrustration.com is questions and answers posted to the Microsoft-hosted newsgroups at msnews.microsoft.com. You can post directly to them using an NNTP newsreader or through the Communities at http://www.microsoft.com/communities/newsgroups/en-us/default.aspx -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fa...

Hello,
Hello, we have a legacy web application and we planning to use a CRM module in the future. We are studing the Microsoft CRM features and like it very much, but we have some doubts about login integration. In our web application, users login using and ID and Password located in a "user table" over a SQL Server database. MSCRM is Active Directory based so, how can we validate the users over this scenario? The idea is once the user is login-in an "click" to access the CRM module, not validation window appear again. I mean, we want to implement "single sign-on". ...

hello all
vc's new user ,hope all can help me thank Welcome, This newsgroup shall help you for MFC relate questions. If you are using the managed VC, there are other newsgroups which are better suited. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "zhulin" <zhuling@nandasoft-sh.com> wrote in message news:#phmhJS8DHA.1948@TK2MSFTNGP12.phx.gbl... | vc's new user ,hope all can help me | | thank ...

hello #2
Hello ,, this is checking mail .. ...

hello to all
is there a way to edit the status.htm to display transaction counts for this register? thanks As long as you have an understanding of JavaScript (or VB Script) and RMS' QS Rules this is not hard to do. If not it could get challenging. We've done this for our customers before so if you'd like a hand, please give my tech support team a call and we can help you out! Thank you, Ryan Sakry Program Manager rsakry@rite.us http://www.rite.us 320-230-2282 ext. 4002 (Office) 320-230-1796 (Fax) On 10/1/2010 7:39 AM, hozay wrote: > is there a way to edit the s...

hello
hello hellohellokjtrytrkjlytrkjlytkjlytrkjl ytr ytr yt try ty yt ...

HELLO #4
HIYA -- \m/ O_O \m/ Laura..... :) Liverpool, England ...

hello how are you
picture 046 wrote: <empty body = empty post = empty mind> Use a *.test newsgroup next time when testing whether or not you properly configured your newsreader (OE6). ...

Hello,
Hello, Does someone knows how to change the Titlebar. I like to see an other icon and titletext. Thanks a lo -- Teuntj ----------------------------------------------------------------------- Teuntje's Profile: http://www.msusenet.com/member.php?userid=80 View this thread: http://www.msusenet.com/t-187013673 One of these lines in a Workbook_Open sub may be what you want. Application.Caption = "Your Caption" 'changes before the dash. Application.Caption = "" 'shows nothing before the dash ActiveWindow.Caption = "Your Caption After Dash" '...

Microsoft Support
I run the latest patched version of Office 2004 on OS/X 10.4.5. I run Entourage which connects to my Exchange 2003 server, and Word/Excel etc with local storage which i replicate to the server using a third party (and troublesome) replication tool. There are a few problems with Office which are obvously bugs - but since the 10.4.5 update I have had issues with Entourage and time zones, culminating in a week where all my appointments were displayed an hour later than they were scheduled... The cause seems to a mismatch in timezones - OS/X and Win XP have an updated timezone for Australia for ...