Hi,

I'm trying to create a "flat" edit control ( black border only ), using a resource file

The problem is that whatever I try the WS_EX_CLIENTEDGE style is specified

How do I get rid of it?

Thanks
Posted on 2002-11-17 12:00:02 by Guerrilla
I think you might have to call GetWindowLong test for the Flag and then remove it and call SetWindowLong with the modified Flags ;)




invoke GetWindowLong, hEdit, GWL_EXSTYLE
test eax, WS_EX_CLIENTEDGE
sete dl
.If dl == 1
xor eax, WS_EX_CLIENTEDGE ; True + True = False ? (right??)
.Endif
invoke SetWindowLong, hEdit, GWL_EXSTYLE,eax



Heh.. This code might be wrong... but it gives you the general idea...
I have no helpfiles, nothing whatsoever on this computer atm :(
And I'm to lazy to search the web ;)
Posted on 2002-11-17 13:15:59 by JimmyClif
If your resource editor doesn't give you proper access to the extended styles of the window, then you may need to either change resource editors, or create the window yourself in your app.
Posted on 2002-11-18 03:51:21 by sluggy
I'd just use CreateWindowEx :)
Posted on 2002-11-18 04:14:49 by bazik
Nah.. your edit button look like that without WS_EX_CLIENTEDGE. To make it look flat, the best way is to remove the border or rather remove the style, WS_BORDER.
Posted on 2002-11-18 06:56:59 by roticv
Thanks for all the replies

It is indeed no problem to create the "flat" border if you use CreateWindowEx, but
I prefer to use a resource file. I was just wondering why it was not possible to turn this
style off. I know that the default styles should be turned off with NOT STYLE, but
it really doesn't seem to work. Why is that?

Thanks again
Posted on 2002-11-18 09:24:16 by Guerrilla