I'm trying to create a RichEdit without any borders tried to set off ES_SUNKEN, WS_EX_CLIENTEDGE but nothing works: it keeps coming with that ugly sunken border. Has anyone a clue, or better, an example in C or C++?
PS. of cource ES_MULTILINE,ES_AUTOHSCROLL,ES_AUTOVSCROLL are on...
Thanks in advance...
I found out i was still using version 1. Did some changes to support version 3 and 4.1. Because the control displays correctly (apart from that ugly border) I conclude this code must be ok. WS_EX_CLIENTEDGE ultimatly leads to SetWindowLong(). So I thought to be smart and set everything off, like this:
To my surprise it still displays the border! What i want to get rid off is WS_BORDER, WS_EX_CLIENTEDGE and WS_EX_STATICEDGE.
For version 4.1 I use Loadlibrary("MSFTEDIT.DLL") and classname "RichEdit50W". The MS-documentation says not all styles are implemented, so i thought maybe it is not possible. Your reactions indicate i'm not right... But i still can get it to work.
Someone any (win32) suggestions?
Used Spy+ to find out wich styles where there. Used Setwindowlong() to put the styles in. I think this was a quirk of my gui-classes
I have some strings which i am reading from database.
I want to comapare the strings with the given character and sort it Alphapatecially
For example if the given character input is "s".it should compare with the
given strings and get the result only with "s".
For example the strings are aa,bb,cc,ss,sss,sss
It should compare and get ss,sss,sss.
You have two possibilities: When extracting from the database ignore all strings that do not match the prefix character. Alternatively when sorting filter out all strings that do not match before sending to the sort function.
If you only want the strings for one purpose then it's probably more efficient to lean on your RDBMS and let it do the filter and sort for you. If, on the other hand, you want the strings for a variety of groovy purposes then you can filter them on the client side using a couple of algorithms from the C++ standard library:
as they're the lines that filter and sort the strings.
The first one removes any string that doesn't start with an 's' character. I've used a lambda to do the comparison - if you're not using a very up to date compiler you might have to replace that with a function object. Holler if you need some help. As remove_if has some funky behaviour (it can't resize the range it's filtering) you have to resize the vector - which is what erase is doing. Have a look at "Effective STL" by Scott Myers for a good treatment of why this happens.
The second line just sorts the remaining strings into alphabetical order.
Hope this helps, please scream if you need more help with this and don't decide SQL is the way to go!
Current arm size: 14.4in
Desired arm size: 18in
Next Target: 15.4in by Dec 2010
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
The documentation for IsTextUnicode() states: Determines if a buffer is likely to contain a form of Unicode text.
Which is to say, it can only test for the likelihood by sampling various bytes within the buffer. Since there is no byte or word pattern which absolutely guarantees that a buffer is Unicode there is no way that such a function can guarantee to recognise it.