Change Attributes in EDIT WindowClass

Change Attributes in EDIT WindowClass

Post by Daniel Finge » Thu, 10 Jul 2003 23:53:59



Hi,

can anybody help me?

I want to create a usercontrol in VB6 which should behave like a normal
textbox.
I tried to put the textBox onto the usercontrol and wrote the needed events
and properties but the propertie for multiline can't be set at runtime!
So i decided to create an own usercontrol with edit-capabilities.

Now my problem:

I started to create an edit-class like this:

    StdStyles = WS_CHILD Or WS_VISIBLE Or ES_LEFT Or ES_AUTOHSCROLL Or
ES_WANTRETURN Or ES_MULTILINE
    TextBoxWnd = CreateWindowEx(ExStyles, "Edit", "Text1", StdStyles, 0, 0,
ScaleWidth, ScaleHeight, UserControl.hwnd, 0&, App.hInstance, 0&)

Now how can I change the backgroundcolor of my edit-class window?

I tried with

SetBKColor-Api or subclassed the WM_PAINT event but nothing works, the
backcolor is always standard-windows colored

    idc = GetWindowDC(TextBoxWnd)
    Debug.Print "bk" & SetBkColor(idc, vbWindowText)
    Debug.Print "tk" & SetTextColor(idc, RGB(128, 128, 128))
    ReleaseDC TextBoxWnd, idc

Now what to do? Any Ideas?

Thanks for your help

Daniel Finger

 
 
 

Change Attributes in EDIT WindowClass

Post by Mike D Sutto » Fri, 11 Jul 2003 00:22:17


Quote:> I want to create a usercontrol in VB6 which should behave like a normal
> textbox.
> I tried to put the textBox onto the usercontrol and wrote the needed
events
> and properties but the propertie for multiline can't be set at runtime!
> So i decided to create an own usercontrol with edit-capabilities.

> Now my problem:

> I started to create an edit-class like this:
<code snipped>
> Now how can I change the backgroundcolor of my edit-class window?

> I tried with

> SetBKColor-Api or subclassed the WM_PAINT event but nothing works, the
> backcolor is always standard-windows colored

<code snipped>

Hook the WM_ERASEBKGND message instead.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

Change Attributes in EDIT WindowClass

Post by Mike D Sutto » Fri, 11 Jul 2003 00:48:39


In addition, here's an article that you will probably find handy with this:
http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Tile_...
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

Change Attributes in EDIT WindowClass

Post by Daniel Finge » Sat, 12 Jul 2003 16:11:12




Quote:> In addition, here's an article that you will probably find handy with
this:

http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Tile_...

Quote:> Hope this helps,

>     Mike

Thanks Mike,

but this only works with multilined textboxes :-(

 
 
 

1. Editing Many Surface Attributes at Once?

Does anyone know if there is an easy way to select multiple surfaces at
once and edit their surface properties together?  For example, I import
a Light* (Formerly Lightscape) solution into Lightwave Layout.  I end up
with about 120 surfaces called walltrim (walltrim.01, walltrim.02,
etc.)  I want to change the diffuse level of all of the surfaces called
walltrim without having to manually open each surface and type in the
same change 120 times.

This is compounded by the fact that I have about 20 different surfaces
(e.g., walltrim, floor, doors, etc.) that I need to do this to.

If layout cannot do this directly, can these properties be modified
directly using a text editor on the *.lws file itself?  Or maybe I
should just write an LScript?

Thanks for any ideas.

Dan Katzenberger
Katzenberg USA Inc.
Minneapolis, MN

2. Filters showing DOUBLES

3. Maya: Editing a custom attribute

4. Digitizing

5. Editing an attribute's min/max values

6. PARAMETRIC/VARIATIONAL DESIGN

7. Editing keyframes and attributes in excel

8. how to start programming with glut on IRIX

9. OT: subdirectory file attribute change en masse

10. universal attribute change

11. Any method of editing/changing an .exe icon?

12. How to edit PPD to change color to black

13. Error: when editing text layer, layout will change