Interesting problem when hiding main window

I recently wrote a very small app that was heavily dependent upon some
of our custom libraries.  These libraries all assume a 'multiple
document' app but all I wanted was a simple dialogue.

Since I didn't want to rewrite all the libraries, I simply wrote a
'multiple document' app, 'hid' the main window (m_pMainWnd-
>ShowWindow(SW_HIDE) on startup, and then called a do.Modal to my
little dialogue box (which only had one button :)  well, two buttons,
if you include 'exit').

The problem is that 'SW_HIDE' also seems to not include a program icon
on the task bar; is there a way I can force this icon to be
'visible'?  Not a disaster if it can't be, but it would be nice.

Thanks.

0
djarvinen (31)
5/1/2007 11:44:29 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
558 Views

Similar Articles

[PageSpeed] 22

Call SetIcon (twice, once for the large icon and once for the small icon) as done by a
dialog-based app.
				joe

On 1 May 2007 16:44:29 -0700, "djarvinen@gmail.com" <djarvinen@gmail.com> wrote:

>I recently wrote a very small app that was heavily dependent upon some
>of our custom libraries.  These libraries all assume a 'multiple
>document' app but all I wanted was a simple dialogue.
>
>Since I didn't want to rewrite all the libraries, I simply wrote a
>'multiple document' app, 'hid' the main window (m_pMainWnd-
>>ShowWindow(SW_HIDE) on startup, and then called a do.Modal to my
>little dialogue box (which only had one button :)  well, two buttons,
>if you include 'exit').
>
>The problem is that 'SW_HIDE' also seems to not include a program icon
>on the task bar; is there a way I can force this icon to be
>'visible'?  Not a disaster if it can't be, but it would be nice.
>
>Thanks.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
5/2/2007 3:27:49 AM
You could try using ShowWindow(SW_MINIMIZE) and ShowWindow(SW_NORMAL) if you 
want the icon to remain on the task bar when the window is minimized.

Tom

<djarvinen@gmail.com> wrote in message 
news:1178063069.403832.213400@e65g2000hsc.googlegroups.com...
>I recently wrote a very small app that was heavily dependent upon some
> of our custom libraries.  These libraries all assume a 'multiple
> document' app but all I wanted was a simple dialogue.
>
> Since I didn't want to rewrite all the libraries, I simply wrote a
> 'multiple document' app, 'hid' the main window (m_pMainWnd-
>>ShowWindow(SW_HIDE) on startup, and then called a do.Modal to my
> little dialogue box (which only had one button :)  well, two buttons,
> if you include 'exit').
>
> The problem is that 'SW_HIDE' also seems to not include a program icon
> on the task bar; is there a way I can force this icon to be
> 'visible'?  Not a disaster if it can't be, but it would be nice.
>
> Thanks.
> 

0
tom.nospam (3240)
5/2/2007 4:36:49 AM
On May 1, 8:27 pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
> Call SetIcon (twice, once for the large icon and once for the small icon) as done by a
> dialog-based app.
>                                 joe

Heh, 'SetIcon'.  Who woulda thunk it. :)

Thanks.

0
djarvinen (31)
5/2/2007 4:48:04 PM
Reply:

Similar Artilces:

Windows Event Logger
Hello , Within a try- catch block I need to catch the exceptions and write them to a log file using the Windows Event Logger . Till exception handling, things are fine with me, but I am not aware of Windows Event Logger . Any input in this regard shall be appreciated . Thanks , Sujay ...

Crazy Sorting Problem.....
Ok so I have colums A though D that need to line up with E through P. I have a common symbol in D and F. I need to get rid of everything in colum A through D that does not line up with the E through P useing the common symbol as a referance. I am right now deleting extra info by hand. Please help. Hi see your other post -- Regards Frank Kabel Frankfurt, Germany Neal wrote: > Ok so I have colums A though D that need to line up with E through P. > I have a common symbol in D and F. I need to get rid of everything in > colum A through D that does not line up with the E through P ...

