PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Patrice Terrier on February 10, 2010, 05:22:09 AM

Title: "FORM_TABCONTROL_FRMGENERAL_CLASS"
Post by: Patrice Terrier on February 10, 2010, 05:22:09 AM
Paul,

You are using the "FORM_TABCONTROL_FRMGENERAL_CLASS" as page container for TAB control.
While PowerBASIC is using the Dialog "#32770" class for the same purpose.

Before i change the WinLIFT's code to support and detect the FF3 "FORM_TABCONTROL_FRMGENERAL_CLASS", i would like to make sure that you won't change this class name in a next release  :)

...
Title: Re: "FORM_TABCONTROL_FRMGENERAL_CLASS"
Post by: Patrice Terrier on February 10, 2010, 06:06:37 AM
Well after looking at your code, i found that you use a different class name for each of your TAB page.

Also you do not set the wce.cbSize member before callig the GetClassInfoEx thus it would always return zero.

You should use it like this:

    wc.cbSize = SIZEOF(wc)
    IsInitialized = GetClassInfoEx(skInstance(), zClass, wc)
    IF IsInitialized    = 0 THEN
       wc.cbSize        = SIZEOF(wc)
       wc.style         = %CS_HREDRAW OR %CS_VREDRAW
       wc.lpfnWndProc   = CODEPTR(WinprocDW)
       wc.cbClsExtra    = 0
       wc.cbWndExtra    = 0 '// %EXTEND_EXTRA * 4
       wc.hInstance     = skInstance()
       wc.hIcon         = %NULL ' LoadIcon(wc.hInstance, "PROGRAM")
       wc.hCursor       = LoadCursor(%NULL, BYVAL %IDC_WAIT)
       wc.hbrBackground = GetStockObject(4) '// BlackBrush
       wc.lpszMenuName  = %NULL
       wc.lpszClassName = VARPTR(zClass)
       wc.hIconSm       = wc.hIcon
       IF RegisterClassEx(wc) THEN IsInitialized = %TRUE
    END IF


Title: Re: "FORM_TABCONTROL_FRMGENERAL_CLASS"
Post by: Paul Squires on February 10, 2010, 08:49:30 AM
Thanks Patrice - I appreciate the tip.
Title: Re: "FORM_TABCONTROL_FRMGENERAL_CLASS"
Post by: Paul Squires on February 10, 2010, 08:58:06 AM
I made the change to the generated source code. Seems to be working perfectly. Thanks.