Loadframe() fails when no menu is created

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: GAK (gkamendje_at_web.de)
Date: 10/31/04


Date: Sun, 31 Oct 2004 13:06:13 -0500

LoadFrame() fails to create a windows when no menu is create in the
application.
But the LoadFrame documentation from the MSDN library does not specifies
that creating a menu with the IDR_MAINFRAME as resource identifier is
mandatory for this function to succeed.

begin quote MSDN Library

LoadFrame requires fewer arguments than Create, and instead retrieves most
of its default values from resources, including the frame's caption, icon,
accelerator table, and menu. To be accessible by LoadFrame, all these
resources must have the same resource ID (for example, IDR_MAINFRAME).

end quote MSDN Library

I do not understand why LoadFrame() fails if only an Icon and an accelerator
table but no menu have been created meanwhile Create() succeeds. Further, I
seems that LoadFrame() also fails to correctly load a dialog even when it
has IDR_MAINFRAME as identifier.
thanks for any hint
GAK



Relevant Pages

  • Loadframe() fails when no menu is created
    ... But the LoadFrame documentation from the MSDN library does not specifies ... resources must have the same resource ID ... I do not understand why LoadFramefails if only an Icon and an accelerator ...
    (microsoft.public.vstudio.general)
  • Loadframe() fails when no menu is created
    ... But the LoadFrame documentation from the MSDN library does not specifies ... resources must have the same resource ID ... I do not understand why LoadFramefails if only an Icon and an accelerator ...
    (microsoft.public.vc.language)
  • Re: Loadframe() fails when no menu is created
    ... > But the LoadFrame documentation from the MSDN library does not specifies ... > of its default values from resources, including the frame's caption, icon, ... > I do not understand why LoadFramefails if only an Icon and an accelerator ... One possible solution is to make a child window and hide main window ...
    (microsoft.public.vc.mfc)
  • Re: Loadframe() fails when no menu is created
    ... > But the LoadFrame documentation from the MSDN library does not specifies ... > of its default values from resources, including the frame's caption, icon, ... > I do not understand why LoadFramefails if only an Icon and an accelerator ... One possible solution is to make a child window and hide main window ...
    (microsoft.public.vstudio.general)
  • Re: Loadframe() fails when no menu is created
    ... > But the LoadFrame documentation from the MSDN library does not specifies ... > of its default values from resources, including the frame's caption, icon, ... > I do not understand why LoadFramefails if only an Icon and an accelerator ... One possible solution is to make a child window and hide main window ...
    (microsoft.public.vc.language)