PlanetSquires Forums

Support Forums => José Roca Software => Topic started by: docroger on September 10, 2025, 06:33:45 AM

Title: Frame dont have title???
Post by: docroger on September 10, 2025, 06:33:45 AM
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 ?
Title: Re: Frame dont have title???
Post by: José Roca on September 10, 2025, 08:13:43 AM
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.
Title: Re: Frame dont have title???
Post by: docroger on September 10, 2025, 10:15:16 AM
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.