Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Javierw.ok, Today, 04:12 PM
      0 responses
      4 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      40 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X