Add num edit control to existing MFC DLL

Hi,
I'm using Visual C++ 6.0 and Visual Studio 6.0 SP3, with Measurement Studio 6.0.0 (eval version).
I have a C++ DLL which is using shared MFC.  It holds various dialogs that my app needs.  Onto the waveform dialog, I want to add NI graph (not 3D graph) and num edit controls.
I looked at the tutorial for "Manually Adding Components to My MFC-Based Project" but it seems that the additional steps don't apply to either of the controls I'm adding.
Currently my waveform dialog contains only VS controls, and it works as expected both in the Visual Studio debugger and outside of it.
So in the Visual Studio resource editor, I right-click, select "Insert ActiveX Control", and select the "CWNumEdit Control (National Instruments)", and the path shown is "C:\\Windows\system32\cwui.ocx".  I change its style so it looks like the classic control, and change its name.  My project builds and links with no additional header files or libs added to the project.*
Now I run my app in the Visual Studio Debugger.  But when I call the code to create an instance of my dialog, it returns a 0 instead of a handle (indicating that it failed to create the object).  (I can't step into the call to create the dialog.)  But when I call GetLastError() it returns a 0, indicating no error!
*I believe I at some point had some old Measurement Studio stuff loaded, which apparently had come along with other National Instruments installs that I had done. Is that possibly confusing my compile/link?
What am I missing? Thanks in advance for any help ...

Hi B.Anderson,
You may be missing some components to your project. Here's a thorough KnowledgeBase article that discusses this:
Adding Measurement Studio Controls to an MFC Project in Microsoft Visual C++
If going through that doesn't help. Could you post a section of your code that is causing the problem and also show what libraries you have included?
Take care!
Tanya V
National Instruments
LabVIEW Platform Product Support Engineer

Similar Messages

  • I want to use the expression edit control in a VC++ DLL, how?

    Good morning,
    as mentioned I want to use the expression edit control in my DLL written with VSC++ 2005 MFC. But I ran into some problems:
    If I just add the ExpressionEdit control from the toolbar to my dialog then the dialog will not be shown during runtime. As soon as I delete the control the dialog shows up.
    In the TS examples is one called 'TCL' (...National Instruments\TestStand 4.1.1\Examples\Tcl\source\EditSubstep). This is programmed in C++ and uses the expression edit control.
    The original dll works fine but as soon as I compile the editsubstep with my VS 2005 I get a runtime error (see image).
    What do i have to do to be able to use this control?
    Has anybody an working example for me?
    Cheers Frank
    Solved!
    Go to Solution.
    Attachments:
    fehler.JPG ‏21 KB

    @juergen: how do I know which lib I am using?
    I am using this COM-Control: c:\programme\national Instruments\testStand 4.1.1\bin\exprEdit.dll
    @Doug: I created the sequence as you described and used this for debugging to find out where the problem is.
    I found out, that the problem must be somewhere here:
    dlgcore.cpp
    BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,
    CWnd* pParentWnd, HINSTANCE hInst)
    Line 314:
    hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate,
    pParentWnd->GetSafeHwnd(), AfxDlgProc);
    Without the ExpEdit-control hWnd has a Value
    with control hWnd is 0.
    This is what I found out so far.
    Frank

  • How to add A Gauge Control in VC++ MFC Application

    How to add A Gauge Control in VC++ MFC Application.
    i want to add Gauge Control in my Application. like meter.
    ther meter should perform depends upon the value.
    for example , Assume the meter have 10 units 1-10 . if the value (ie, input ) is 4 the meter point out the 4 like that.

    How to implement CProgressCtrl to like this.
    https://social.msdn.microsoft.com/Forums/getfile/643828
    You need to implement this all by your own or if you are lucky you may something find @Codeproject, CodeGuru, ...
    Here you will find examples on creating custom controls (in general)
    http://www.codeproject.com/Articles/521/Creating-Custom-Controls
    https://msdn.microsoft.com/en-us/library/bk2h3c6w.aspx?f=255&MSPPError=-2147217396
    You will find a lot more stuff if you try your prefered search engine.
    Maybe this one fits the best to your requirements:
    http://www.codeproject.com/Articles/9375/CStatic-derivative-CSpeedoMeter-class
    Best regards
    Bordon
    Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.

  • How to avoid exception when setting a date in an Edit control?

    I'm have made a Coded UI Test with VS 2012 for a web application of a colleague.
    In that web application is a table with some entry fields of type Edit.
    In one of these fields (called "DatumAb") i can enter a date in format "dd.mm.yyyy" (day, month and year).
    Coded UI Test identifies the control by the name "von (tt.mm.jjjj)", which is in fact just a placeholder.
    When i replay my recording i get an exception which says, that either the control is not ready or not valid.
    Next i have called the DrawHighlight method for that control.
    While the replay i can see the blue frame, so the control is accessible.
    Can anybody tell me, what's going wrong?
    Here an excerpt from the HTML-Code of the web application with the date field:
    <table class="table table-hover table-bordered table-condensed table-well table-responsive">
      <thead>
        <tr>
          <th class="ng-scope" translate="global.datum.Von">von</th>
        </tr>
      </thead>
      <tbody>
        <!-- ngRepeat: vb in vm.formData.Vorbeschaeftigungen -->
        <tr class="ng-scope" ng-repeat="vb in vm.formData.Vorbeschaeftigungen">
          <td>
            <input value="11.02.2015" rm-date-input="" ng-model="vb.DatumAb" class="form-control ng-pristine ng-untouched ng-valid ng-valid-rm-date-input ng-valid-rm-date-input-format
    ng-valid-rm-date-input-day ng-valid-rm-date-input-month ng-valid-rm-date-input-year" placeholder="von (tt.mm.jjjj)" type="text">
          </td>
    And at last the exception message.
    Sorry - only in german.
    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException wurde nicht von Benutzercode behandelt.
      HResult=-268111872
      Message=Das Steuerelement ist nicht verfügbar oder nicht gültig. Weitere Details:
    TechnologyName:  "MSAA"
    Name:  "von (tt.mm.jjjj)"
    ControlType:  "Edit"
      Source=Microsoft.VisualStudio.TestTools.UITesting
      BasicMessage=Das Steuerelement ist nicht verfügbar oder nicht gültig.
      StackTrace:
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.AddUITestControlDescriptionToException(SystemException exception, IPlaybackContext context)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, UITestControl uiControl)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, Object parameterValue, UITestControl uiControl)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyPrivate(String propertyName, Object value)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass14.<SetProperty>b__13()
           bei Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetProperty(String propertyName, Object value)
           bei Microsoft.VisualStudio.TestTools.UITesting.WinControls.WinEdit.set_Text(String value)
           bei TestMitVorbeschaeftigungen.UIMap.DatumVon() in c:\CodedUiTests\Tests mit Webanwendung\TestMitVorbeschaeftigungen\TestMitVorbeschaeftigungen\UIMap.Designer.cs:Zeile 92.
           bei TestMitVorbeschaeftigungen.CodedUITest1.CodedUITestMethod1() in c:\CodedUiTests\Tests mit Webanwendung\TestMitVorbeschaeftigungen\TestMitVorbeschaeftigungen\CodedUITest1.cs:Zeile 37.
      InnerException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException
           HResult=-268111872
           Message=Das Steuerelement ist nicht verfügbar oder nicht gültig.
           Source=Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa
           BasicMessage=Das Steuerelement ist nicht verfügbar oder nicht gültig.
           StackTrace:
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.MsaaUtility.MapAndThrowException(SystemException e, Boolean throwNotSupported)
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.AccWrapper.set_Value(String value)
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.MsaaElement.set_Value(String value)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetValueInEditableControl(UITestControl editControl, String propertyValue)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetEditProperty(String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetPropertyValue(UITestControl uiControl, String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.UITestPropertyProvider.SetPropertyValueWrapper(UITestControl uiControl, String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
           InnerException: System.NotImplementedException
                HResult=-2147467263
                Message=Die Methode oder der Vorgang ist nicht implementiert.
                Source=Accessibility
                StackTrace:
                     bei Accessibility.IAccessible.set_accValue(Object varChild, String pszValue)
                     bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.AccWrapper.set_Value(String value)
                InnerException:

    Hi Patrick Pirzer,
    >>That either the control is not ready or not valid.
    Next i have called the DrawHighlight method for that control.
    My suggestion is that you would check whether this control is really existing when playback actions run on this control. Or add a wait event would be better.
    http://blogs.msdn.com/b/gautamg/archive/2010/02/12/how-to-make-playback-wait-for-certain-event.aspx
    Reference:
    http://stackoverflow.com/questions/11737254/codedui-test-not-waiting-for-control-to-exist
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Diff. btw. Region edit controls and provider.xml controls on rendering portlet UI

    hi,
    Apologize if this has been asked already.
    What are the differences if any between -
    - controlling the display of portlet header/border in the provider.xml file (containerRenderer set to false)
    V/S
    - controlling in the page edit mode (edit defaults) and uncheck the "display banners/borders" for the portlets at the region level.
    Appreciate it if anyone can explain any subtle differnces if they exist, or if they complement/overide each other. I am planning to set the containerRenderer to false to show them programmatically.
    regards
    -Ananth

    I'm using VS 2013 Coded UI Test Builder trying to add some new recorded elements to an existing window. The top level window that the coded ui test builder generated had to be modified since the title changes depending on the contents in a form. I've tried
    different ways to identify it but the simplest that seems to work looks like this (basically eliminated the name and just search for the winform name):
    public class UICustomerWindow: WinWindow
    public UICustomerWindow()
    #region Search Criteria
    this.SearchProperties[WinWindow.PropertyNames.ControlName] = "frmCustomerMaintenance";
    #endregion
    Like I said, this works in all the tests automated already and the coded ui test builder can find it if I click the refresh button. The problem occurs when I try to add any new element or exiting element. The UI builder likes to ignore all the previous recordings
    for that UI map and add a completely new top level window and elements in that window:
    public class UIViewEditCustomerDURGWindow : WinWindow
    public UIViewEditCustomerDURGWindow()
    #region Search Criteria
    this.SearchProperties[WinWindow.PropertyNames.Name] = "View/Edit Customer DURGAN, KENYON";
    this.SearchProperties.Add(new PropertyExpression(WinWindow.PropertyNames.ClassName, "WindowsForms10.Window", PropertyExpressionOperator.Contains));
    this.WindowTitles.Add("View/Edit Customer DURGAN, KENYON");
    #endregion
    Is there something I'm missing or this just a limitation of the Coded UI Test Builder? BTW, if more info is needed, let me know and I can probably provide it since its all dummy data.

  • Text editing  - can you add text editing options on the 'in-browser editing'

    Text editing  - can you add text editing options on the 'in-browser editing' tool?

    You can only replace existing content, not edit the page structure. Refer to the respective help sections.
    Mylenium

  • How do I add multiple songs to an existing playlist from the (no longer called) Library? Highlighting multiple songs and clicking the "Add to" button will only add the with the little arrow, not all the highlighted ones!

    How do I add multiple songs to an existing playlist from the (no longer called) Library? Highlighting multiple songs and clicking the "Add to" button will only add the one with the little arrow, not all the highlighted ones! I am using the "new" iTunes.

    For the moment there isn't a way for us end-users to control what is "matched" or "uploaded." That is purely a result of Apple's server-side algorithms.
    To re-add multiple songs at once simply highlight all the songs you want to re-add, then right-click (or Control+click) the list and choose "add to iCloud."

  • Screen error while adding  table control to existing tab in BP screen

    Hi experts,
    Requirement: Add new section with table control in existing tab in BP screen. Purpose of creating table control is to add or delete multiple entries etc.
    To fill this requirement, we have created custom transaction with table control facility. When we run this transaction from SAP easy screen, we are able to add, delete and create multiple records to database.
    We have configured this custom program and screen in BDT (views) and saved.
    When we call BP transaction we are getting following error message.
    "Screen ZMOD_TEST1 0100 must be an Include screen (screen error)".
    We are not sure, the approach we have chosen is correct. Incase, any one of you come across this type of problem, please guide us to rectify.
    Thanks in advance.
    Venky

    Venky,
    If you are on CRM 4.0 or even 5.0, my approach to adding a table to business partner attributes would have been the following:
    - Use EEWB to generate the table extension
    - Modify the generated code/screens if what was generated did not meet you complete requirements
    However going back to your original question, if you add new screens for the BDT, then they must be "subscreens".  The screens you create for the BDT tool are always subscreens placed in a container by the BDT program.
    So your options are one:
    1.  Convert your screen to a subscreen and if you have coded all the BDT event function modules correctly it should work
    2.  Use EEWB to generate a new extension and make adjustments as necessary.
    Good luck,
    Stephen

  • Can't see "Add or Edit Fields" menu in Acrobat 9 Standard v9.5.2

    I am trying to edit the fields of an Adobe form from one of my co-workers.  We both are running Acrobat 9 Standard v9.5.2.  She is able to see the Forms-->"Add or Edit Fields" menu, while I cannot.
    I cannot get this menu item to show?  Can someone tell me if there is an option or setting to enable so that I can get to this menu item?
    Here is a screenshot of the form:
    Here is a screenshot of the Adobe Acrobat version we are running:
    Thanks,
      Ted

    Finally found a work around to my problem.  Here are the steps:
    (1) The original form.  Note missing "Add or Edit Fields" menu item.
    (2) Click on Document-->Extract Pages
    (3) The following dialog pops up.  Since I am only working with a 1 page form I accept the defaults and click OK.
    (4) The following window is launched.  Now I just save the newly generated form:
    (5) Now when I check the Forms menu, I finally see the "Add or Edit Fields" item:  Yay!!!!
    (6) In checking the Document Properties of the new form, the Application (PScript5.dll)  and PDF Producer (GPL Ghostscript 8.15) metadata is still the same as before:
    Still don't know why I couldn't get to the "Add or Edit Fields" menu item in the original form.  After doing the Extract, now I am able to get to it.   At this point that's all I care about right now.
    Thanks George for helping me investigate this issue!
    Teo

  • Java Add-In installation on a existing ABAP System (MSCS Cluster)

    Hi all
    we try to install a Java Add-In for a already existing ABAP System with
    SAPinst. The ABAP System is a NetWeaver2004s SR1 System in a MSCS Cluster.
    We have the Problem that we can´t choose the Installation Drive during
    the SAPInst Define Parameter Step during the "Central Services Instance (SCS) Java Add-In" Installation.
    But in the Installation Manual for
    NW2004s Java AS in Chapter 4.3.2 is stated:
    "Caution: You must install it on the same shared disk as the ASCS instance."
    If I run the Installation, the SCS will be installed on the local disk E:
    beside the Central Instance. But it need to be on the shared Disk P:
    beside the ASCS installation. How can I control this?
    Stefan

    obviously the network share saploc is existing in your system an pointing to a local device.
    Delete the local saploc share, install SCS instance, run MSCS first node, additional node, create the local share saploc again (don't forget to set permissions on the share, the default permission did only allow Read vor Everyone) and proceed with installation.
    There is a note in creation for this issue.
    peter

  • [Ai-CS4] How to add an  art board to existing document ?

    hi all,
    can anybody suggest me how to add a new artboard to existing document? I didn't find any ArtBoard Palette in CS4. But in CS5 it is given.
    thanks,
    D.A

    The Artboard panel is new to AiCS5. In CS4, a new artboard can be added by doing either of the two:
    1. Pick the Artboard Tool and click-drag it in the canvas area of the Illustrator document.
    2. Pick the Artboard Tool, click on the 'New Artboard' button in the Control Panel. Then select the desired size from the list of Artboard Presets in the Control Panel and then click in the desired area of the canvas to add a new Artboard.
    Hope this helps.
    Neeraj

  • How  to  Add  Calender &  Calculator controls  on   TextBox in  SAP B1

    Hi  Experts,
    How  to  add  the calender  control  and  calculator  control  to  textbox  in  SAP B1
    Thanks,
    Y.
    Edited by: Yughandar on Jul 20, 2010 3:24 AM

    Hi,
    Textbox will automatically display calucator and calender depending on the binding.ie if we bind the textbox with UDF of type Datetime then the it will automatically display the calender..
    Regards
    Arun

  • Tabstrib - how to add a tab into a existing tabstrip ?

    Hello,
    I have add a tab into a existing tabstrip. What is step by step the procedure to do ?
    If I go on the existing tabstrip, I can't see the "create a new tab" or something likr that.
    Tks,
    R

    HI,
    Double click in the Corner area of TabStrip and enter the number TAB CONTROL in the Attributes pop up window
    Or simply drag a Push Button and place on the Tabstrip Control
    Cheerz
    Ram

  • Add JavaScript file to ALL existing Task List pages and to newly created list pages

    We have several OOTB task lists that are in use on several subsites.  We want to add JavaScript to the NewForm.aspx and EditForm.aspx for these task lists. These lists have not been customized, they are based on the standard Task Content Type.
    Since there are several lists already created and in use, it would be far too much work to manually add a Content Editor web part to each page.
    We put the JavaScript file in the top-level site style library.
    Is there a way to programmatically attach a script reference to each existing page in all the subsites AND have the script reference placed on any NEW list pages created from the OOTB Task content type? Or, add a CEWP to all existing list pages using a feature?
    I could not find any examples of this.

    Hi,
    A solution would be like this: Add your script into a Content Editor Web Part in a page, then add this Content Editor Web Part into the NewForm page of these Task lists using
    SharePoint Object Model.
    More information:
    Use
    SPList.Forms property to retrieve the URLs of the specific form of these Task lists:
    http://sharepointcore.blogspot.com/2011/08/sharepoint-listitem-new-edit-and.html
    With
    SPLimitedWebPartManager object, we can retrieve the web parts of a page, choose one and add into another
    page:
    SPLimitedWebPartManager.WebParts
    property
    SPLimitedWebPartManager.AddWebPart
    Another two links about this for your reference:
    http://www.stefangordon.com/add-web-part-to-page-programmatically/
    http://sharepoint.stackexchange.com/questions/9442/how-to-programmatically-add-a-webpart-to-a-page
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • [Smartfroms] Problems in fetching text edit control text

    Hi gurus,
    I made an application using Screen programming (or dialog programming you must say). I used 3 tab strips. In last tab strip I used a text edit control to write remarks in multiple lines.
    I save those remarks (data element: TEXT255) in a custom table as they are saved as "sdfsdfsdf##df##sd##fsd##fsd##fsd##f##sd##f". Fine enough as "ENTER KEY" is interpreted as "##".
    I fetched them easily in a display mode using get_stream method. All good.
    But the problem arose when I needed to fetch those saved remarks in a smartform.
    When I fetched those remarks they came as "sdfsdfsdf##df##sd##fsd##fsd##fsd##f##sd##f" in samrtform's text_box.
    I tried a Find and replace command but ## couldn't process, it's because ## is just the interpretation of ENTER KEY.
    I need them as
    sdfsdfsdf
    df
    sd
    fsd
    fsd
    fsd
    f
    sd
    f
    Is there anyways to get multiple lines text box in smartforms or can I remove those "##" from the text?
    Regards,
    Mansoor Ahmed.

    I am saving it as a text in TEXT255 data element.
    But in text edit control when i press enter it adds ## to the text. And ## could not be processed via FIND and REPLACE commands.

Maybe you are looking for

  • Photo's are not displayed in iPhoto

    I can see Events and can click on them to see pictures, but when I click on the individual photos, they are not displayed, although I can see them in the "filmstrip' at the bottom of the screen. iPhoto will show the names if someone is tagged in the

  • HT5527 How can I find a list of what documents are stored on I-cloud?

    Is there a way to list documents stored on I-cloud? I want to delete any documents or transfer them to computer. In other words, "Is there a directory of I-cloud documents?"

  • Partial Delivery of vendors

    Hello everybody, i want to make a query to know the partial Deliveries of our Vendors..example PO ItemCode      ItemDesc    Qty    Price 100000       test Item       10      10 now, the vendor make a partial delivery on this PO GRPO ItemCode      Ite

  • Cartridges are set to default quality

    HP Photosmart 7520 get error message "cartridges are set to default quality" when trying to align cartridges.  Get black but no color. 

  • Trying to figure out if I have a Gigabit Ethernet card

    I'm trying to figure out if I have a gigabit ethernet card - currently, it's operating at 10x slower but I was told that sometimes it can be switched to Gigabit in the settings. If not, what kind of card should I get? Thanks!