How to display non modal dialog box in a Dll call from TestStand implemented in visual c

Dear Jason F.
Applications Engineer
National Instruments
Hello
I did the same way you told me
the non modal dialog appeared and
system hangs and
giving the error message
""SeqEdit.exe-Application Error
The instruction at �0x047fc5b0� referenced memory at �0x047fc5b0�. The memory could not be �read� ""
please solve my problem
and thanks for yours early response
you can email me at
[email protected]

Hi Mkehret,
Does your dialog have ActiveX controls on it? If your DLL dialog uses ActiveX controls and is not programmed in a certain manner it can hang because of a conflict in the threading model used by the TestStand Engine that is calling into your DLL and the model that is required by the MFC ActiveX Container. If you are using ActiveX controls in your dialog, you need to make special considerations for the threading model MFC dialogs that use ActiveX controls need in order to work properly. The example under \Examples\MFCActiveXContainerDlg illustrates how to appropriately handle this situation as well as explaining why it is necessary.
Note: The above example displays the dialog as modal, but this is irrelevant to the problem I am describing.
Again for information on properly creating a dialog class object and displaying it as non-modal refer to the information on MSDN that I referred you to in this post:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000E98A0000&USEARCHCONTEXT_CATEGORY_0=_8_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_8_&UCATEGORY_S=0
If your dialog does not use ActiveX controls or after trying the programming method illustrated in the "MFCActiveXContainerDlg" example TestStand still hangs when calling your DLL, try calling your DLL from another environment just to make sure whether the DLL works at all. If the DLL works properly when called by another environment (e.g. VB, VC++, LabVIEW, or CVI), please submit a MINIMAL and REPRODUCEABLE example source project for your DLL for us to look at (please exclude all unnecessary code not required to reproduce the specific problem of displaying the dialog, and include all files necessary to build your dll with any
specific instructions needed to do so).
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask

