Results 1 to 4 of 4

Thread: How Would I Do This...

  1. #1

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    How Would I Do This...

    How can I use SendMessage API to change the Appearance from 3D to Flat on a RichTextBox at runtime? What Message do I send to change the style/appearance?

  2. #2
    jim mcnamara
    Guest
    Here's a list of messages to change window style

    http://msdn.microsoft.com/library/de...box_styles.asp

  3. #3
    Megatron
    Guest
    I think you have to take out the WS_EX_CLIENTEDGE style.

    e.g:
    SetWindowLong rtb.hwnd, GWL_EXSTYLE GetWindowLong(rtb.hwnd, GWL_EXSTYLE) Xor WS_EX_CLIENTEDGE

  4. #4

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Thanks Jim thats great if I want to switch to other things also.

    Megatron you're the BOMB!

    If anyone else wants to do this here you go:
    VB Code:
    1. Dim style As Long
    2.    
    3.     style = GetWindowLong(RichTextBox1.hwnd, GWL_EXSTYLE) Xor WS_EX_CLIENTEDGE
    4.    
    5.     SetWindowLong RichTextBox1.hwnd, GWL_EXSTYLE, style
    6.     SetWindowPos RichTextBox1.hwnd, Form1.hwnd, 0, 0, 0, 0, SWP_FLAGS

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