ES_ReadOnly problems,W95,BP7.01

Hello fellow coders !

Im coding in Borland Pascal 7.0 and i always make my programs the
'hard way' (perhaps you think stupid way) by building up everything
'by hand' without the object parts.

I create all controls as : CreateWindow....... and not the object way
new(edit....).

I don't want to use the ordinary resource-workshop, cause i feel i
have complete control of everything if i do it all by my own hands.

I make two editboxes so the users easily can copy & paste my email or
url to an emailprogram or browser and i want to make them readonly by
specifying the es_readonly as flag, but this does not work as it
should, the editbox is there and the font is correct and the thing
that should be in it is there but it IS NOT readonly !.

I have the 7.01 timestamps on my installdisk's files so i take it, i
have the latest release of Borland Pascal.

This is the Make_A_EditBox function i have in my .TPW file:

Quote
>BEGIN=============================================================

Function Make_A_EditBox(Who:HWnd;ETit:String;EX,EY,EB,EH,ENum:Integer;

Frame,ReadOnly:Boolean):HWnd;
Var
        ETitP : Array[0..255] Of Char;
  FinalStyle : Longint;
Begin
 If (Frame=True) And (ReadOnly=True) Then
   FinalStyle:=ws_child or ws_visible or ws_border or es_readonly
 Else If (Frame=True) And (ReadOnly=False) Then
   FinalStyle:=ws_child or ws_visible or ws_border
 Else If (Frame=False) And (ReadOnly=True) Then
   FinalStyle:=ws_child or ws_visible or es_readonly
 Else If (Frame=False) And (ReadOnly=False) Then
   FinalStyle:=ws_child or ws_visible or ws_border;
 StrPCopy(ETitP,ETit);
 Make_A_EditBox:=CreateWindow(
 'Edit',
 ETitP,
 FinalStyle,
 EX,EY,EB,EH,
 Who,ENum,hInstance, nil);
End; { Make_A_EditBox }

Quote
>END================================================================

And a call to this procedure looks like this:
Quote
>BEGIN==============================================================

Const
  ID_MyEditbox = 110;
Var
  MyEditBox : HWnd;

Procedure Create_Some_Editboxes;
Begin
  MyEditBox:=Make_A_EditBox(MainWindow,'Text in the
box',10,10,100,20,ID_MyEditBox,False,True);
  If MyEditBox=0 Then
  Begin
    {error procedure...}
  End;
  SendMessage(MyEditBox,wm_setfont,VarFont,0); { VarFont from the
GetStockObject... }
End; { Create_Some_Editboxes }

Quote
>END================================================================

Thankful for any tips or fix for this:

s...@swipnet.se

http://home5.swipnet.se/~w-53073