Announcement

Collapse
No announcement yet.

subclass code generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • subclass code generator

    I have just posted on my Australian site, a new subclass code
    generator for creating control subclasses for API style code.
    http://www.pbq.com.au/home/hutch/pbdll50.htm

    It will create subclass function for both dialog and window style
    API code. This version has most of the commonly used messages as
    options that can be selected and when the subclass function is
    created, it writes the selected messages into the subclass function.

    It comes with a very simple demo and the attached text file has a
    simple explanation of how control subclassing works.

    Regards and I hope its useful.

    [email protected]

    ------------------
    hutch at movsd dot com
    The MASM Forum

    www.masm32.com

  • #2
    Steve,

    I cannot seem to activate the following responses when
    selecting text in the edit fields and using CTRL + C, CRTL + V,
    or CTRL + Z keys. I thought these would have sent the messages
    %WM_COPY/CUT/PASTE.

    I can activate them by selecting text and then using the right
    mouse button to pop up the menu for edit functions.


    ' -----------------------------
    ' disallow clipboard functions
    ' -----------------------------
    Case %WM_COPY
    MsgBox "Clipboard functions not alowed",0,"Copy"
    FUNCTION = 0
    Exit FUNCTION

    Case %WM_CUT
    MsgBox "Clipboard functions not alowed",0,"Cut"
    FUNCTION = 0
    Exit FUNCTION

    Case %WM_PASTE
    MsgBox "Clipboard functions not alowed",0,"Paste"
    FUNCTION = 0
    Exit FUNCTION

    Regards
    David

    ------------------

    Comment


    • #3
      Dave,

      In the test piece the following code, (forgive my lousy spelling)

      Case %WM_COPY
      MsgBox "Clipboard functions not alowed",0,"Copy"
      FUNCTION = 0
      Exit FUNCTION

      Case %WM_CUT
      MsgBox "Clipboard functions not alowed",0,"Cut"
      FUNCTION = 0
      Exit FUNCTION

      Case %WM_PASTE
      MsgBox "Clipboard functions not alowed",0,"Paste"
      FUNCTION = 0
      Exit FUNCTION

      Throws the message away so that it is not processed by the CallWindowProc()
      back to the original message handling address. Using the standard key
      combinations, my testing here on win95b gives the results that are expected
      in that every attempt to Cut, Copy or Paste results in the MsgBox being
      displayed showing that the operation is not allowed. I get no response at
      all with CTRL + C, CRTL + V, or CTRL + Z, no MsgBox and no clipboard either.

      The UNDO capacity from the right click still works as it is not processed
      so it all seems to be working correctly here on my win95b version.

      Regards,

      [email protected]


      ------------------
      hutch at movsd dot com
      The MASM Forum

      www.masm32.com

      Comment


      • #4
        Thanks Steve, I now follow.

        Regards

        David

        ------------------

        Comment

        Working...
        X