Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Transparent RichTextBox or RichTextBox Background Image

EmodEmod Posts: 3Member
Hi! does anybody know how to make a RichTextBox Transparent? so that a picture behind it will be visible?? I know one way with WS_EX_TRANSPARENT... but if you do it that way the scrollbars are screwed up... or how to paint a picture in a RichTextBox?? tried it also with API > first got the HDC and the used BitBlt but didn't work... isn't there a way to do this???

Comments

  • casgtocasgto Posts: 2Member
    [b][red]This message was edited by casgto at 2007-2-10 22:23:44[/red][/b][hr]
    [b][red]This message was edited by casgto at 2007-2-10 22:22:27[/red][/b][hr]
    : Hi! does anybody know how to make a RichTextBox Transparent? so that a picture behind it will be visible?? I know one way with WS_EX_TRANSPARENT... but if you do it that way the scrollbars are screwed up... or how to paint a picture in a RichTextBox?? tried it also with API > first got the HDC and the used BitBlt but didn't work... isn't there a way to do this???
    :

    Private Const WS_EX_LAYERED = &H80000
    Private Const GWL_EXSTYLE = -20
    Private Declare Function SetWindowLong Lib "User32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Private Declare Function SetLayeredWindowAttributes Lib "User32" (ByVal hWnd As Long, ByVal color As Long, ByVal X As Byte, ByVal alpha As Long) As Boolean
    SetWindowLong frmTestRichEdit.hWnd, GWL_EXSTYLE, WS_EX_LAYERED
    SetLayeredWindowAttributes frmTestRichEdit.hWnd, &HC0E0FF, 255, 1


Sign In or Register to comment.