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.



        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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          579 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X