The SMTP.BAS example IN the .\SAMPLES\TCP directory sets a
custom window background. The example works USING DDT.
I am trying TO DO the same WITH classic programming method...
WITH some problems
The following code IN the windows procedure sets the bitmap
over the other controls.
I am looking FOR a way TO understand & solve this problem.
Franck.
....
CASE %WM_PAINT
hbitmap= LoadBitmap(gHInst,"BRUSH1")
r=getobject(hbitmap,SIZEOF(bm),bm)
hdc=getdc(hDlg)
hmemdc=createcompatibledc(hdc)
r=selectobject(hmemdc,hbitmap)
r=getclientrect(hDlg,rect)
IF getstretchbltmode(hdc)<>%STRETCH_DELETESCANS THEN _
r=setstretchbltmode(hdc,%STRETCH_DELETESCANS)
r=stretchblt(hdc,0,0,rect.nright,rect.nbottom, _
hmemdc,0,0,bm.bmwidth,bm.bmheight,%SRCCOPY)
r=deletedc(hmemdc)
r=releasedc(hDlg,hdc)
r=deleteobject(hbitmap)
custom window background. The example works USING DDT.
I am trying TO DO the same WITH classic programming method...
WITH some problems

The following code IN the windows procedure sets the bitmap
over the other controls.
I am looking FOR a way TO understand & solve this problem.
Franck.
....
CASE %WM_PAINT
hbitmap= LoadBitmap(gHInst,"BRUSH1")
r=getobject(hbitmap,SIZEOF(bm),bm)
hdc=getdc(hDlg)
hmemdc=createcompatibledc(hdc)
r=selectobject(hmemdc,hbitmap)
r=getclientrect(hDlg,rect)
IF getstretchbltmode(hdc)<>%STRETCH_DELETESCANS THEN _
r=setstretchbltmode(hdc,%STRETCH_DELETESCANS)
r=stretchblt(hdc,0,0,rect.nright,rect.nbottom, _
hmemdc,0,0,bm.bmwidth,bm.bmheight,%SRCCOPY)
r=deletedc(hmemdc)
r=releasedc(hDlg,hdc)
r=deleteobject(hbitmap)
Comment