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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      310 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X