note description: "[ Objects that represent an EV_TITLED_WINDOW.% %The original version of this class was generated by EiffelBuild. ]" generator: "EiffelBuild" date: "$Date$" revision: "$Revision$" class MAIN_WINDOW inherit MAIN_WINDOW_IMP redefine create_interface_objects end feature {NONE} -- Initialization user_initialization -- Called by `initialize'. -- Any custom user initialization that -- could not be performed in `initialize', -- (due to regeneration of implementation class) -- can be added here. local l_result: INTEGER do print ("%N start test") set_size (800, 400) create command_handler.make -- !!! Attach Ribbon by COM here !!! if attached {EV_WINDOW_IMP} implementation as l_imp then com_initialize l_result := create_ribbon_com_framework (l_imp.wel_item) end close_request_actions.extend (agent on_destroy) end create_interface_objects -- do -- Initialize before calling Precursor all the attached attributes -- from the current class. -- Proceed with vision2 objects creation. Precursor end feature {NONE} -- Implementation on_destroy -- Clean up all ribbon related COM objects and resources do destroy_ribbon_com_framwork com_uninitialize end command_handler: ER_COMMAND_HANDLER -- EiffelRibbon command handler feature {NONE} -- Externals com_initialize -- Initialize COM external "C inline use %"Objbase.h%"" alias "[ { CoInitialize (0); } ]" end com_uninitialize -- Clean up COM resources external "C inline use %"Objbase.h%"" alias "[ { CoUninitialize(); } ]" end create_ribbon_com_framework (a_hwnd: POINTER): INTEGER -- Create Ribbon framework, attach ribbon to `a_hwnd' external "C inline use " alias "[ { return InitializeFramework ($a_hwnd); } ]" end destroy_ribbon_com_framwork -- Destroy ribbon framwork external "C inline use " alias "[ { DestroyRibbon (); } ]" end end