Announcement

Collapse
No announcement yet.

Asking for some direction please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    I would like to publicly apologize to Dominic Mitchell for my recent negative comments.
    No need to, I did not view them as negative.

    I have a slightly different point of view about this project.

    Even though the discussion on ActiveX controls is important, it is, in my opinion, a relatively
    minor issue that can be tackled at a later date. It is minor, because ActiveX controls(the non-
    intrinsic ones) are used as is. All you need is an OLE container and a good type library includes
    generator.

    I would first do the following if I were doing this project:

    1) Install VisualBasic.
    Bookmark the MSDN documentation for VisualBasic.
    Nothing beats being able to see and test the properties of the controls you are trying to convert.
    Just by looking at the VB objects, an experienced SDK programmer can deduce the SDK equivalents.
    and quirks if any.

    2) This is optioal. Get a proper type library browser.
    The one that ships with PowerBASIC is useless in regards to the hierarchical organization of
    objects, documentation, and references to external type libaries.
    You have three options:

    a) OleView by Microsoft
    b) José's Type Library browser.
    c) The standalone Type Library browser in Phoenix.

    For example, if you were to generate BASIC include files for the TextBox object in VisualBasic
    using the Phoenix standalone type library browser, you would get the following five files:
    Events.bas - TextBox events
    VB.inc - Visual Basic objects and procedures
    VBRUN.inc - Visual Basic runtime objects and procedures
    stdole.inc - OLE Automation
    StdFormat.inc - Data Formatting Object Library

    You would not know about the last three external references if you used the PowerBASIC browser.

    If you have not done so yet, you should map the intrinsic controls in VisualBasic and the controls
    in COMCTL32.OCX to their SDK equivalents. You want to map from VisualBasic to SDK to avoid limitations
    imposed by proprietary systems such as DDT. You can then map from SDK to any proprietary or open system.
    It is also much easier to discern whether to use the usually more restrictive but slightly more intuitive
    form of a control creation statement over the generic form. For example, by looking at the SDK equivalent
    properties for the VisualBasic TextBox object, it is easy to tell whether the control can be created using
    the more intuitive statement

    Code:
      [b][color=fuchsia]CONTROL[/color][/b][color=fuchsia][/color] [b][color=fuchsia]ADD[/color][/b][color=fuchsia][/color] [b][color=fuchsia]TEXTBOX[/color][/b][color=fuchsia][/color]
    or the generic statement

    Code:
      [b][color=fuchsia]CONTROL[/color][/b][color=fuchsia][/color] [b][color=fuchsia]ADD[/color][/b][color=fuchsia][/color] [color=red]"[/color][color=red]Edit"[/color]
    In this case the intuitive form can be used since it supports all the values for the dwStyle and dwExStyle
    parameters of the CreateWindowEx function that the corresponding properties of the TextBox object map to.

    Note: Dialog-based systems such as DDT do not support the Multiple Document Interface(MDI).

    Note: In the table below, an embedded control is a child control that is created as the child of another
    child control in order to make code that enhances the embedded control modular/reuseable.

    Table 1. VisualBasic Object to SDK Equivalents
    Code:
    +---------------+-----------------+------------------------+--------------------+-----------------------------------------------------------+
    |               |                 |                        |                    |                 Default Window Styles                     | 
    | Object        | Window Type     | API Function           | Class Name         |----------------------------------------+------------------|
    |               |                 |                        |                    |         Window                         |     Extended     |        
    |===============|=================|========================|====================|========================================|==================|
    | Form          | Top-level       |                        | user-defined       | WS_OVERLAPPEDWINDOW | WS_VISIBLE       | WS_EX_WINDOWEDGE |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | App           |                 | API functions          |                    |                                        |                  |
    |               |                 | GetModuleFileName      |                    |                                        |                  |
    |               |                 | Version resource       |                    |                                        |                  |
    |               |                 | GetFileVersionInfo     |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Screen        |                 | API functions          |                    |                                        |                  |
    |               |                 | GetWindowRect          |                    |                                        |                  |
    |               |                 | GetDeviceCaps          |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Clipboard     |                 | API functions          |                    |                                        |                  |
    |               |                 | OpenClipboard          |                    |                                        |                  |
    |               |                 | SetClipboardData       |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | PictureBox    | Generic child   | API functions          | user-defined       | WS_CHILD | WS_VISIBLE                  |                  |
    |               |                 | GDI/GDI+ graphics      |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Printer       |                 | API functions          |                    |                                        |                  |
    |               |                 | PrintDlgEx             |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Label         | Control         |                        | Static             | WS_CHILD | WS_GROUP | WS_VISIBLE |     |                  |
    |               |                 |                        |                    | SS_LEFT                                |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | TextBox       | Control         |                        | Edit               | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |               |                 |                        |                    | ES_LEFT | ES_AUTOHSCROLL               |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Frame         | Control         |                        | Button             | WS_CHILD | WS_CKIPSIBLINGS |           |                  |
    |               |                 |                        |                    | WS_GROUP | WS_VISIBLE |                |                  |
    |               |                 |                        |                    | BS_GROUPBOX                            |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | CommandButton | Control         |                        | Button             | WS_CHILD | WS_TABSTOP |                |                  |
    |               |                 |                        |                    | BS_PUSHBUTTON | BS_CENTER | BS_VCENTER |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | CheckBox      | Control         |                        | Button             | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   |                  |
    |               |                 |                        |                    | BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | OptionButton  | Control         |                        | Button             | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   |                  |
    |               |                 |                        |                    | BS_AUTORADIOBUTTON | BS_LEFT |         |                  |
    |               |                 |                        |                    | BS_VCENTER                             |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | ComboBox      | Control         |                        | Combobox           | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |               |                 |                        |                    | WS_BORDER | WS_VSCROLL |               |                  |
    |               |                 |                        |                    | CS_DROPDOWN | CBS_HASSTRINGS |         |                  |
    |               |                 |                        |                    | CBS_SORT                               |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | ListBox       | Control         |                        | Listbox            | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |               |                 |                        |                    | WS_BORDER | WS_VSCROLL |               |                  |
    |               |                 |                        |                    | LBS_HASSTRINGS | LBS_NOTIFY | LBS_SORT |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | HScrollBar    | Control         |                        | Scrollbar          | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   |                  |
    |               |                 |                        |                    | SBS_HORZ                               |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | VScrollBar    | Control         |                        | Scrollbar          | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   |                  |
    |               |                 |                        |                    | SBS_VERT                               |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Timer         |                 | SetTimer               |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | DriveListBox  | Control         | API functions          | Combobox           | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |               |                 | GetLogicalDriveStrings | (embedded)*        | WS_BORDER                              |                  |
    |               |                 | SHGetFileInfo          |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|----------------- |
    | DirListBox    | Control         | API functions          | Listbox            | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |               |                 | FindFirstFile          | (embedded)+        | WS_BORDER | WS_VSCROLL                 |                  |
    |               |                 | SHGetFileInfo          |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | FileListBox   | Control         | API functions          | Listbox            | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |               |                 | FindFirstFile          | (embedded)*        | WS_BORDER | WS_VSCROLL                 |                  |
    |               |                 | SHGetFileInfo          |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Menu          |                 | Menu resource          |                    |                                        |                  |
    |               |                 | LoadMenu               |                    |                                        |                  |
    |               |                 | CreateMenu etc.        |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | MDIForm       | Top-level       |                        | user-defined       | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN  | WS_EX_WINDOWEDGE |
    |               |                 |                        |                    | WS_VISIBLE                             |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Shape         |                 | GDI graphics           |                    |                                        |                  |
    |               |                 | Rectangle              |                    |                                        |                  |
    |               |                 | Ellipse etc.           |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Line          |                 | GDI graphics           |                    |                                        |                  |
    |               |                 | LineTo etc.            |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Image         | Control         |                        | Static             |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Data          |                 | ADO RecordSet          |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | OLE           | OLE container   |                        |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | UserControl   | ActiveX control | Low-level COM          |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | PropertyPage  | Dialogs and     | Property Sheet         | #32770(dialog)     |                                        |                  |
    |               | child controls  | functions and          | etc.               |                                        |                  |
    |               |                 } messages               |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | UserDocument  | Insertable      | Low-level COM          |                    |                                        |                  |
    |               | object          |                        |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Global        |                 | API functions          |                    |                                        |                  |
    |               |                 | EnumThreadWindows      |                    |                                        |                  |
    |               |                 | EnumPrinters           |                    |                                        |                  |
    |               |                 | LoadImage              |                    |                                        |                  |
    |               |                 | LoadResource           |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | CommonDialog  |                 | GetOpenFileName        |                    |                                        |                  |
    |               |                 | GetSaveFileName        |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | RichTextBox   | Control         |                        | RichEdit50W        | WS_CHILD | WS_TABSTOP | WS_VISIBLE     | WS_EX_CLIENTEDGE |
    |               |                 |                        | RichEdit20A        | ES_AUTOHSCROLL | ES_LEFT |             |                  |
    |               |                 |                        | RichEdit           | ES_MULTILINE                           |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | TabStrip      | Control         |                        | SysTabControl32    | WS_CHILD | WS_TABSTOP | WS_GROUP |     |                  |
    |               |                 |                        |                    | WS_CLIPSIBLINGS | WS_VISIBLE |         |                  |
    |               |                 |                        |                    | TCS_RAGGEDRIGHT | TCS_SINGLELINE |     |                  |
    |               |                 |                        |                    | TCS_TABS                               |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Toolbar       | Control         |                        | ToolbarWindow32    | WS_CHILD | WS_VISIBLE                  |                  |
    |               |                 |                        |                    | CCS_TOP                                |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Statusbar     | Control         |                        | msctls_statusbar32 | WS_CHILD | WS_VISIBLE |                |                  |
    |               |                 |                        |                    | CCS_BOTTOM | SBARS_SIZEGRIP            |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | ProgressBar   | Control         |                        | msctls_progress32  | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   | WS_EX_CLIENTEDGE |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | TreeView      | Control         |                        | SysTreeView32      | WS_CHILD | WS_BORDER | WS_TABSTOP |    | WS_EX_CLIENTEDGE |
    |               |                 |                        |                    | WS_VISIBLE |                           |                  |
    |               |                 |                        |                    | TVS_HASBUTTONS | TVS_HASLINES |        |                  |
    |               |                 |                        |                    | TVS_LINESATROOT | TVS_SHOWSELALWAYS    |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | ListView      | Control         |                        | SysListView32      | WS_CHILD | WS_CLIPCHILDREN |           | WS_EX_CLIENTEDGE |
    |               |                 |                        |                    | WS_TABSTOP | WS_VISIBLE |              |                  |
    |               |                 |                        |                    | LVS_ALIGNTOP | LVS_AUTOARRANGE |       |                  |
    |               |                 |                        |                    | LVS_EDITLABELS | LVS_ICON |            |                  |
    |               |                 |                        |                    | LVS_SHAREIMAGELISTS |                  |                  |
    |               |                 |                        |                    | LVS_SHOWSELALWAYS                      |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | ImageList     | Control         | API functions          |                    |                                        |                  |
    |               |                 | ImageList_Create       |                    |                                        |                  |
    |               |                 | etc.                   |                    |                                        |                  |
    |---------------|-----------------|------------------------|--------------------|----------------------------------------|------------------|
    | Slider        | Control         |                        | msctls_trackbar32  | WS_CHILD | WS_TABSTOP | WS_VISIBLE |   |                  |
    |               |                 |                        |                    | TBS_AUTOTICKS | TBS_BOTTOM | TBS_HORZ  |                  |
    +---------------+-----------------+------------------------+--------------------+----------------------------------------+------------------+

    The second step is to create a table that maps the properties of each object in table 1 to SDK equivalents.
    The majority of the properties will map to the parameters of the CreateWindowEx function and messges specific
    to the SDK window class.

    Table 2. TextBox Properties Map to SDK Equivalents
    Code:
    +-----------------+-------------------+---------------------------------------------------------------------------+--------------------+---------------------------------+
    |                 |                   |                              CreateWindowEx Parameter                     |                    |                                 |
    |                 |                   |--------------+-------------------------+-------------------+--------------|                    |                                 |
    | Property        | Values            | Control      | Window                  | Extended Window   | Other        | Message(s)         | Function                        |
    |                 |                   | (dwStyle)    | (dwStyle)               | (dwExStyle)       |              |                    |                                 |
    |=================|===================|==============|=========================|===================|==============|====================|=================================|
    | Alignment       | Left Justify      | ES_LEFT      |                         |                   |              |                    |                                 |
    |                 | Right Justify     | ES_RIGHT     |                         |                   |              |                    |                                 |
    |                 | Center            | ES_CENTER    |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Appearance      | 3D                |              |                         | WS_EX_CLIENTEDGE  |              |                    |                                 |
    |                 | Flat              |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | BackColor       |                   |              |                         |                   |              | WM_CTLCOLOREDIT    |                                 |
    |                 |                   |              |                         |                   |              | WM_CTLCOLORSTATIC  |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | BorderStyle     | None              |              |                         |                   |              |                    |                                 |
    |                 | Fixed Single      |              | WS_BORDER               |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | DataField       | ADO Recordset     |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | DataSource      | ADO Recordset     |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | DragIcon        | OLE drag and drop |              |                         |                   |              |                    | DoDragDrop                      |
    | DragMode        |                   |              |                         |                   |              |                    | IDataObject                     |
    |                 |                   |              |                         |                   |              |                    | IDropTarget                     |
    |                 |                   |              |                         |                   |              |                    | IDropSource                     |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Enabled         | True              |              |                         |                   |              | WM_ENABLE          | EnableWindow                    |
    |                 | False             |              | WS_DISABLED             |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Font            |                   |              |                         |                   |              | WM_SETFONT         |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | ForeColor       |                   |              |                         |                   |              | WM_CTLCOLOREDIT    |                                 |
    |                 |                   |              |                         |                   |              | WM_CTLCOLORSTATIC  |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Height          |                   |              |                         |                   | nHeight      |                    | SetWindowPos                    |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | HelpContextID   |                   |              |                         |                   |              |WM_HELP             | HtmlHelp                        |
    |                 |                   |              |                         |                   |              |                    | WinHelp                         |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | HideSelection   | True              |              |                         |                   |              |                    |                                 |
    |                 | False             | ES_NOHIDESEL |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | Index           |                   |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | Left            |                   |              |                         |                   | x            |                    | SetWindowPos                    |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | LinkItem        | DDE               |              |                         |                   |              |                    |                                 |
    | LinkMode        | DDE               |              |                         |                   |              |                    |                                 |
    | LinkTimeOut     | DDE               |              |                         |                   |              |                    |                                 |
    | LinkTopic       | DDE               |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | Locked          |                   | ES_READONLY  |                         |                   |              | EM_SETREADONLY     |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | MaxLength       |                   |              |                         |                   |              | EM_SETLIMITTEXT    |                                 |
    |                 |                   |              |                         |                   |              | EM_GETLIMITTEXT    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | MouseIcon       |                   |              |                         |                   |              |                    | LoadCursor, SetClassLong        |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | MousePointer    | Default           |              |                         |                   |              | WM_SETCUSROR       | LoadCursor, SetClassLong        |
    |                 | Arrow             |              |                         |                   |              |                    |                                 |
    |                 | etc.              |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | Multiline       | True              | ES_MULTILINE |                         |                   |              |                    |                                 |
    |                 | False             |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | Name            |                   |              |                         |                   | hMenu        |                    |                                 |
    |                 |                   |              |                         |                   | (Control ID) |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | PasswordChar    |                   | ES_PASSWORD  |                         |                   |              | EM_SETPASSWORDCHAR |                                 |
    |                 |                   |              |                         |                   |              | EM_GETPASSWORDCHAR |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | ScrollBars      | None              |              |                         |                   |              |                    |                                 |
    |                 | Horizontal        |              | WS_HSCROLL              |                   |              |                    |                                 |
    |                 | Vertical          |              | WS_VSCROLL              |                   |              |                    |                                 |
    |                 | Both              |              | WS_HSCROLL | WS_VSCROLL |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | TabIndex        |                   |              |                         |                   |              |                    | Z-order(order controls created) |
    |                 |                   |              |                         |                   |              |                    | SetWindowPos(to change z-order) |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|------------------------------------------------------|
    | TabStop         | True              |              | WS_TABSTOP              |                   |              |                    |                                 |
    |                 | False             |              |                         |                   |              |                    |                                 |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Tag             |                   |              |                         |                   |              |                    | SetProp, GetProp                |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Text            |                   |              |                         |                   | lpWindowname | WM_SETTEXT         | SetWindowText                   |
    |                 |                   |              |                         |                   |              | WM_GETTEXT         | GetWindowText                   |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Top             |                   |              |                         |                   | y            |                    | SetWindowPos                    |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Visible         |                   |              | WS_VISIBLE              |                   |              |                    | ShowWindow                      |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | WhatsThisHelpID |                   |              |                         | WS_EX_CONTEXTHELP |              | WM_HELP            | HtmlHelp, WinHelp               |
    |-----------------|-------------------|--------------|-------------------------|-------------------|--------------|--------------------|---------------------------------|
    | Width           |                   |              |                         |                   | nWidth       |                    | SetWindowPos                    |
    +-----------------+-------------------+--------------+-------------------------+-------------------+--------------+--------------------+---------------------------------+
    Dominic Mitchell
    Phoenix Visual Designer
    http://www.phnxthunder.com

    Comment


    • #22
      Thanks to all for answering my plea for help.

      Special thanks to Jose and Dominic.

      I have isolated the VB_constants and the intrinsic controls. Working on detecting/translating code now. It's not really difficult, especially with all the input here, there's just an awful lot of it. Alpha 0.01b is coming along, but I can't predict how long it will take at this point.

      As an aside (and for James Davis) there will be no unnecessary MSGBOXes in the next version.
      Do not go quiet into that good night,
      ... Rage, rage against the dark.

      Comment


      • #23
        Just to add another avenue of research.

        For your basic intrinsic controls you may want to look at MSWLESS.OCX
        This shipped with VB6 professional and above.

        Download link here http://www.ocxdump.com/download-ocx-files_new.php/ocxfiles/M/mswless.ocx/6.01.9782/download.html


        This has your textbox command and options and scroll bars in a lightweight less resource hungry incarnation.

        If you have VB6 development environment loaded then you could always start creating your own OCX's for the project using the UserControl.
        Kind regards,
        Neil

        http://www.BASICProgramming.info

        Comment


        • #24
          I forgot to mention that you also have THREED32.OCX for the 3D versions of some controls.

          Well a 3D border look anyway.
          Kind regards,
          Neil

          http://www.BASICProgramming.info

          Comment


          • #25
            Originally posted by StanHelton View Post
            As an aside (and for James Davis) there will be no unnecessary MSGBOXes in the next version.
            :applaus: :add_wegbrech:
            Even if you think you don’t love mathematics,
            mathematics loves you. Don’t believe me?
            Solve the following for “i”.
            9x – 7i > 3(3x – 7u)

            Comment


            • #26
              Originally posted by Neil Prichard View Post
              Just to add another avenue of research.

              For your basic intrinsic controls you may want to look at MSWLESS.OCX
              This shipped with VB6 professional and above.
              Those were "Windowless windows", as the "WLESS" in the control's name suggests. Those weren't "windows" in the SDK sense - they had no hWnd.

              If found them to be pretty useless, as I often need the hWnd of a window/control.

              I forgot to mention that you also have THREED32.OCX for the 3D versions of some controls.
              ... which were considered legacy and unsupported with VB5 already. They date back to the Win 3.x era (VB3).

              Comment


              • #27
                Those were "Windowless windows", as the "WLESS" in the control's name suggests. Those weren't "windows" in the SDK sense - they had no hWnd.

                If found them to be pretty useless, as I often need the hWnd of a window/control.
                Personally I find it rare that an hWnd is used in VB6 programs. I am assuming that we are trying to convert the majority of VB programs.

                THREED32.OCX was distributed with VB6 and is still available in the VB6 supported controls download from Microsoft.
                The controls available in THREED would have been a good starting place to get a conversion going. They had properties to turn off the look if required.

                Use of windowless versions would allow optimization where other functionality is not required, which can be gleaned from the source code at time of conversion.

                Just trying to put options out there to help the project on its way.
                Kind regards,
                Neil

                http://www.BASICProgramming.info

                Comment


                • #28
                  LOL. Upshifting into planning mode ...

                  Originally posted by Knuth Konrad View Post
                  ... weren't "windows" in the SDK sense - they had no hWnd.

                  ... I often need the hWnd of a window/control.

                  ... were considered legacy and unsupported with VB5 already.
                  Which prompts a question in my mind. It's a given that this project will be used on a lot of legacy code, at least in the beginning. My experience is that VB end users had little or no trouble upgrading through the VB up to version 6, but ran into serious problems as MS phased out in favor of dotNET. So far I'm assuming that most of the apps needing this project are VB6. That's the logical break point for me. Would you agree?

                  Originally posted by Neil Prichard View Post
                  Personally I find it rare that an hWnd is used in VB6 programs. I am assuming that we are trying to convert the majority of VB programs.
                  Valid point. I am making the same assumption, qualified by recognition of that breakpoint between VB6 and dotNET.

                  ... The controls available in THREED would have been a good starting place to get a conversion going. They had properties to turn off the look if required.
                  I now have VB6 Enterprise up and running. There are plenty OCX files that look old or out-of-date compared to others, but I'm making the assumption that things that didn't NEED upgrade in programmer's judgement would not have been. So, not ruling out any of them for now.

                  Just trying to put options out there to help the project on its way.
                  My bogdown this week is all the typing. Knowing where to look (thanks to this forum) makes getting the properties and methods relatively easy. Writing PB code to recognize and differentiate between all the multiply redundant possibilities of VB6 is a bit more complex.

                  I've downloaded the MWLESS and the THREED3 files and will be comparing those with the ones I have/don't have.

                  I have developed a set of 4,192 terms mostly referring to various internal and standard external objects and controls in VB6, many overloaded. (e.g.: The Add method is a freaking nightmare of overload!) There is an awful lot of object stuff that should have been (IMO) simple FUNCTIONS.

                  Working on now: a PBWin10 Object template to handle some of the intrinsic object VB6 stuff. Almost complete the prelim work for that -- envisioning a huge CLASS with a lot of INTERFACES using a common set of 127 properties. The fuzzy model in my head will handle the intrinsic stuff and the most common controls. Any ideas on this?

                  Help with that would be appreciated. If you want to try it, input would be in VB6 constants; output needs to be PBWin10 (SDK okay). The actual values for the constants match between VB & PB about half the time (non-scientific estimate), but the naming scheme doesn't match between the two. It's not parallel, IOW.

                  Thank you both. If I had to do this all with one head it would surely explode!

                  Stan
                  Do not go quiet into that good night,
                  ... Rage, rage against the dark.

                  Comment


                  • #29
                    For details of controls, their properties and events, you may find a copy of the book "Visual Basic Controls in a Nutshell" useful.
                    The ISBN codes are: ISBN-10: 1565922948,ISBN-13: 978-1565922945
                    You can get a copy cheap from Amazon.

                    You may also want to look at "VB & VBA in a Nutshell" as this provides constants and other useful info for the language.
                    The ISBN codes are: ISBN-10: 1565923588,ISBN-13: 978-1565923584
                    And ditto for cheap copy.
                    Kind regards,
                    Neil

                    http://www.BASICProgramming.info

                    Comment


                    • #30
                      Originally posted by Neil Prichard View Post
                      Personally I find it rare that an hWnd is used in VB6 programs. I am assuming that we are trying to convert the majority of VB programs.
                      Well, we seem to have different programming needs then. One area where you need the hWnd is the instrinsic controls limitation to 32,767 entries (combobox, listbox), which can be easily circumvented on mondern OS by using the approriate Windows API functions to handle entries > 32,767.

                      THREED32.OCX was distributed with VB6 and is still available in the VB6 supported controls download from Microsoft.
                      The controls available in THREED would have been a good starting place to get a conversion going. They had properties to turn off the look if required.
                      While you can still download them, I doubt the "supported" part of your statement.

                      Here's what MS has to say about those controls
                      This directory contains all of the ActiveX Controls that shipped with Visual
                      Basic 4.0/5.0 Professional and Enterprise Editions, which are no longer shipping
                      with Visual Basic 6.0.
                      Source: Readme.txt of VB6 installation disc where those controls reside. Online source: https://support.microsoft.com/kb/172193/EN-US

                      tl;dr
                      You should have replaced those controls in your projects with VB5 already.

                      Use of windowless versions would allow optimization where other functionality is not required, which can be gleaned from the source code at time of conversion.
                      I'm not sure if that would really "optimize" the converter. If I'm not mistaken, those "controls" were simualte by "drawing" on the control's surface on the hDC of the parent window. The "lightweight" part of them also stems from an ancient past, where hWnd resources were precious and rare on a Windows OS (=Win 9.x family). Treating them different than their "heavy-weight" control counterparts, adds a couple of another to handle things to a converter. I'd just treat them as their real replacement.

                      Comment


                      • #31
                        Originally posted by StanHelton View Post
                        So far I'm assuming that most of the apps needing this project are VB6. That's the logical break point for me. Would you agree?
                        Yes.

                        As for the rest, see my post above.

                        Comment


                        • #32
                          Knuth,

                          Noted your post about the VB 4/5 ActiveX stuff being legacy for VB6. Will prioritize accordingly. Still thinking this app needs recognize them even if not fully supported in the translation. As for hWnd handle limitations, I think I'm going to ignore that part -- it won't affect the current systems. It certainly shouldn't affect the PBWin 10 versions that come out of the translation.
                          Do not go quiet into that good night,
                          ... Rage, rage against the dark.

                          Comment

                          Working...
                          X
                          😀
                          🥰
                          🤢
                          😎
                          😡
                          👍
                          👎