• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ControlCenter HWND Handle

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    ControlCenter HWND Handle

    Dear Experts!

    Is it possible to get HWND Handle of Control Center window in the code of indicator?

    Thank you in advance
    GmA

    #2
    Hello gma17,

    Thank you for your note.

    So I can best answer your question, could you please provide more information by what you mean by handle, HWND, as well as what you are attempting to do?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hello Alan!

      Sorry for not being clear enough.
      My indicator is using external unmanaged DLL making some specific calculations.
      During setup, indicator provides chart window handle to DLL as follow:
      Code:
      Chart cChartWindow = null;
      IntPtr iptChartHWND = IntPtr.Zero
      (ChartControl != null)
      {
       if (ChartControl.PresentationSource != null)
      	{
      	 cChartWindow	= ChartControl.PresentationSource as System.Windows.Interop.HwndSource;	
      	 iptChartHWND	= cMaintWindow.Handle;
      	 cChartWindow	= null;	
      	}
      }
      There is also a need to provide similar handle of Control Center Window.
      Hence the question: how can I get that handle.

      Hope it clarifies.

      Comment


        #4
        Hello gma17,

        At the following link, under Launching your Window from the Control Center, you’ll see how to grab the control center window. There is no suggested way to get the handle from this window, however since you have the instance of the control center you may be able too.

        https://ninjatrader.com/support/help...don_window.htm

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Hello Alan!

          An example you've provided is for AddOns while I've been talking about Indicators.
          In any case, I have found the sample for Indicator and based on it, have got required result.
          Thank you for the direction.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Erwin Beckers, Today, 01:23 AM
          0 responses
          2 views
          0 likes
          Last Post Erwin Beckers  
          Started by Mark Taylor, Yesterday, 11:36 PM
          0 responses
          3 views
          0 likes
          Last Post Mark Taylor  
          Started by Bluebeep, Yesterday, 08:38 PM
          0 responses
          10 views
          0 likes
          Last Post Bluebeep  
          Started by stokhastic, Yesterday, 07:08 PM
          0 responses
          3 views
          0 likes
          Last Post stokhastic  
          Started by jlkramer16, Yesterday, 04:29 PM
          1 response
          5 views
          0 likes
          Last Post jlkramer16  
          Working...
          X