Frame dont have title???

Started by docroger, September 10, 2025, 06:33:45 AM

Previous topic - Next topic

docroger

Hello José,

The frame control dont have title :

pWindow.AddControl("Frame", hWin, IDC_FRAME, "Frame", 20, 20, 360, 120)

The control dont show the word Frame.
I work with Cwindow.inc and not DDT.inc

On Powerbasic :

CONTROL ADD FRAME,    hDlg, %IDC_FRAME1, "Frame", 10, 5, 335, 30

The Frame show the tile.

Is it any flag i miss ?

José Roca

A frame control does not have a caption. What PowerBasic calls, mistakenly, Frame, is a Group Box. A Frame control is an Static control (a label) with the WS_GROUP and SS_BLACKFRAME styles. A Group Box is a button with the WS_GROUP and BS_GROUPBOX styles. A Group Box can have a caption.

docroger

Just a remark :
In the sdk template > cw_frame01, you give the frame a title :
pWindow.AddControl("Frame", hWin, IDC_FRAME, "Frame", 20, 20, 360, 120)

Better to write :
pWindow.AddControl("Frame", hWin, IDC_FRAME, "", 20, 20, 360, 120)

Just my 2 cents...

I go with groupbox and continue my powerbasic translation...

Have a good day,
Thanx.