# File locana/locana_gui_template.rb, line 636
   def msgbox(msg_text, msg_type=:ok, msg_icon=nil, msg_title=nil, msg_default=nil)
      flush_message_queue()     # we need to flush the message queue because the message box will capture and we will loss any pending events

      type = 0x00000000    # MB_OK

      case msg_type
         when :ok;               type = 0x00000000    # MB_OK

         when :okcancel;         type = 0x00000001    # MB_OKCANCEL

         when :yesno;            type = 0x00000004    # MB_YESNO

         when :yesnocancel;      type = 0x00000003    # MB_YESNOCANCEL

         when :retrycancel;      type = 0x00000005    # MB_RETRYCANCEL

         when :abortretryignore; type = 0x00000002    # MB_ABORTRETRYIGNORE

      end
      case msg_icon
         when :error;    type |= 0x00000010    # MB_ICONHAND and MB_ICONERROR

         when :info;     type |= 0x00000040    # MB_ICONASTERISK and MB_ICONINFORMATION

         when :question; type |= 0x00000020    # MB_ICONQUESTION

         when :warning;  type |= 0x00000030    # MB_ICONEXCLAMATION and MB_ICONWARNING

      end
      type |= 0x00040000  # MB_TOPMOST

      win = active_window()         # get the currently active window

      if (!win)
         #rc = MessageBox.call(GetDesktopWindow.Call, msg_text, msg_title, type)

      elsif (win.l_oframe)
         #rc = MessageBox.call(win.l_oframe, msg_text, msg_title, type)

      end
      return nil
   end