Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Windows Syntax

I have several instances of something like this:

Instead of the expected:

I thought it as just a typo in places throughout our code but I also have about a dozen instances in various Frameworks procedures. (Old version of Frameworks)

I just want to verify it is not a valid syntax variant that does something obscure I dont know about....


  • It is a valid syntax variant that does something obscure it would appear you don't know about.

    I give you the Subclass Control
  • I know that the SRP Subclass Control will refer to an affected Editline control with this kind of syntax. The wiki shows the following code to subclass an Editline with an Option Button.

    // Subclass my editline control and add an option button to it CtrlId = @Window:".EDITLINE" Handle = Get_Property(CtrlId, "HANDLE") rv = Send_Message(@Window:".OLE_SUBCLASS", "OLE.Subclass", Handle, CtrlId) Convert "." to ";" in CtrlId Set_Property(@Window:".OLE_SUBCLASS", "OLE.OptionButton[":CtrlId:"]", 1)
  • All the above are correct.
  • And if you are curious why we use that syntax, it's because OLE property indexes cannot use periods. I think you might not be able to use commas either. So we defy the powers and use both... stacked on top of each other.
  • Thank you both.

    Yes, That appears to be where my knowledge was lacking.
    I can see where those instances are prior to a subclass call.
  • I appreciate all the quick responses.
    At least I trusted my gut and decided to ask the question. I was about to go and 'correct' a number of entries but that didn't sit right... What swayed me was all the Frameworks entries. Everyone makes mistakes but SRP wont make THAT many ;-)

    Knowing what I know now I was actually surprised there are so few of those instances in our system so I decided to investigate. They must be older entries. A little further research shows the system is littered with not just those examples but also with the examples that @prattspets noted (Convert "." to ";" in CtrlId prior to the Subclass call).

    Also there is a SRP_SUBCLASS_SETUP function written before my time - which is what I generally use without having paid attention to the inner workings under the hood..

    And all of that has been superceded by SRP_SubClass_Services recently introduced for us by our good friend @Matt_Jones!

    And yes @KevinFournier, I was actually very curious as was about to note that very oddity!

    So. Dont touch things you dont know!
    Case Closed :)
Sign In or Register to comment.