/*
    ####             #    #     # #
    #   #            #    #       #          The FreeWare C library for
    #   #  ##   ###  #  # #     # ###             RISC OS machines
    #   # #  # #     # #  #     # #  #   ___________________________________
    #   # ####  ###  ##   #     # #  #
    #   # #        # # #  #     # #  #    Please refer to the accompanying
    ####   ### ####  #  # ##### # ###    documentation for conditions of use
    ________________________________________________________________________

    File:    Dialog2.OpenMenu.c
    Author:  Copyright  1994 Julian Smith
    Version: 1.03 (13 Mar 1995)
    Purpose: Dialogue box handling
*/


#include "Desk.WimpSWIs.h"


#include "Defs.h"



Desk_bool	Desk_Dialog2_OpenDialogMenu( Desk_dialog2_block *dialog2, Desk_window_openpos openpos)
{
Desk_wimp_point	pos;

if ( !dialog2)	return ERROR;

Desk_Dialog2__CommonOpenMenuCode( dialog2);	/* Close any previous menuleaf etc.	*/

dialog2->flags.data.type = Desk_dialog2_type_MENU;
Desk_Dialog2__CommonOpenCode( dialog2);

Desk_Dialog2_Window_GetWindowOpenPos( &pos, openpos, dialog2->window);
Desk_Wimp_eCreateMenu( (Desk_menu_block *) -1, -1, -1);
Desk_Wimp_eCreateMenu( (Desk_menu_block *) dialog2->window, pos.x, pos.y);

return NOERROR;
}