How to check the style of window is not WS_EX_APPWINDOW ?
Hello There How can I check whether the extended style of window is not WM_EX_APPWINDOW.( Means it won't have entry in taskbar when it visible. I can check whether the it has WS_EX_APPWINDOW style like this if (::GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW) TRACE("App Window\n"); But how can I do the reverse thing ? Example: 0010101 Real 0110101 Mask The Bitwise AND gives a 1 if the real and the mask are 1, such as 00101100 00100100 AND ---------- 00100100 In this situation, we know that at least some of the mask is true, -- now -- Take the binary number...

WaitForSingleObject Problem
Hi all, I use WaitForSingleObject(hProcess, INFINITE) to wait for execution of the MS ActiveX Control Pad Setup (started out of my application). <code> CreateProcess(NULL, "setuppad.exe", NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &startupInfo, &processInfo) WaitForSingleObject(processInfo.hProcess, INFINITE) DoSomethingElse </code> At the beginning of installation everything is fine, but after a little bit of time, the CPU usage is 50% and nothing is going on (it's after searching for installed components). When I don't use WaitForSingleOb...

Problem Syncronizing.
HI, I have problems with a syncronized store that I had to syncronize again from the beginning. Give me alot of TIme out when I use the 401 Worksheet. Since some of the data is in the HQ Database I would like to know if there any operation I can do so then tell to the HQ client that I just want to upload some information?. Thanks in advance for your help. Rgds Rodrigo Go to Manager, Help, About. If your version is 1.2.0151 you have a version that won't work with Global Customer turned on. Contact MBS and ask for a Hot Fix to address this issue. Install the Hot Fix on all PC...

INSERT INTO problems
Hi all, I hope this doesn't appear twice, I did it a while ago and it never came up! So here goes again! I am trying to use INSERT INTO to insert one record in to a table (tna feedback) in two fields (USER ID: and DESK/LAPTOP). The values are generated by two different forms; stUser comes from this form and stMachine comes from another form which has been hidden once the user has chosen the value. This part works fine. However, every time I run it I get an "Incomplete Query clause" error message but can't fidure out what I've done wrong! Here is the code: Dim SQL ...

Access 2000 Package and Deployment Wizard problem!
I have created an Access 2000 application that I now wish to distribute to users as an MDE file. The Access 2000 Package and Deployment Wizard does a fine job of storing the relevant installation files on a CD, exploiting A2K Runtime. However, I would prefer to let users download my application from a website. The Package and Deployment Wizard offers a 'Web Publishing' deployment option that appears to address this need. My only problem is that it doesn't work for me. I get the following error message, Unexpected error number 48 has occurred: File not found: WebPost.dll I...

Count problems[Excel 97]
Hi there, I did a search on the forum to find an answer to my question but didn' find anything. Here is my prob : Lets say I got this page-> ___a___b_____c__d__ 1 Name Type Job bla 2 Name Type Job bla 3 Name Type Job bla 4 Name Type Job bla 5 Name Type Job bob I want a Cell to write how many row I got( 5 in this exemple) and onl count the cells with bla in the D column(4 in this exemple). Sorry if I'm not really clear but if you can help me feel free t answer :) thx, Tulkas -- Tulka -----------------------------------------------------------...

Problems with german characters (umlaute)
Hello colleagues, it happes every months that a mail reaches us with I don't know how coded german characters. Our german customers are calling us, asking what we're missing on our system. I've checked one of these mails and the only thing I found out that the codepage, which was specified in the header, was the same than in the other mails I've in my mailbox and which I can read perfectly. The strange thing in current case is, that the email is displayed correctly when the mail is opened in Outlook Web Access. I need some help how to get hand on these problems. Many...

IE8 was deleted from my windows 7 and I cannot find correct downlo
I have a two month old Toshiba and deleted IE8 because of crashes. Trying to find the correct download to reinstall. The IE8 homepage just says it is included in windows 7 but does not show the download file....... ARRRG. Tried Vista IE8 download file but message says it not the correct operating system. On Sun, 21 Mar 2010 20:50:01 -0700, pawntonian <pawntonian@discussions.microsoft.com> wrote: >I have a two month old Toshiba and deleted IE8 because of crashes. Trying to >find the correct download to reinstall. The IE8 homepage just says it is >included in wind...

Trying to install Microsoft CRM with OutLook on Windows 2000
When trying install MS CRM 1.2 disk 2 (Sales for Outlook), I am prevented from completing the install as I get the message "installation failed" "you must install SQL Desktop Server Engine separately". When trying to install it separately the setup seems to start running then stops after extracting files and doesn't complete. There are no error messages and nothing in the Event Viewer ? If anyone has any ideas I would be grateful for your help. Hi Installation take bit time,you have to wait.it updates with sp-3 etc.. Regards, Bhaskar.T "dhawgood" ...

Maximized Window
When a mail is opened, it is opened in the maximized size. When the "make smaller" is pressed, the window remains maximized. When a reply is desired, the reply window is also maximized and cannot be made smaller. This only happens with one identity; all other work fine. All setting are same for all identities. What can I do? ...

Exchange Features Tab in ADUC when using Windows 2000 SP3
Hi, I would like to run Active Directory Users and Computers with Exchange 2003 Admin tools I'm limited to Windows 2000 Prof/SP3 Everything works,except from the Exchange Features tab. When selecting this tab, ADUC hangs. Any ideas. (I have to stay on SP3!) br TN Terminal Services is always my first choice. On Wed, 13 Apr 2005 23:35:22 +0200, "newsMS" <t_n@trashcan.dk> wrote: >Hi, > >I would like to run Active Directory Users and Computers with Exchange 2003 >Admin tools >I'm limited to Windows 2000 Prof/SP3 > >Everything works,except...

Windows XP: Open file in read-only: Word, Excel, Visio
I'm often sharing files on a network drive with someone. Often, one of us knows that we don't need to open a file for modification, and we only need read-access. Is there a way to open a file in read-only mode so that when someone does need to open it for modification, the read-only user is not blocking that? If there is not a way to do this native to Windows XP, is there a way to do it from the three applications that we use most, namely Word, Excel, Visio? All are 2003 versions. Thx. I used to save files like this in "read only recommended" mode. File|SaveAs|Tools|Ge...

How to remove the /dde from Windows Explorer File Open on Install
I have an MDI app that I would like to open a file on a double click in Windows Explorer. Unfortunately the Explorer File Type (Tools>Folder Options... File Types tab) is set so that the command invokes dde. Ie. The "open" option under the "Advanced" button is C:\Path...\App.exe /dde and the DDE message is [open("%1")]. This never seems to work as my app never sees the dde message and the initialization of m_pCmdInfo via: m_pCmdInfo = (CCommandLineInfo*)(UINT_PTR)m_nCmdShow; sets the pointer to one and the app fails on exit. This is referred as a kn...

countif problem.
I wrote a formula in a cell that contains the following: =countif(f5:f268,"> char(32)") / countif(e5:e268,"> char(32)") I have verified that any unused cells have blanks spaces in them. Both columns have data in the same rows so the counted value for each column should be the same but it isnt. All cells contain only numbers or letters and the cells format is general. Any suggestions?? Not sure I get it, but try =countif(f5:f268,">"&char(32)) / countif(e5:e268,">"&char(32)) "psion" <oregonsparkie@hotmail.com> w...

Problem with printing listbox bigger than one page
Hi, I created form "Invoice". It contains few list boxes (like: Brand, Product, Price, etc.). Each list box is big enough to display 50 items. It works in this way: user is chosing product from table Products_tbl and clicks on "Add to invoice" button which adds to each list box new item containg apropriate information about chosen product. At the end, user can print the form. Before it was limited, and user could put max. 50 products on one invoice, but I wanted to get rid of this limitation. I did it in this way: after 50th item, with each added product I extend list boxe...

Carriage Return/Line Feed Problem
Hi guys, I wrote some code that gets the HTML from a Web page and stores it in a buffer, then I display the buffer in a big multiline CEdit box. The problem is that on many pages I don't get new lines, I just get a thick solid verticle line kinda like this: || where it should return. Also, if I view the pages (view source) in Notepad they look fine. Most pages do that, but interestingly Microsoft pages do the proper new line and look great in my edit box. Maybe I have to replace all the \r with \r\n or something like that ? Does a \r\n still only take up 1 char ? I download the page in...

FRx
Dear, I encountered problem of changing default base period. The version of FRx software is 6.5.28 and it is running under Windows 2K Professional. The situation was: After opened the Catalog of Report Window, there was a pop-up message box which said 'Changed the default base period to C'. I did not know why this could happen. - Would you please tell me under what circumstances this pop-up message box would display?? In order to continue to use this software, I only could click 'OK' from the message box. The report date is then changed to 'Default Base Period' - (Ja...

Audience rule, problem with Domain Local Group.
I try to create a rule for my audience on Portal 2007 User = Member of --- some Domain Local Group (I need to add people from other trusted forest) But it can't be relolved :-( What's wrong? I checked it on 3 Portals, no luck I cam only create such a rule: Work e-mail Contains @needed_domain.com or add individual accounts from those domains, but there are 1000, too hard to add manually .... Please help. Perhaps there is another way These groups need to be either Global or Universal groups. Universal groups are better for SharePoint, and they can contain global...

Comments window
Hi there, I use a DB tool called RS3 for Excel (now known as Accord for Excel - owned by Accelrys inc.). This tool allows you to observe results with cell notes, these commonly being the the average of the result values. the cell notes is a popup window showing the individual result values the average is calculated from. It only shows a maximum of 5 of these values. Additional values can be shown by choosing Tools>Options>View tab, and choosing Comments & indicator. This shows the comments as stable windows, which you can then resize. Now if you go back to the same pla...

backup problem
Hi I had installed backup for office 2003, I had been backing up to a removable disk. I had removed the disk and kept getting messages that was unable to back up to removable disk, even though I have turned off all automatic backup options. I have since removed back up "feature" but still get the 4 or 5 steps stating unable to find disk etc, any ideas how to get rid of this wonderful microsoft feature. thanks tim If by removed you mean 'uninstalled' then it would appear the uninstall wasnt successfull. In OL ensure backup is not selected within Addins "Tim&...

shortcut/hotkey-problem
Hello NG, I have set a custom hotkey to a shortcut/program on my Windows XP Start Menu (CTRL-ALT-B). However, this programlink was deleted. If I now try to reassign this shortcut, it does not work - it seems that the combination has been still reserved for a non-existing link. Is it possible to unmap the combination to map it then again? Hopefully someone can help me. Thank you, Johannes Perhaps the info in this thread will help. http://www.tomshardware.com/forum/32795-45-find-delete-hotkey-shortcut-assigned-program johannes pfeffer wrote: > Hello NG, > ...

Outlook 2003 Personal Address Book forwarding problem
This Outlook 2003 is connected to a Exchange 5.5 Server The problem is this, everytime I try to forward any e-mail and use any distribution list on the Personal Address Book it does not want to send the e-mail but if I try to send it any other way it works fine. Thanks ...

Windows Millennium Edition
Anybody know what's the highest version of Publisher that works on Windows Me. I am planning to upgrade, honest. Liam After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Liam <anonymous@discussions.microsoft.com>... > Anybody know what's the highest version of Publisher that > works on Windows Me. Publisher 2002. Publisher 2003 works on Windows 2000 SP3, Windows XP, and higher. -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm ...