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.
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
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.
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:
Last edited by DarkLinkVaz; Sep 1st, 2006 at 12:34 PM.
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++
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.