• 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

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 MarthaClines, Today, 06:20 PM
      0 responses
      7 views
      0 likes
      Last Post MarthaClines  
      Started by Irukandji, 05-09-2019, 04:28 AM
      38 responses
      298 views
      0 likes
      Last Post nkhoi
      by nkhoi
       
      Started by manugarc, Today, 01:15 PM
      0 responses
      11 views
      0 likes
      Last Post manugarc  
      Started by JMont1, Today, 11:42 AM
      0 responses
      9 views
      0 likes
      Last Post JMont1
      by JMont1
       
      Started by Steve L, Yesterday, 10:04 PM
      0 responses
      4 views
      0 likes
      Last Post Steve L
      by Steve L
       
      Working...
      X