How to create a WS_POPUP window like menu window?

I do not want to use the CMenu or HMENU, and created a WS_POPUP window, make 
it looks like a menu,

but when my menu window activeted, the main app window's title bar become 

You know the system menu can get mouse move msg and the main app window's 
title bar do not became gray,

Is there any hint?

John Smith

12/20/2008 6:51:00 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 44

"John Smith" <> wrote in message 
>I do not want to use the CMenu or HMENU, and created a WS_POPUP window, 
>make it looks like a menu,
> but when my menu window activeted, the main app window's title bar become 
> gray.
> You know the system menu can get mouse move msg and the main app window's 
> title bar do not became gray,
> Is there any hint?

Could you make your menu window WS_CHILD of the mainframe?  Why does it need 
to be WS_POPUP?

If it is WS_POPUP, then it is a top-level window, and only one is active at 
a time, which is why your main window goes gray.  If you don't care about 
your menu having keyboard focus, you can prevent your menu window from 
getting the focus (so your main window retains the focus and doesn't go 
gray).  Do this by handling WM_MOUSEACTIVATE.  Also, when you call 
ShowWindow() to show your menu window, specify SW_SHOWNOACTIVATE.

-- David 

dc2983 (3206)
12/20/2008 3:26:28 PM

Similar Artilces:

How do I create a bell curve? I have my z, p, std. dev., mean,etc
I am trying to take my std dev, mean, z, p, Confidence level, etc...plot and shade areas using excel. Brian - See the ShadedNormalDensityCurve workbook at - Mike Middleton Decision Analysis Add-ins for Excel "Brian" <> wrote in message >I am trying to take my std dev, mean, z, p, Confidence level, etc...plot >and > shade areas using excel. ...

How to set a icons instead of a menu text?
Hello, I'm not quiet sure this can be done , but i would like for some reasons to set icons to describe my menus. Can this be done and how? Many thanks Breadl, It is possible to owner-draw menus, youmight want to check here: and here: for samples. Johan Rosengren Abstrakt Mekanik AB "Bredal Jensen" <> a �crit dans le message de news:%23hH2cnyxEHA.2540@TK2MSFTNGP09.phx.gbl... > > Hello, > I'm not quiet sure this can be done , but i would like for so...

Window Security (GP 7.5)
Hello, I would like to limit access to a specific window. I am trying to remove some user access from the Customer Maintenance Options window. This can be accessed using the Options button on the Customer Maintenance window. I cannot find this window listed in the Security Setup window as other windows are. Is it even possible to set access rights to this window? Thanks, -- Jessie Try using By Dictionary in Advanced Security. I don't know if the subwindow can be controlled but the By Dictionary option might give you the granularity you need. -- Charles Allen, MVP "J...

I would like to design a logo for a new superstore
I just can't seem to get an inspiration to design a logo to use for this superstore. Even coming up with a name seems to be a difficult task. Inspiration here, over 7,000,000 hits -- Mary Sauer MSFT MVP news:// "tinard" <> wrote in message >I just can't seem to get an inspiration to desig...

Help creating a script in SQL or Calculated field in Crystal
How do I take this script and manipulate it to give me one long string with static text as well as SQL data in specific positions within the string. Example result: Positions / Data: 1-3 / 173 (Static text) 4-6 / spaces 7-10 / "X_UPR30300"."YEAR1", (has to show up as 2007. Showing up as 2,007) 11 / 4 (Static text) 12-22 / "UPR00100"."SOCSCNUM" 23-57 / "UPR00100"."LASTNAME" 58-92 / "UPR00100"."FRSTNAME" 93 / "UPR00100"."MIDLNAME" 94-120 / "UPR00102"."ADDRESS1" 121-148 / &q...

Help Creating A Formula #2
I need to make a formula for alook up. The first spreadsheet i inventory, the second one is pg 103 strapping. I want to enter the fee and inches for pg 103 on the inventory and have it look up the feet an inches on strapping chart and enter the appropriate gallons in column Attachment filename: p & g 101 Download attachment: -- Message posted from ...

Error message in windows mail 12-21-09
I just set up my account and the existing messages imported fine, but when I try to send mail I get the following error: Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Subject 'new e-mail', Account: '', Server: '', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10053, Error Number: 0x800CCC0F Please help. Double check that all your account settings are correct. If they are, then e-mail scanning is a likely...

