Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

override WndProc()

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

    override WndProc()

    Hi,

    can anyone tell me the correct way to override WndProc()?

    I've tried

    protected override void WndProc(ref Message m)
    {
    }

    and when compiling I get the error :

    'Message' is an ambiguous reference between 'NinjaTrader.Cbi.Message' and 'System.Windows.Forms.Message'

    I tried

    protected override void WndProc(ref System.Windows.Forms.Message m)

    and I get the error

    'NinjaTrader.Indicator.WillsTradeZones.WndProc(ref System.Windows.Forms.Message)': no suitable method found to override

    Can anyone help with this?

    Thanks,
    Will.

    #2
    Originally posted by dontpanic View Post
    Hi,

    can anyone tell me the correct way to override WndProc()?

    I've tried

    protected override void WndProc(ref Message m)
    {
    }

    and when compiling I get the error :

    'Message' is an ambiguous reference between 'NinjaTrader.Cbi.Message' and 'System.Windows.Forms.Message'

    I tried

    protected override void WndProc(ref System.Windows.Forms.Message m)

    and I get the error

    'NinjaTrader.Indicator.WillsTradeZones.WndProc(ref System.Windows.Forms.Message)': no suitable method found to override

    Can anyone help with this?

    Thanks,
    Will.
    That is because there is nothing to override. You can select what specific event that you want to handle in NinjaTrader and subscribe to that event in the ChartControl, or else write a class to hook Windows procedures and then call the functions of that class.

    ref: https://msdn.microsoft.com/en-us/lib...(v=vs.90).aspx

    Comment


      #3
      Ok, looks like its not going to be as simple as I thought, but thanks for the pointer.

      I'll give it a go,

      Thanks,
      Will.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      556 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 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
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X