• 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 Newtrader101, Today, 10:46 AM
      2 responses
      7 views
      0 likes
      Last Post Newtrader101  
      Started by tecmisc1, Today, 10:42 AM
      1 response
      4 views
      0 likes
      Last Post tecmisc1  
      Started by behindthewheel, Today, 10:39 AM
      0 responses
      4 views
      0 likes
      Last Post behindthewheel  
      Started by ballboy11, Today, 10:35 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by fredfred, Today, 10:30 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Melissa  
      Working...
      X