a frame window with its title bar on the top of its menu bar (overlapped) ...


This is related to a previous post of mine, for which I got a lot of help 
from people but the problem was still not resolved.  I am reducing the 
problem to the following piece of code with only one class (CFrameWnd) 
involved.  Please bear with me to look into the problem one more time.

HINSTANCE h = AfxGetResourceHandle();
CFrameWnd *pFrm = (CFrameWnd*)RUNTIME_CLASS(CFrameWnd)->CreateObject();

If nothing goes wrong, the code above should generate a frame window with a 
title "Frame", and a menu bar right below the title bar (I tested it in a 
simple program).  But in my application, it always generates a window with 
the title bar and the menu bar overlapped (the title bar is on the top of 
the menu bar).  If I click on a menu item, it will float up and become 
persitently visible.

My application, an add-in 3rd party tool to another main application, is 
composed of 20+ dlls.  I placed the code above in 3 of the dlls and produced 
the same wrong frame windows.

If I remove the resource handle switch part from the code above, the 
behavior is still the same except that the title is changed from "Frame" to 
one of strings in my applications, which shouldn't be.  As you can see, I 
didn't use any of my own classes.  The only class involved is MFC's 
CFrameWnd here.

My application compiled in VC++ 6.0 last year did not have this problem.  It 
happened after we switch to VS 2005.

Your further help is much appreciated.  I have been wrestled with this 
problem for a week.


ps. Mr. Ajay Kalra suggested me to use Spy++.  I did try it but didn't find 
anything wrong.

jdt_young (239)
5/21/2007 8:59:14 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 24


Similar Artilces:

How to lock the frames down, not group the frames
I can group two or more frames together in Publisher 2000, which is great! But is there a way to lock the grouped frames to the page? I find myself from time to time accidentally moved the grouped frames. Thanks, DM Shawnews <ddmak@shaw.ca> was very recently heard to utter: > I can group two or more frames together in Publisher 2000, which is > great! But is there a way to lock the grouped frames to the page? I > find myself from time to time accidentally moved the grouped frames. Zoom out to 10% or so, so you can see the entire scratch area. Create a rectangle that spa...

How do I cancel window creation in OnInitDialog()?
Hi All, I have a splash screen that loads a bitmap from a file in OnInitDialog(). If for some reason the bitmap cannot be loaded I would like to cancel the splash screen so that the user does not see it flicker. Is there a clean way to cancel the creation of the splash screen ( a CDialog )? The splash screen is created like this: CSplashDlg * pSplashDlg = new CSplashDlg; if ( !pSplashDlg->Create(IDD_SPLASH_DIALOG, pParentDlg) ) delete pSplashDlg; Thanks. Alfredo I'm trying to remember how I did this before. It seemed like it was to call OnClose or something like that. -- ...

Windows Contacts / Windows Live Contacts confusion
Sorry I know that this has probably been treated often but it confuses me however. Only a few days ago i have been forced to switch to Windows Live Mail, after having used Windows Mail in Windows7 for a while (there is a way of importing windows Mail into Windows7). I now have two different contact systems. 1. the c:\users\MyName\Contacts folder (in my German version this is called "Kontakte") 2. The Windows Live Mail contact system that integrates directly into Windows Live Mail. It seems that these two do not synchronize and can someone tell me which in ...

Windows Media Player 11 and Album Art
This concerns WMP 11 in XP where I have some album art icons appearing OK in the individual expanded icon view but an incorrect piece of album art (from elsewhere in my library) appearing in the library icon view. I have been unable to force a correction, even when I re-paste the correct album art. Can anyone help? Go to the folder where the tracks of a particular album are located, by right-clicking one of the tracks in WMP and selecting Open file location. Look for JPG files in the folder (these files are usually hidden, so make sure Explorer is set to show hidden files). Del...

Calculating Counts based on Date and Time Frame
I have the following formula: =IF(ISBLANK(A7),"",SUMPRODUCT(--(PTARRTIME<>""),--(PTARRTIME>=TIME(LEFT (C$6,2),MID(C$6,4,2),0)),--(PTARRTIME<TIME(MID(C$6,7,2),RIGHT(C$6,2), 59)),--(PTORDDATE=$A7))) Basically what this does is look into C6, (05:00-05:29) and calculate the number of people seen between these times, and on the date (A7). For some reason, it's not calculating correctly. When I do manual counts, it gives me a different number. Am I missing something here? Brendon Hello Brendon, The formula looks fine. Maybe you need some data validation ch...

Expanding the time frame of financial information
I forgot to add to my previous posted note that I selected 30 days when I requested the first download from my bank. The initial download was successful, but I see no way to revise or expand this time frame in later downloads. When I go to to Online Service Manager, it just uses the initial time frame. Regards, Duane In microsoft.public.money, Duane Every wrote: >I forgot to add to my previous posted note that I <snip> It would be better to add your addendums to your previous postings to keep your story together. ...

Outlook 2007
I just upgraded to Office 2007. How do I make Outlook start with windows? I tried to drag it to the startup folder and got an error. -- Thanks! RBear3 .. RBear3 <rbear3@nospam.com> wrote: > I just upgraded to Office 2007. How do I make Outlook start with > windows? I tried to drag it to the startup folder and got an error. And that error is? Several options: 1) there should be an Outlook icon on the Quick Launch bar that may be more suitable for dragging to the Startup folder. 2) there should be an icon in the Microsoft Office menu that may be more suitable for drag...

Remove custom menu
I created a custom menu that loads when a workbook is opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA Hi Use this events in the thisworkbook module Private Sub Workbook_Activate() End Sub Private Sub Workbook_Deactivate() End Sub Read Chip Pearson's site about Events http://www.cpearson.com/excel/´┐Żevents.htm -- Regards Ron de Bruin http://www.rondebruin.nl <anonymous@discussions.microsoft.com> wrote in message news:573901c523f6$c8c75200$a601280a@phx.gbl... >I created...

Controls in a frame within a frame are always invisible
In Excel 2003 I had a a dialog box with a Frame1 containing, among other things, two radio buttons (control buttons). Later I added what I wanted to be a different set of three radio buttons, but (not surprisingly) setting any of the five to True caused the other 4 to be set to false. So .... I deleted the three new buttons and created a new Frame2 on top of a portion of Frame1. Then in Frame2, I created three new buttons. When I am editing the dialog I can see all the controls but when I load it (DialogName.show), the three radio buttons are not visible. It seems Frame2 is on t...

Question for Windows Speech Recognition guru
Need advice from Vista Speech Recognition guru. (formal name WSR, for Windows Speech Recognition) The "Analyze Written Documents" feature of WSR appears to be broken. I try to keep up-to-date on three different SR apps, which is not easy, because of the differences. The three SR apps are: 1) Dragon Pro 2) WSR (Vista Speech Recognition) 3) MacSpeech Dictate ....using most recent versions of above 3 apps Without going into the reason _why_ , I would like to be able to speak the following, and have it come out exactly as shown in the two examples below...

Why did MS decide to change the appearance of the text frame and picture frame box frames from a nice crisp line to a fat clunky style? Is there any tweak to make these outlines thinner? Thanks, Treeman Publisher 2003 fixed that issue. Amazing they changed it in Publisher 2002. It was bizarre it was ever introduced. You can only wonder at the calibre of intellect to produce such a bizarre 'feature'. *EVERYBODY* hated it. Sorry, no fix for Publisher 2002. -- The US should free all those illegally held prisoners they are torturing, abusing and denying human rights being held at Gu...

Outlook 07 Tool bar
I cannot find the Color Categories menu item and the icon does not appear in my default menu bar. Can it be added through the tool bar customization process and if so where is it located, it doesn't show up anywhere. Is it in some add-in I also can't locate? Thanks It's on the standard toolbars. View, toolbar, customize and select the stadard toolbar and click reset. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Ou...

Preserving Window Size
How do I preserve the previously-set size of a window or folder, so that when I close it then open it again, it stays that size (i.e., full-screen, or "restored" to previous size)? They used to always tell me "hold the SHIFT key when you click the 'x'. Of course, that didn't work half the time either, but now it never does. Is there a new way? Hello Jim, What happen with CTRL key when you click the 'x'. -=- "Jim Speiser" wrote: > How do I preserve the previously-set size of a window or folder, so that when > I close...

Top 3 within a group
I have a table of student ID's (numeric) courses and marks such as shown in this example: ID Course Mark 123456 Math 11 80 123456 English 11 82 123456 Socials 11 75 123456 Science 11 92 123456 Geog 11 84 123456 Physics 11 70 234567 Math 12 65 234567 English 12 71 234567 Chem 12 60 234567 Geog 12 88 234567 Phys 12 70 I want to produce a list that shows the top 3 courses for each student such as ID Course Ma...

