MDL Prompts

Hii...

I have a dialobox with a pushbutton named 'OK'. In OK button hookitemid, under DITEM_MESSAGE_BUTTON i'm placing an icon and closing the dialogbox.

After closing the dialogbox, i need to show the prompt message. My code is here. The resukt of my code is placing an icon properly, closing the dialogbox, but the prompt messages are not visible. Please help me.

 

Private void Input_OK_hook( DialogItemMessage *dimP)
{
    dimP->msgUnderstood = TRUE;
    switch (dimP->messageType)
    {
    case DITEM_MESSAGE_BUTTON :

        placeicon();                    **placing an icon**

       mdlDialog_closeCommandQueue( dimP->db);                           **closing the dialogbox***
      mdlOutput_prompt(MSG_ICON_PLACED_PLEASE_SELECT_MDL_MENU);             **prompt message**
      mdlOutput_command(MSG_INSERT_SIGNAL_INPUT_ICON);
   
    break;
    default:
            dimP->msgUnderstood = FALSE;
           
    break;
    }
}

and the messages are defined as

#define MSG_INSERT_SIGNAL_INPUT_ICON                                               "INSERT SIGNAL INPUT"
#define MSG_ICON_PLACED_PLEASE_SELECT_MDL_MENU                "Signal Icon Placed.Please Select the required function from MDL Menu to continue"

 

Regards Mythili

  • Dialog Item Events

    happynjoy said:
    I have a dialobox with a pushbutton named 'OK'. In OK button hookitemid, under DITEM_MESSAGE_BUTTON i'm placing an icon and closing the dialogbox.

    A better event for your code would be DITEM_MESSAGE_QUEUECOMMAND. At the time that message is sent the item internal state is stable, and any variables have had their state set.

    DITEM_MESSAGE_QUEUECOMMAND is the event when, if you had associated your command with this item, the command would be placed on MicroStation's input queue.

    Ephemeral Messages

    The prompt and command message fields are temporary. Anything you place there may be overwritten by another message. Since we don't know the context of your code, we can't say why those messages are vanishing. For example, a primitive command may write its own text to the prompt and command message fields. If your code is followed immediately by a primitive command, your messages will be overwritten.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions