Results 1 to 16 of 16

Thread: [RESOLVED] Help with windowless controls

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Resolved [RESOLVED] Help with windowless controls

    Hi,
    I would like to know if it is possible to hook onto Windowless controls

    Thanks In Advance

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Help with windowless controls

    Most probably not possible.
    Why and what control you want to hook ? Maybe someone will find another way.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help with windowless controls

    I wanted to hook a Windowless TextBox
    But if there isn't a way...

  4. #4
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Help with windowless controls

    what is a windowless textbox?

    A textbox is a window

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help with windowless controls

    A windowless textbox is precisely what the name means.
    It's a TextBox that isn't a window and hasn't got am handle

    There is a .ocx file in vb6 that allows us to use windowless controls

  6. #6
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Help with windowless controls

    AFAIK, there is no 'windowless' textbox that comes with VB.

    Post a screenshot. Or better attatch a demo project.
    What is the ocx ? Give us its name (and what it shows in the components window).
    What is the default name of this 'textbox' when you add in your form ?
    Rightclick the ocx file, goto properties, and see if you can find company information.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help with windowless controls

    The ocx file is <VB6 CD>\Common\Tools\VB\Winless\Mswless.ocx. There you will find the ocx file, a .reg file to make it available to vb6 after registering with regsvr32.exe and a chm file with the documentation.

    Unfortunately, I'm not on my PC so I cannot post the files here

  8. #8
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Help with windowless controls

    Ah ! I see !
    Sorry, no idea about these controls.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  9. #9
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Help with windowless controls

    I also am not familiar with this control and I don't have the install disks with me right now.

    If the control is truly windowless then you cannot hook it because it probably does not have a message queue.

    Messages are probably handled by its container, i.e. the window that it sits on.

    Try looking at the messages the container form receives when you enter text into this windowless textbox.

    See "Windowless Activation" in VS help.
    Since windowless controls do not have their own windows, the container (which does have a window) is responsible for providing services that would otherwise have been provided by the control’s own window. For example, if your control needs to query the keyboard focus, capture the mouse, or obtain a device context, these operations are managed by the container. The container routes user input messages sent to its window to the appropriate windowless control, using the IOleInPlaceObjectWindowless interface. (See the ActiveX SDK for a description of this interface.) COleControl member functions invoke these services from the container.
    Last edited by moeur; Aug 29th, 2006 at 07:32 PM.

  10. #10

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help with windowless controls

    ok i'll try it but the enablewindow function among others will not work with this type of controls
    Do you know any way to still use the functions???

  11. #11
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Help with windowless controls

    Why do you want to use the windowless textbox? It gives no advantage over a regular textbox (it doesn't support Unicode either afaik).

  12. #12

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help with windowless controls

    Quote Originally Posted by Merri
    Why do you want to use the windowless textbox? It gives no advantage over a regular textbox (it doesn't support Unicode either afaik).
    Yes, you are right. But it gives more security.

    Anyway, there is a program with a windowless textbox (I don't have the source code) and I want to hook the textbox. That's why I need a way to use some functions.
    BTW, is there any other way to enable/disable a TextBox?

    EDIT: I now have the CD's with me. Here are the files:
    Attached Files Attached Files
    Last edited by DarkLinkVaz; Sep 1st, 2006 at 12:34 PM.

  13. #13
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Help with windowless controls

    What is it you are wanting to do? You haven't really specified what you are wanting to do other than "know" if theres a way to hook a windowless textbox.

    How are you wanting to interact with this textbox? get the text in it? change it? disable/enable it? You may not need to use any 'hook'. anywho, need more information on what you're doing.
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  14. #14
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Help with windowless controls

    Check out the code in this thread
    http://www.vbforums.com/showthread.php?t=426193

  15. #15

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    15

    Re: Help with windowless controls

    What I wanted to do was use EnableWindow and SendMessage on that text box

  16. #16

    Re: Help with windowless controls

    Hmm, did someone delete my other post? Maybe it didn't get posted right (I'm kind of absent minded, might have missed the Post button and closed the tab). Here it is:

    A windowless control is created, drawn, and handled by the program itself. Everything you can do with it is defined in a function. If you want to disable it, you need a Enable/Disable function that will stop it from receiving input and draw on the Disabled state.

    You cannot use API calls on a windowless control. Anything you do with it, you need to write from scratch.

    However, since you're not actually writing this control (you got it from a windows DLL, did you not?), you will need to explore the functions available from that DLL, since you won't be able to write your own.

    Why do you need a windowless control? The main reason to use them would be if you have many many controls, and cannot have handles for all of them. Windows has a limit of 10,000 handles per process. So, for example, web browsers like Firefox and Internet explorer use windowless controls in webpages, because one page can easily take up a ton of control handles. It is very hard to make controls that look and act like the standard windows controls, but it is usually well worth it. I doubt that what you are doing really needs windowless controls, but as I don't know what it is, I may be wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width