Looking for Easiest Way to Create Report
We need to create a report from our accounting program which contains about 200 .db files. I have determined that the required information is contained in only 3 of those files. Out of those 3 files I need about 30 fields of data. The end result is that those 30 fields of data have to be placed into an existing excel spreadsheet in specific columns which has 97 total columns. For example one db file contains data which has to be placed into column c of the excel spreadsheet. another db file has data which has to be placed into column z of that same spreadsheet and so on Th...

Creating a Browse for Folder
I have seen programs where there is an edit field for defining the location of a file and then to the right of the field is a button with 3 periods on it which when clicked brings up a browse for folder file box where the user can choose a directory and file and then it is populated in the edit field. Is there a custom control to use for this or do I have to develop this myself? Take a look at SHBrowseForFolder and CFileDialog. You probably want CFileDialog. -- Ajay Kalra [MVP - VC++] "William Gower" <> wrote in message news:Olf0wrmk...

Will Publisher 97 work with later versions of windows?
just wondering if publisher 97 will work with later versions of windows such as XP or ME and suchlike? Jon Yes... -- Mary Sauer MS MVP "belly483" <> wrote in message news:00a801c34c73$dd061820$a101280a@phx.gbl... > just wondering if publisher 97 will work with later > versions of windows such as XP or ME and suchlike? > > Jon Whilst attempting to develop brick-based storage technology, Ed reads a message from belly483 <> > just wondering if publisher 97 will wo...

Planning Lead time-Item Vendors Maintenance window
Previously used manufacturing and MRP in v9 and the Planning Lead time on the Item Vendors Maintenance window (bottom left corner), we used to enter 7 for the number of days in 1 week. MRP then suggested to place PO's using these 7 days as one week. Now when we enter 35 for example ( V9 calculated 5 weeks for placing the PO) Now since V10 it looks like it is calculating 7 weeks lead time (35 days divided by 5 days) Did something change with V10 on this field and how MRP uses it with the Request Resolution window? thanks! -- Doug The system now looks at calendars and can conside...

CONCATENATE text to create a formula to be evaluated
Hi, I am wanting to concatenate a set of text to create a formula. I have done so below. =CONCATENATE("=MAX('",O1,"'!A3:A65536)") The result is: =MAX('2009'!A3:A65536) ....but it treats this as a text string when I try to use INDIRECT Cell O1 contains the year minus 1. In this case O1 = 2009. All of my worksheets are named as a year e.g. 2007....2008....2009...2010. I am entering this on sheet 2010. Now the real question: How do I make another cell evaluate this string as an actual formula and spit out the highest number for ...

Setting up OWA with Windows Certificate
Hi everyone, I need to configure my OWA to make use of a certificate generated by a Windows 2003 server for an Exchnage 2003 server. I know how to do this using third party (Verisign) certs but I need to find a free solution. If you could point me to the correct documentation it would be very much appreciated. Many thanks, Jose One of your options would be to use your own Certificate Authority. You can install this from the Win2k3 Server CD. With that you can generate your own certificate just like verisign. -- This posting is provided "AS IS" with no warranties, and confers...

Drop down menu #3
Hi, I want to create a drop down menu for my customer list. The drop down menu should have a auto search function. eg. If I type in "Mic", the drop down menu will bring me to the customer name close to "Mic". How can I do it? Can I update the customer list regularly. Pong This previous post by Debra Dalgleish would be of interest: "Although data validation doesn't support autocomplete, there's a sample file here that provides a combobox from which you can select one of the values from the data validation list. In the combobox, you can enable autocom...

Want Input boxes to accept unicode strings on Standard Windows XP
I have a MFC application that is currently built with MBCS mode. If I run the program on a Chinese OS (Windows XP), the input boxes (Edit Controls) can accept Chinese chars and display correctly. If I run it on a standard English XP, the input boxes won't accept Chinese chars (display as "????") -- please note that I have already installed CKJ on the system and IE and Outlook can display Chinese correctly. Is this just because of different MFC libraries used for the application? Can I force the application running on Standard XP to use the unicode libraries so ...

Excel 2000 running on Windows XP SP2 does not properly open CSV fi
The same file opened in using Excel 2000 running in Windows 2000 Pro open properly. The rows and columns are formatted properly. The same Excel 2000 opening the same CSV file but on Windows XP SP2 will not properly format the rows and columns. Hi check your regionals ettings in Windows ('Start - Control Panel') I'd suspect you have different column delimiters specified (comas versus semicolons for example) -- Regards Frank Kabel Frankfurt, Germany "Oscar" <> schrieb im Newsbeitrag news:4985F8F5-5D33-425E-989C-65529CE63D05@mic...