Similar Messages

  • You too can display non-modal dialog boxes: LrDialogs.presentFloatingDialog

    Undocumented function: LrDialogs.presentFloatingDialog
    ref: http://feedback.photoshop.com/photoshop_family/topics/sdk_lrdialogs_presentfloatingdialog_ and_showstringsdialog_undocumented
    This works for displaying non-modal dialog box:
    LrFunctionContext.postAsyncTaskWithContext( "test", function( context )
        local LrPhotoPictureView = import 'LrPhotoPictureView'
        local photo = catalog:getTargetPhoto()
        local pictureView = LrPhotoPictureView.makePhotoPictureView{
              width = 400, height = 400, photo = photo,
        local result = LrDialogs.presentFloatingDialog {
            title = "Thumbnail test",
            background_color = LrColor ("white"), -- required for (uncolored) static_text display, else inside of box is black and so can't see black text.
            contents = vf:column {
                vf:static_text {
                    title = photo:getFormattedMetadata ("fileName"),
                pictureView,
                --vf:edit_field { - no sirve, presumably keystrokes are not trapped by box.
                --    bind_to_object = prefs,
                --    value = app:getGlobalPrefBinding( 'tempForTest' ),
                vf:push_button {
                    title = "Click me",
                    action = function( button )
                        app:show{ info="Pushed" } -- glorified call to LrDialogs.presentModalDialog - works.
                    end,
        -- LrDialogs( app:getGlobalPref( 'tempForTest' ), result ) -- no sirve.
    end )
    Enjoy!
    Rob

    jarnoh wrote:
    there is no way to activate previously opened dialog?
    I assume that to be the case, and so it takes a moment to come up if there is much contents.
    jarnoh wrote:
    Doesn't seem to be really useful
    For me, it would be very useful, if it was reliable, but so far, not so good.
    UPDATE: Bug I thought was in non-modal dialog is also in modal dialog (scrolled_view must not be followed by another components in tabbed container - see comments in code below):
    LrFunctionContext.postAsyncTaskWithContext( "tt", function( context )
        local props = LrBinding.makePropertyTable( context )
        props.tv = 0
        local vi = {
            vf:tab_view {
                vf:tab_view_item {
                    identifier = "t1",
                    title = "T1",
                    vf:static_text {
                        title = "temp1"
                vf:tab_view_item {
                    identifier = "t2",
                    title = "T2",
                    vf:scrolled_view {
                        vf:slider {
                            bind_to_object = props,
                            value = LrView.bind( 'tv' ),        
                    -- with this here, Lr crashes after adjusting slider and then switching tabs - comment it out, and all is well:
                    --vf:static_text {
                    --    title = "this cant be here",
        LrDialogs.presentModalDialog {
            title = "test",
            contents = vf:view( vi )
    end )
    R
    Message was edited by: Rob Cole

  • How to create non-modal dialog box?

    I'm trying to create a non-modal dialog box. The purpose is to show an alarm for the user but should leave the calling VI continuing to run. I have created such a thing -- the problem is that I can't figure out how to get the dialog box to go away! It stops running but the window just hangs around. See the attached VIs and image.
    Thanks in advance for your help,
    Chad
    Attachments:
    alarm_ui.png ‏11 KB
    alarm_ui-2.vi ‏11 KB
    message_to_user.vi ‏11 KB

    Ok, I've attached the files. Thanks for looking at this.
    Chad
    Attachments:
    alarm_ui-2.vi ‏11 KB
    message_to_user.vi ‏11 KB

  • How to dispose the modal dialog box

    hi all
    can any one please tell me how to supress the modal dialog box.
    Means iam triggering the a new pop up (modal dialog box) after this
    when iam click ok or cancel buttons on this modal dialog box it is not returing to
    the screen from where it is tiggering. Can any one tell how to achieve this.
    what r the statements i have to write for this in the PAI.

    HI,
    in PAI u have to write like..
    CASE OK_CODE.
    WHEN 'OK'.
    UR CODE.........
    WHEN 'CANC'.
       SET SCREEN 0.
       LEAVE SCREEN.
    OR
       LEAVE TO SCREEN XXX. " UR CALLING SCREEN NUMBER
    ENDCASE.
    Pls close the thread if the problem is solved and reward to all helpful answers.
    Regards
    SAB

  • How to Display save as dialog box.

    Hai all,
    am having a jsp page in which i display some values in Table. if i click a button it should show a save as dialog box, from that i should give a file name then all the content must be save in that file name. Any one give idea to open save as dialogbox from button click.
    Thanks.

    You can t do what you want.
    But you can do something similar..
    In stead of save as do a submit to a servlet and have you servlet download the file to the client
    download by setting your contenttype to
    response.setHeader("Content-Disposition", "attachment; name=\""+filename+"\"; filename=\""+filename+"\";");

  • How to display a message dialog box

    I need to know how to display a message box from my application.
    Anyone can help me?
    Thanks in advance

    Dear Zennen,
    Use JOptionPane.
    Ex
    JOptionPane.showMessageDialog(this,"message","title",JOptionPane.INFORMATION_MESSAGE); Thanks
    Joey

  • How to make awt modal dialog to NOT appear on top of existing windows

    Hi,
    I am working on a program that displays awt modal dialog box when it needs some action from the user. My problem is that the modal dialog box cann't be top window as there is one VC++ window that needs to be always top window. Another requirement I must satisfay is that there should not be any flickling. I've tried with setAlowaysOnTop(false), dialog.toBack(), transferFocus(), etc but with no avail. Any help will be greatly appreciated. Thank you in advance.

    Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

  • How to remove the default icons from the toolbar of modal dialog box screen

    Hello Friends,
    Iam calling a screen from function module using CALL SCREEN statement.
    The screen is of type Modal Dialog Box. I created some input fields and buttons in the screen. When the screen is displayed, I can see the tool bar at the bottom along with the input fields and buttons in the screen.
    These icons are Continue(Enter), Check, Cancel. How can I supress this??
    I mean in my screeen I want only my input fields and buttons but not the default toolbar. How to do that?
    Regards,
    Raju

    Hi Raju,
    Try this...
    First try to capture the F-codes of ur button apppearing on the dialog box and then exclude it from the PF-status by passing it to itab.
    types: begin of tab_type,
            fcode like rsmpe-func,
           end of tab_type.
    data: tab type standard table of tab_type with
                   non-unique default key initial size 10,
          wa_tab type tab_type.
    clear tab.
    move 'DELE' to wa_tab-fcode.
    append wa_tab to tab.
    move 'PRIN' to wa_tab-fcode.
    append wa_tab to tab.
    set pf-status 'STA3' excluding tab.
    Cheers,
    Simha.
    Reward all the helpful answers..

  • How to create application toolbar in modal dialog box in selection-screen

    Hi Experts,
    how to create application toolbar in modal dialog box in selection-screen?
    Regards,
    Swapnika

    Hi,
    Check the following link regarding Model dialog box and appication toolbar
    http://help.sap.com/saphelp_nw70/helpdata/en/d1/801b84454211d189710000e8322d00/frameset.htm
    It helps in solving your problem.
    Thanks.
    Ramya.

  • How to set width for this modal dialog box?

    Hi All,
    How to set width to this modal dialog box:
    <input id="btnVote" onclick="javascript:SP.UI.ModalDialog.showModalDialog({ url: &#39;../Lists/Sports%20Activities%20Voting/NewForm.aspx&#39;, title: &#39;User Survey&#39;}); return false;" type="button" value="Vote"/>
    Thanks in advance!

    set as bellow:
    <input id="btnVote" onclick="javascript:SP.UI.ModalDialog.showModalDialog({ url: &#39;../Lists/Sports%20Activities%20Voting/NewForm.aspx&#39;, title: &#39;User Survey&#39;,width:700,height:350}); return false;" type="button" value="Vote"/>
    yaşamak bir eylemdir

  • How to call jquery function when i close modal dialog box ?

    Hello,
    I need to call one jquery function when I click on close button of modal dialog box.Can anyone please let me know how can I implement it ?
    Thanks,
    Dipti Chhatrapati

    Hi Dipti,
    If my understanding is correct, you are using SP Modal Dialog and want to track the close event of this dialog. Then you may use
    dialogReturnValueCallback parameter of Options variable. Follow is the code sample:
    function ShowModal() {
        ExecuteOrDelayUntilScriptLoaded(function () {
            var options = {
                url: 'page1.aspx',
                tite: 'Add Title',
                width: 800,
                height: 450,
                allowMaximize: true,
                showClose: true,
                dialogReturnValueCallback: scallback
            SP.UI.ModalDialog.showModalDialog(options);
        }, 'sp.js');
     function scallback(dialogResult, returnValue) {
          if (dialogResult == SP.UI.DialogResult.OK) {
               // call your Jquery method here...
    Thanks, Ram

  • How to create a non hiding dialog box in swing

    Hi there,
    I want to create a non hiding Dialog box similar to MS Word Find/Replace dialog.
    The Dialog should not hide when the focus is lost. Instead it should become inactive & should remain on the top.
    Could someone please let me know how to create such a dialog in Swing?
    You help is highly appreciated.
    Thanks
    Rakesh Nagar
    [email protected]

    have a look at -
    http://forum.java.sun.com/thread.jsp?thread=327331&forum=57&message=1331793
    ManishRaje.

  • Focus Problem -- Two Non Modal Dialogs

    Hi ,
    In my applet, when user does something which is not allowed, I display an error message box (JOptionPane dialog - modal).
    There is another dialog box (non modal) that user
    can open to view search results and put it aside the
    applet window to do some parallel work.
    Now when error message dialog appears, the search
    dialog box also pops up even if the user
    has put this behind the applet window (by clicking browser window or applet, the search dialog goes behind the window).
    Can you please let me know, how can I get rid
    of this search dialog (non-modal) popup. I mean
    search dialog should remain open but should not
    come infront (ie should not get focus) when modal
    error message dialog pops up.
    NOTE: I don't want to make search dialog
    a modal dialog.
    Thanx,
    [email protected]

    Thanks for the reply michael. I forgot to mention particularly during my post that i am facing this problem on Solaris system. Running the same application on windows is working fine. I can't make other non-modal dialogs visibility to false because they should be visible on the screen all the time throught out the application life cycle and making it visible/non-visible doesn't get sense in my application. Does anybody is facing the same problem with Solaris system? Plz help.
    Hitesh

  • How to get title in Dialog box

    How to get title in Dialog box like "Adobe® Connect™ "

    Works for me. What happened when you tried?
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    tell application "Finder" to display dialog "I need ® or ™ in dialog box text" with title "I need ® or ™ in dialog box text" buttons {"Aha!"} default button 1</pre>

  • How to display a modal message while processing in a thread.

    I have difficulty in display a modal dialog while in processing in a background.
    I have created the following class.
    package fedex.screen.component;
    import java.awt.*;
    // This infobox is a modal dialog which display static text and stay
    // on screen without blocking proceeding code from execution and can
    // only close by issuing close method.
    public class ProcessInfoBox implements Runnable
         // Display dialog box
         private InfoBox dialog = null;
         // Thread to enable showing of Dialog Box
         private Thread thread = new Thread(this);
         // Determine if to close dialogbox
         private boolean isFinish = false;
         public ProcessInfoBox(Frame frame) {
              dialog = new InfoBox(frame,"Performing Operation","Processing...");
    thread.setPriority(Thread.MAX_PRIORITY);
         public void setTitle(String title) {
              dialog.setTitle(title);
         public void setText(String text) {
              dialog.getMessageLbl().setText(text);
         // The reference return will be ProcessInfoBox.InfoBox
         public InfoBox getInfoBox() {
              return dialog;
         // Thread method
         public void run() {
              dialog.setVisible(true);
              // If true return from thread and exit.
              while ( isFinish == false )
                   try
                        Thread.sleep(500); // 500 msec
                   catch ( InterruptedException e )
         // Start showing dialog
         final public void show() {
              thread.start();
              isFinish = false;
         final public void hide() {
              isFinish = true;
              dialog.setVisible(false);
         // Dialog box which show text.
         public class InfoBox extends Dialog
              private Label messageLbl = new Label("Processing ...");
              public InfoBox(Frame frame, String title, String message) {
                   super(frame,title,true);
                   initInfoBox();
              public Label getMessageLbl() {
                   return messageLbl;
              private void initInfoBox() {
                   setLayout(new BorderLayout());
                   add(messageLbl,BorderLayout.CENTER);
                   setSize(250,150);
    FormUtility.centerForm(this);
         public static void main(String[] args) {
              Frame frame = new Frame("BigMac");
              frame.setSize(600,600);
              frame.setVisible(true);
              ProcessInfoBox box = new ProcessInfoBox(frame);
              box.show();
              for ( int i = 1; i < 10000; i++ )
                   System.out.println(i);
              box.hide();
    To test the code I used the following section to test
    The main method in the class is used. In the simple
    example, the message did correctly update itself while
    i is increment. However, when I try on more complex
    application, the message just stalk there without
    updating itself as it is hanging.
    I have try to set piority to highest but without effect.
    Is there anything to rectify the situation
    thank

    The "please wait" dialog is a modal dialog. When u
    show it, the following code can not executed!
    That's the problem

Maybe you are looking for

  • How do I use the skin for a video object in one of my slides?

    I put an video object place holder in one of my question masters, and when I insert a video into the actual project slide, it will not play with a skin.  I can set it up to play automatically, but when I add a skin to it, the functions of the skin wo

  • Performance Problems with UI Element Tabstrip and IE

    Hi, I use the UI Element "Tabstrip" in a Java Web Dynpro Application. The application gets slower the more I jump from one tab to the next. All the other UI Elements (e.g. ComboBox, TextField) are affected, too. A system trace on the Web AS seems to

  • How to fix huge iTunes memory leak in 64-bit Windows 7?

    iTunes likes to allocate as much as 1.6GB of memory on my dual-quad XEON 8GB 64-Bit Windows computer and then becomes unresponsive. This can happen several times a day and has been going on for as long as I can remember.  No other software that I use

  • How to set up toggle between fields on a form in Adobe Acrobat?

    I've got a client who wants an interactive PDF form, which I've done a fair few of now. They have been the first people to raise this issue something that has bothered me as long as I've been doing them "Can you set it up to toggle to through to the

  • Garageband fails to initialize

    Hi, Stuck with Garageband. Not been working for a while now, perhaps 4-6 months or so. But haven't really wanted to use it until now. Problem: when I launch Garageband it "quits unexpectedly" but the 'initializing' bar remains. Looking in 'Force quit