Windows XP & Excel 97
I run Excel 97 under Windows XP (both Home Edition & Professional). Each time I double click an Excel file in a directory to open it, the file opens, then I get an error box ... "A document with the name "<filename>.xls" is already open. You cannot open two documents with the same name..." I close the error dialog box, and all is well. But the dialog box is a pain. Neither Word 97 nor Access 97 do this. Same results under Home Edition and Professional. Any reason for this? How can I avoid this? Don First try the standard fix(es)......Tools>Options&g...

Unable to launch Outlook from only 1 user in Windows XP
I am unable to start Outlook (and Outlook Express) from only one of the users I have set up in XP (get an error message about not having permisson rights to acces the Outlook.pst file). Outlook works fine for the other three users. I've tried the Inbox Repair Tool (scanpst.exe) and it does not find any problems with the pst file (but it does give an access rights warning that it couldn't repair the fiel if it did find something worng with it). The tool does not find any problems or any rights issues if run under any of the other users. Any ideas on how to fix this? ...

ho to get Recent Documents" feature in Microsoft Windows"
Hi ,i have taken out the recent document list from the "Recent Documents" feature in Microsoft Windows".(from task bar go to start then see the Document and u will see the Recent Documents)which i have accessed in my system. My question windows definitely stored these document list somewhere but i m unable to find the list of document .actually i need these list in my project............hope some one will know the solution of this . please suggest it to resolve this problem ..... thx in advance Nandan Mehra They are in registry entries under your project. Tom "nan...

Windows 7 64-bit, Code 80070103, ATK0110 ACPI Utility error
Hello, Windows Update want to install a Update called "ATK - system - ATK0110 ACPI Utility", but it failed with the error Code 80070103. What can I do? Which driver is it? Have I download from the manufactor? Which manufactur is it? Questions. Questions. Questions. ;) Same problem with me too. Have tried multiple times and get the same error message. First time it's happened too. "Rex75" wrote: > Hello, > > Windows Update want to install a Update called "ATK - system - ATK0110 ACPI > Utility", but it failed with the erro...

Windows Fax & Scan
I am running Win7 x64 and need help: How do I change the modem I want to use in WFScan? ...

Windows 7 and Actonis True Iamge
I see no newsgroup for Windows 7, so I'll post this here. If there is Win 7 group, please advise the "name" so that I can locate it. I'm starting the build of my new machine, which will use Windows 7 Pro 64 bit. I've been a long time fan of Acronis True Image since version 8, and am currently using version 11 in XP. And it has saved my butt on many occasions. I image my system drive weekly, and when a system drive fails, or has some "tragic event", Acronis TI always saves the day. From what I see, I'll have to upgrade to version 2010 (which i...

adding a window
hi i m new to VC and developing an application which is dialog based that should respond in a manner that when i open another window the first one should close and when the second is closed the first shhould reopen........ Plz be elobrative in answer as i cant understand VC much ........ Not the ideal way to do it, if you are looking for a way to have one window take presidence over the other use DoModal. If they really must dissapear use ShowWindow(SW_HIDE) -- - Mark Randall http://zetech.swehli.com "uzmeed" <uzmeed@discussions.microsoft.com> wrote in message news:...

y error bars #3
Hello, On a chart, is there a way to have different colored y error bars? I am using the minus and custom range for parameters on the y error bars thanks for any help Error bars are formatted by series: all X error bars for a series can be one color, and all Y error bars can be another. You can always add an invisible series for each different color error bars you want. - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltiertech.com/ greg wrote: > Hello, > On a chart, is there a way to have different colored y error bars? > I am using the minus and custom ...

outlook to window mail
my outlook disappeared, and now i have a window mail. I dont know how to import all my email folders and email addresess to window eamil. If any answers to this. Since i dont have outlook at all in my vista base machine i can not access any of the information. Please help If you really mean Outlook, you need to install Outlook on the Vista computer. Then you can import the .pst file into Windows Mail. If you mean Outlook Express, then you need to copy all of the .dbx files (including folders.dbx) to the Vista computer, then import them into Windows Mail. File - Import -...

In a non document/view architecture support appication, child frame create fail result to crash
At first, please refer to http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B201045 know how to "How to add multiple window types to a non-document view MDI application" or directly create a simple single/multi-document app without document/view architecture support with Appwizard. In some case, the calling of CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) should be failed, return 0 rather than -1. I expect I cannot open a new view, but unfortunately, the app crashed on under line in MFC source winmdi.cpp(No. 372 line, marked with HERE): CMDIChildWnd* CMDIFrameWnd::Cr...

Printing rtf that contains text frames
How can i print rtf files that contains text frames without opening the word. please if u can send me code or any clue how 2 do that. my email is:leon@galor.com ...