Creating Formula with Embedded Variable ID
I need to create a single formula for my workbook that references cells from various tabs (over 20) in another workbook. I want to copy this formula into multiple tabs within my workbook. My workbook and the external workbook have the same number of and identically named tabs. I want to embed a variable into the formula that will take on the name of the tab that the formula is copied to. I imagine the formula would look something like this: ='K:\Sales Reports\[Ohio Team, Mar-21-2004.xls]variable_identifying_the_tab_goes_here'!D1 I know I can use the following formula to derive th...

Creating Purchase order worksheets in HQ through rules
I would like put some code in a web service in order to create a purchase order work sheet. Could I access to work sheets logic using qsrules to construct a worksheet? I looking for a method like QSRULES.CreatePOWorkSheet Thank you Oscar ...

Creating a e-mail contact list which has "undisclosed recipients"
Can anyone help me with a contact list for my e-mail which does not disclose all recipients names. I would like to send an e-mail regarding company information to several people which answers questions, but I don't want everyone to know who I am addressing it to. You need enter the names under the Bcc option when you address the email. That way, each recipient will only see their own name, but the email will go to everyone. Actually, the recipients won't see their own name in the To field. They will only see what the sender puts there, if anything (some ISPs require that you...

Migrating E5.5 Mailboxes with ADC created disabled accounts to to E2K3
I am getting to the end of my migration but still have all the resource mailboxes with ADC generated diabled accounts in AD to migrate. I'm not sure how to proceed with this. Can I just enable the accounts in AD migrate the mailbox and disable it again or do I have to create a whole new account in AD delete the ADC generated account and re-attached the new account to the mailbox in E5.5 then migrate it to E2K3? You can use the accounts it created. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "JoeAHM" <joseph.gonzalez@a...

Creating navigation buttons on a worksheet
Hi I'm trying to link togethor different pages on excel so i can navigate to them from each page. Also does anyone know how to create a drop down menu in excel? Many Thanks in advance Ryan Maybe by using a hyperlink: Insert|hyperlink or using the =hyperlink() worksheet function: David McRitchie posted this and it might help you: =HYPERLINK("#"&CELL("address",C5),C5) =HYPERLINK("#"&CELL("address",sheetone!C5),sheetone!C5) =HYPERLINK("#"&CELL("address",'sheet two'!C5),'sheet two'!C5) ryan_...

Creating opportunity using CRM api
Looking for an example of how to load the crm api to create an opportunity using C#. I'm way new to this and have downloaded the CRM 3.0 sdk but not sure how I access the information it contains. What I'm hoping to find is an example of creating an opportunity with just the necessary information so I can build on it from there. I appreciate any help! Hi Jeffa When you install the SDk you will notice there is a help file in the installed directory of the SDK, I think it is crmsdk3_0.chm Open the helpfile and search for create, there are lots of examples let me know if you get s...

Table-like Outline and Collumm that sums prevous values up
Hello The report I would like to have should be in a tabular form just like the doc document I have attached. However, until now I have not found out how to set the report into a tabular outline. It is quite uncomfortable and time intensive to set up this report by using lines and the different text fields. In addition, it will not look any good at the end.. Also, I would need a columm that is able to sum up the values before. Just like the "total" under each semester. Are the issues solvable? Greets, Hubertholz attached:

how do I take task off of startbar menu
Need to know how to take a task of the startbar menu. Something from the internet got on my taskbar and it keeps my computer transmitting hour glass on my screen. this is not an excel question. post in the windows newsgroup. run virus scan too. >-----Original Message----- >Need to know how to take a task of the startbar menu. Something from the >internet got on my taskbar and it keeps my computer transmitting hour glass >on my screen. >. > It might not be enough to remove it from the Start Menu--(unless it's under the windows start|Programs|startup menu??). ...

Tools Icon on Excel Menu Bar Missing
I don't know what I did, but the Tools Icon on my Excel (2000)Menu bar has gone missing. I've even tried re- installing Office 2000, but I didn't get it back. Can anyone help? You can reset your menubar to default Right click on the menubar and choose customize Under Toolbars select the worksheet menubar and click on reset on the right You lost the things you add to the menubar!! -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) "GHO" <> wrote in message news:014a01c34f9e$d4cdf3c0$a101280a@phx.gbl... > I don'...