Re: the menu bar is hidden under the title bar in a frame window generated from a dll ...



Hi Ajay,

I didn't do the two things you mentioned. That's why I am confused too.
It's supposed to be very simple. In the test program, it works just fine.
I copy the 3 sets of files (frame, view, and doc) to the dll. Then the
problem shows up. The only difference is the menu resource id. I also try
to directly create the three sets of files in the dll through the class
wizard. The same problem still shows up. I am totally stuck now. Could it
be the dll, which was created in VC++ 6.0 long time ago? This dll exposes a
function, from which I generate the frame window. After it works, I will
embed an active-X control in the client view area.

JD



"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:uweeWxolHHA.1820@xxxxxxxxxxxxxxxxxxxxxxx
This doesnt make a whole lot of sense. Is your code custom drawing the
menu
bar itself? Also, are you doing some painting in the non-client area of
the
mainframe window?

--
Ajay Kalra [MVP - VC++]
ajaykalra@xxxxxxxxx


"JD Young" <jdt_young@xxxxxxxxx> wrote in message
news:#OY4tnnlHHA.1244@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

A very simple frame window generated from a dll of mine always has its
menu
bar hidden under the title bar. I have to click on the title bar to make
the menu items show up. The following code that generates the frame
window is actually copied from a small test program to the dll. In the
test
program, the code works just fine. So what makes the difference? I
suspect
IDR_MENU_TEST is only partially successfully loaded in the dll. Any
reason
for it? Pleave provide me any clue and hint. Your help is much
appreciated. (I am using VS 2005)

C2DGraphDoc *pDoc = new C2DGraphDoc;
C2DGraphFrame * pFrame = new C2DGraphFrame();

CCreateContext context;
context.m_pNewViewClass = RUNTIME_CLASS( C2DGraphView );
context.m_pCurrentDoc = pDoc;

BOOL bRes = pFrame->LoadFrame(IDR_MENU_TEST,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, &context);

pFrame->SetWindowText( _T("TEST") );
pFrame->ShowWindow(SW_SHOW);

JD






.



Relevant Pages