Hi Ketilo

I've attached a small demo project.

In the dialog Editor the edit box has a flat look
But when you run it the sunken style is there - cant get rid of that damn style :(

Also in the border property for the edit control I think you have a style "boarder" - should it not be border?

BTW Thanks for the great editor

Posted on 2004-08-10 12:35:54 by taff
Hi taff

Windows does not allow you to create a flat edit control on a dialog.

You could try:

mov eax,uMsg
push hWin
pop hWnd
invoke GetDlgItem,hWin,1001
push ebx
mov ebx,eax
invoke SetWindowLong,ebx,GWL_EXSTYLE,0
invoke SetWindowLong,ebx,GWL_STYLE,WS_CHILD or WS_VISIBLE or WS_BORDER
pop ebx

Posted on 2004-08-10 13:50:45 by KetilO
Hi Ketlio

Thanks for the reply and sorry about replying in this forum but ...

I have added the code you provided and it seems to clear the sunken look but on the left and top sides there seems to be a resident shadow.

When I use an api spy program to view the styles they seem to be correct but when I apply the styles that are already shown (using the api spy) it fixes it - Now I'm confused :confused:

I'm wondering whether I'll have to subclass it and draw it myself.

Thanks again

Posted on 2004-08-11 13:46:59 by taff
The easiest will probably be to use CreateWindowEx to create the control with the styles you want.

Posted on 2004-08-11 15:07:08 by KetilO