October 31, 2025, 02:41:05 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


RichEdit Scrollbar

Started by ckoehn, March 04, 2010, 04:10:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ckoehn

I'm using a Rich Edit text box in a program.  It starts out empty (no scrollbars).  When I load text into it the scrollbars showup on the left (which is fine and they way they are suppose to), but they are the "old" style scrollbars.  Not the new XP style like the list boxes.  When you click on the scoll buttons (line up, line dn, scroll) then they change to the new style.  Is there a way to make the scrollbar update so after you load a file the scollbar is the "new" style?

Thanks,
Clint

King64

Have you added a manifest file to your .exe ?

ckoehn

What is a manifest file and what does it do? ??? 

Couldn't find that in the help file.

Later,
Clint

ckoehn

I did a search and found what it means. :)

But.. after making a manifest, most of my controls changed (checkbox, listbox, editbox) except a button and my rich edit control still have the same behavior.  It is the "old" style until you click on the scroll buttons.

Any ideas anyone?

Later,
Clint

aurelCB

Heh ..create button as bmp button and after you add manifest will be themed(xpstyle) or make
button with CreateWindowExA api function and all controls will be themed.
For @idcontrol use before code IF @notifycode=0 and all things will work.

ckoehn

Thanks aurelCB.

Will try it and see if I can get it to work.

Later,
Clint

ckoehn

I have everything working except my rich edit control.  It still has the "old" style till you click a scroll button (up a line, scroll, down a line).

It looks unprofessional when the rest of the window is in XP style.

Later,
Clint

ZeroDog

im not sure why you're having this problem.  My richedits seem to display the themes correctly. 

You could always have your program simulate a mouse click on the scrollbar during startup to force the theme change. 

aurelCB

Try create richedit with CreateWindowExA and must showed properly
create control under @idcreate message
like this
richhcontrol = CreateWindowExA(0x20000, "RICHEDIT","",0x50311004,10,40,400,300,win,rich_ID,0 ,0)

ckoehn

I am using EBASIC and when I copy your example over, I receive a "no appropriate conversion exists" error.  It looks like if I minimize and then maximize then it redraws it correctly, so.. I guess I need to simply find a way to refresh/redraw the screen.

Later,
Clint

LarryMc

Quote from: ckoehn on March 05, 2010, 03:31:52 PM
I guess I need to simply find a way to refresh/redraw the screen.
If that's the case then try using getsize and setsize on the control (or the window).
Or, if you're using windowssdk.inc then you can use invalidaterect

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ckoehn

I ended up doing this and then it worked.  Turned off the scrollbars and then turned them back on.

$INCLUDE "richedit.inc"
.
.
.
SENDMESSAGE win,EM_SHOWSCROLLBAR,SB_VERT,FALSE,RichEdit
SENDMESSAGE win,EM_SHOWSCROLLBAR,SB_VERT,TRUE,RichEdit

Later,
Clint

P.S. Tried what was suggested but nothing seemed to work.  Kept getting errors.  Had windowssdk.inc included at the top so I don't really know what  I was doing wrong.