How do you make an OwnerDraw text box control? 
Author Message
 How do you make an OwnerDraw text box control?

I want to start to write my own OwnerDraw text box control with all the
nice features with simple text colour and text 3d effects.

For example, my own rich text box with extra effects on the fonts, etc.

Thanks for any info!



Sat, 03 Mar 2001 03:00:00 GMT  
 How do you make an OwnerDraw text box control?

Quote:
Judge Gotstein wrote...
>I want to start to write my own OwnerDraw text box control with all the
>nice features with simple text colour and text 3d effects.

>For example, my own rich text box with extra effects on the fonts, etc.

Since the Windows "edit" class doesn't have an owner-draw style, you'd have to
write your own textbox from scratch. The only example of this that I know of is
in the book "Programming Windows 95", by Charles Petzold. The sample code is in
C, but is easily translatable.

--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, v. 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/
Please direct your programming questions to the newsgroups.



Sun, 04 Mar 2001 03:00:00 GMT  
 How do you make an OwnerDraw text box control?
On Wed, 16 Sep 1998 10:46:30 -0600, "Ben Baird (MSMVP)"

Quote:

>Since the Windows "edit" class doesn't have an owner-draw style, you'd have to
>write your own textbox from scratch. The only example of this that I know of is
>in the book "Programming Windows 95", by Charles Petzold. The sample code is in
>C, but is easily translatable.

Hello! I have an input box that is userdrawn AND uses a text box. I
also would like to get rid of the text box and draw the whole thing.

THE REAL PROBLEM is that I cannot figure out how to properly create
and destroy a caret and change the caret position and do highlighting
with the mouse or shift arrows. Do you have any good examples?

Thanks Marc

Tech Support Sunbelt Software Inc.



Fri, 09 Mar 2001 03:00:00 GMT  
 How do you make an OwnerDraw text box control?
Quote:
>THE REAL PROBLEM is that I cannot figure out how to properly create
>and destroy a caret and change the caret position and do highlighting
>with the mouse or shift arrows. Do you have any good examples?

I haven't written any myself, but the example I mentioned covers using the
system caret as well.

--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, v. 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/
Please direct your programming questions to the newsgroups.



Fri, 09 Mar 2001 03:00:00 GMT  
 How do you make an OwnerDraw text box control?
I had trouble getting the caret create and destroy functions to work
properly with VB's GotFocus and LostFocus events.  You may need to actually
subclass your UserControl's message loop to get the events you need to do it
properly.

I translated Petzold's code from Programming 32-bit Windows and it didn't
work properly in VB.

Hope this helps...

Ken.


Quote:
>On Wed, 16 Sep 1998 10:46:30 -0600, "Ben Baird (MSMVP)"

>>Since the Windows "edit" class doesn't have an owner-draw style, you'd
have to
>>write your own textbox from scratch. The only example of this that I know
of is
>>in the book "Programming Windows 95", by Charles Petzold. The sample code
is in
>>C, but is easily translatable.

>Hello! I have an input box that is userdrawn AND uses a text box. I
>also would like to get rid of the text box and draw the whole thing.

>THE REAL PROBLEM is that I cannot figure out how to properly create
>and destroy a caret and change the caret position and do highlighting
>with the mouse or shift arrows. Do you have any good examples?

>Thanks Marc

>Tech Support Sunbelt Software Inc.




Sat, 10 Mar 2001 03:00:00 GMT  
 How do you make an OwnerDraw text box control?
On Mon, 21 Sep 1998 12:09:25 -0600, "Ben Baird (MSMVP)"

Quote:

>I haven't written any myself, but the example I mentioned covers using the
>system caret as well.

I know this is going to sound cheap on my part but could you post or

:-)

THANKS!
Marc
Tech Support Sunbelt Software Inc.



Mon, 12 Mar 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. REPOST: How to display a user control on combo box drop down (OwnerDrawn)

2. Problems making a automatic text box when selecting in a combo box

3. Examples of OwnerDrawn for Combo Box / List Box / Menu / Toolbars

4. Rich Text Box or text box control

5. Doing strange things with text boxes

6. Encode text boxes -- can it be done?

7. Making default of a calculated text box value $ 0.00

8. Making a user defined text box visible in a custom form

9. Making a hyperlink in a rich text box

10. making text boxes after the form has loaded

11. making a text box act like a tool tip

12. Createing a count down timer and making required things in a text box

 

 
Powered by phpBB® Forum Software