Author Topic: Asking OS/2 things to OpenAI - Fun and maybe Insightful.  (Read 27407 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #15 on: December 28, 2022, 11:48:38 pm »
What is UCONV.DLL

Quote
UCONV.DLL is a dynamic-link library (DLL) in the OS/2 operating system that provides support for character set and code page conversion. It is used to convert text data between different character sets and code pages, which can be useful when working with text data that has been encoded in a different character set or code page than the one being used by the current program or system.

UCONV.DLL is typically located in the \OS2\DLL folder of the OS/2 system folder. It is loaded automatically by the system when it is needed, and does not need to be explicitly loaded by programs that use it.

Here is an example of how UCONV.DLL might be used in a program:

#include <os2.h>
#include <uconv.h>

int main() {
   // Convert a string from the ISO-8859-1 character set to the UTF-8 character set
   char *input = "Hello, world!";
   size_t input_len = strlen(input);
   char output[128];
   size_t output_len = sizeof(output);

   if (UconvFromUcs(input, &input_len, output, &output_len, "ISO-8859-1", "UTF-8")) {
      // An error occurred
      return -1;
   }

   // Use the converted string...

   return 0;
}

In this example, the UconvFromUcs function from UCONV.DLL is used to convert the string input from the ISO-8859-1 character set to the UTF-8 character set. The input_len and output_len variables are used to specify the length of the input and output strings, respectively. The UconvFromUcs function returns zero on success or an error code if an error occurred.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5183
  • Karma: +118/-1
    • View Profile
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #16 on: December 28, 2022, 11:50:55 pm »
I notice that it is missing the needed defines before include os2.h, eg for the screensaver module, it should be something like,
Code: [Select]
#define INCL_DOS
#define INCL_WIN
#define INCL_GPI
#define INCL_ERRORS
#define INCL_TYPES
#include <os2.h>

The defines are so os2.h actually includes various things. Still for an AI, it isn't too bad at searching Google.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #17 on: January 10, 2023, 02:05:12 pm »
But when I asked "Where is OS/2 source code?" it replied:
Quote
The source code for OS/2 is not publicly available by default. OS/2 was originally developed by IBM and Microsoft as a proprietary operating system, meaning that the source code was not made available to the public.

However, in 2001, IBM released the source code for a version of OS/2 called "Warp 4" under an open source license called the Common Public License (CPL). This made it possible for developers to access the source code and modify it as they saw fit, as long as they followed the terms of the CPL.

If you are interested in obtaining a copy of the OS/2 source code, you can try searching online for repositories or archives that contain the source code for Warp 4 or a later version of OS/2. You may also be able to find copies of the source code on forums or discussion boards for OS/2 enthusiasts.

Keep in mind that the source code for OS/2 is copyrighted and is subject to the terms of the CPL. You may need to obtain permission from IBM or other copyright holders if you want to modify or distribute the source code.

Even that I want it to be real, I guess it is wrong. But I wonder what is confusing OpenAI to think that Warp 4 was released under the CPL license?

Today I found it the OpenAI got partially corrected.

where did you find that Warp 4 was released under the CPL license?

Quote
I apologize for any confusion - I misspoke earlier. The IBM OS/2 Warp 4 operating system was actually released under a proprietary license and was not available under the Common Public License (CPL). IBM did open source some parts of OS/2, but it wasn't the entire OS and didn't happen at the same time of Warp 4 release. IBM has also ended support for OS/2 in December 2006 and development was halted.

It's possible that there may be some open source projects or forks of OS/2 that have been released under the CPL or other open source licenses, but these would be separate and distinct from the official IBM release of OS/2 Warp 4.

If you are looking for a version of OS/2 that is available under an open-source license, you can look for projects like eComStation or ArcaOS, these are modern versions of OS/2 and available for purchase, but their license may be different than the CPL

Again, I apologize for any confusion caused, and please let me know if you have any further questions.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #18 on: September 11, 2024, 11:35:24 pm »
How can I get more young people to code for OS/2 and became part of the community

Getting young people interested in coding for OS/2 and becoming part of the community involves a blend of outreach, education, and creating opportunities that resonate with their interests. Here are some strategies to consider:

1. Promote OS/2's Unique Value:

    Highlight the Niche Appeal: OS/2 is a legacy system with unique strengths, such as its stability, and it provides an opportunity to work on low-level systems programming or legacy systems that are rare to find.
    Connect with Retro Computing Enthusiasts: Many young people are drawn to retro computing as a hobby. Position OS/2 within this niche to attract those who have an interest in preserving or reviving older systems.
    Showcase Its Relevance: Emphasize how skills gained in OS/2 development can translate to modern systems programming, driver development, or even embedded systems.

2. Make Learning Accessible:

    Provide Learning Resources: Create beginner-friendly tutorials, guides, and resources that introduce OS/2 programming in a fun, engaging way. Consider creating video tutorials or interactive workshops.
    Leverage Modern Tools: Use modern platforms (YouTube, GitHub, Discord, etc.) to share code, collaborate, and teach OS/2 development. Make sure OS/2 development environments are easy to set up, possibly using virtualization or emulation.
    Hackathons and Coding Competitions: Organize online or in-person events where participants can work on OS/2-related projects. This could be a good way to engage young programmers and show the excitement of building for this platform.

3. Engage with Schools and Universities:

    Collaborate with Computer Science Programs: Offer guest lectures, workshops, or projects related to OS/2. If possible, provide internships or mentorship opportunities where students can gain real-world experience.
    Open-Source Contributions: Encourage students to contribute to open-source OS/2 projects. This can serve as a great entry point for them to get involved with the community and learn.

4. Modernize the Image of the OS/2 Community:

    Be Active on Social Media: Engage with younger audiences on platforms like Twitter, Reddit, or YouTube. Share OS/2’s history, its strengths, and what the community is working on today.
    Create a Vibrant Online Community: A supportive, welcoming environment is key. Consider using platforms like Discord or GitHub to host discussions, share projects, and mentor new developers.
    Highlight Career Potential: Show how working on OS/2 or similar systems programming can be a path to becoming a sought-after expert in legacy systems or even cybersecurity.

5. Offer Mentorship and Guidance:

    Mentorship Programs: Pair young developers with experienced OS/2 developers to provide guidance, encouragement, and advice as they navigate the system.
    Contribute to Meaningful Projects: Allow younger programmers to contribute to projects that have real-world impact, making them feel like they're part of something significant.

6. Gamification and Rewards:

    Create Challenges: Offer challenges or competitions where developers can solve real-world OS/2 problems or develop new features.
    Offer Incentives: You could offer prizes, community recognition, or even financial incentives for significant contributions to OS/2 projects.

By creating an engaging, accessible, and rewarding environment, you can inspire young people to explore OS/2 and become a part of its development community.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #19 on: September 11, 2024, 11:36:04 pm »
    Highlight Career Potential: Show how working on OS/2 or similar systems programming can be a path to becoming a sought-after expert in legacy systems or even cybersecurity.
I think that "Highlight Career Potential" may be AI hallucinations  ;D ;D ;D
Martin Iturbide
OS2World NewsMaster
... just share the dream.

RTAN

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +6/-0
    • View Profile
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #20 on: September 12, 2024, 09:37:09 pm »
That’s interesting, I use ChatGPT quite a lot, especially for info on old OS’s like OS/2. For example I recently had quite a lengthy conversation about it regarding old networking protocols such as NetBIOS. When you install OS/2 Warp Connect you can choose from protocols such as TCP/IP, NetBIOS, and NetBIOS over TCP/IP. I was trying to understand the difference between vanilla NetBIOS and NetBIOS over TCP/IP.

And that took me off on a tangent about NetBEUI since that’s what’s available natively with Windows for Workgroups 3.11.

You are absolutely right Martin that it’s very important to double check answers and challenge ChatGPT quite frequently. It gets things wrong fairly often, such as thinking that OS/2 2.0 was available on CD-ROM (it wasn’t, except for a very limited pre-release). But, to its credit, when challenged it will go away and think about it, then come back with a correction that’s normally closer to the truth.

Perhaps this would be a good time to resurrect the phrase: trust, but verify.  ;)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #21 on: September 13, 2024, 09:51:27 pm »
Hello

Yes, it is interesting as a tool and it is always required to check it out the response.
For me it is like the marketing guy that you need to review his stuff before publishing what he says.  ;D

But for me it is interesting tool that can give you some inspiration and ideas. Good for brainstorming.

Regards

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #22 on: January 08, 2025, 02:46:31 am »
OK. It is now time to get crazy.

I used NotebookLM from Google - https://notebooklm.google.com
I uploaded the PDF of "1988 - Inside OS2 - Gordon Letwin" and it has an option at the right to create some kind of a podcast about that content. (Deep Dive conversation)

It created a 50MB, 20 minutes wav file. Crazy.

- https://drive.google.com/file/d/1CvGsp03V6MLTn64B2xdJzSwH83OFbatM/view?usp=sharing
« Last Edit: January 08, 2025, 03:01:25 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #23 on: January 08, 2025, 03:00:56 am »
With the same tool, I asked "Give me a C source code sample of creating a window in PM"

Quote
The sources offer several examples of creating windows in OS/2 Presentation Manager using the WinCreateWindow and WinCreateStdWindow functions. Here's a C source code sample based on these examples, along with explanations:

#define INCL_WIN // Include header file for PM window functions
#include <os2.h>

// Client window procedure - handles messages for the window
MRESULT EXPENTRY ClientWndProc(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2) {
    switch (msg) {
        case WM_PAINT:
            // Handle window painting - draw content here
            break;

        case WM_DESTROY:
            // Handle window destruction
            break;

        default:
            return WinDefWindowProc(hwnd, msg, mp1, mp2); // Default message processing
    }
    return NULL;
}

int main() {
    HAB hab;          // Anchor block handle
    HMQ hmq;          // Message queue handle
    HWND hwndFrame;   // Frame window handle
    HWND hwndClient;  // Client window handle
    QMSG qmsg;         // Message queue element

    ULONG flCreateFlags = FCF_TITLEBAR | FCF_SYSMENU | FCF_SIZEBORDER |
                        FCF_MINMAX | FCF_SHELLPOSITION | FCF_TASKLIST;

    static CHAR szClientClass[] = "Client Window"; // Client window class name

    hab = WinInitialize(NULL);   // Initialize PM
    hmq = WinCreateMsgQueue(hab, 0); // Create message queue

    // Register client window class
    WinRegisterClass(hab, szClientClass, ClientWndProc, CS_SIZEREDRAW, 0);

    // Create standard window
    hwndFrame = WinCreateStdWindow(HWND_DESKTOP, WS_VISIBLE, &flCreateFlags,
                                    szClientClass, "My Window", 0L, NULL, 0, &hwndClient);

    // Message dispatch loop
    while (WinGetMsg(hab, &qmsg, NULL, 0, 0)) {
        WinDispatchMsg(hab, &qmsg);
    }

    WinDestroyWindow(hwndFrame); // Destroy window
    WinDestroyMsgQueue(hmq);    // Destroy message queue
    WinTerminate(hab);          // Terminate PM
    return 0;
}

Explanation:

Headers: INCL_WIN is defined to include the necessary header file (pmwin.h) for PM window functions. os2.h is included for general OS/2 API definitions.

Client Window Procedure: ClientWndProc is responsible for handling messages sent to the window. It's crucial for responding to events like painting and window destruction. The WinDefWindowProc function is used to process default messages.

Main Function:

Initialization:  WinInitialize and WinCreateMsgQueue initialize the Presentation Manager and create a message queue.

Window Class Registration: WinRegisterClass associates the client window procedure (ClientWndProc) with a window class name (szClientClass).

Window Creation: WinCreateStdWindow creates a standard window with a title bar, system menu, and other standard elements. The flCreateFlags variable controls the window's style and appearance.

Message Loop: The while loop retrieves messages from the message queue using WinGetMsg and dispatches them to the appropriate window procedure using WinDispatchMsg. This is the core of the event-driven model in PM.

Cleanup: WinDestroyWindow, WinDestroyMsgQueue, and WinTerminate clean up resources and exit the PM environment.
Key Points:

The code creates a standard window, which provides the basic framework for most PM applications.

You can customize the window's appearance using the flCreateFlags variable and its style constants.

The client window procedure is where you'll handle window-specific logic, including drawing content and responding to user interactions.

Understanding the message loop and how PM handles events is crucial for developing OS/2 applications.
Remember that this is a basic example, and building more complex applications would involve using additional PM API functions to create and manage other UI elements like menus, dialog boxes, and controls.
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5183
  • Karma: +118/-1
    • View Profile
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #24 on: January 09, 2025, 04:49:33 am »
Thought I'd ask Gemini a similar question. Larger example, includes where the example came from, missing #define INCL_WIN.
Actually, looking at the source, it is old MS Programming library v1.3, 16 bit API?
Code: [Select]
#include <os2.h>

/* Window class structure */
static HAB hab;
static HWND hwndFrame;

/* Window procedure */
MRESULT EXPENTRY ClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
    switch (msg) {
        case WM_PAINT: {
            HPS hps;
            RECTL rc;

            WinQueryWindowRect(hwnd, &rc);
            hps = WinGetPS(hwnd);
            GpiSetColor(hps, SYSCLR_BLUE);
            GpiFillRect(hps, &rc);
            WinReleasePS(hps);
            break;
        }
        case WM_DESTROY:
            WinPostMsg(hwndFrame, WM_QUIT, 0, 0);
            break;
        default:
            return WinDefWindowProc(hwnd, msg, mp1, mp2);
    }
    return 0;
}

/* Frame window procedure */
MRESULT EXPENTRY FrameWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
    switch (msg) {
        case WM_COMMAND:
            switch (SHORT1FROMMP(mp1)) {
                case IDM_QUIT:
                    WinPostMsg(hwnd, WM_CLOSE, 0, 0);
                    break;
            }
            break;
        case WM_CLOSE:
            WinDestroyWindow(hwnd);
            break;
        default:
            return WinDefWindowProc(hwnd, msg, mp1, mp2);
    }
    return 0;
}

int main(VOID) {
    HAB hab;
    HMQ hmq;
    HWND hwndFrame, hwndClient;
    QMSG qmsg;

    /* Initialize Presentation Manager */
    hab = WinInitialize(0);
    hmq = WinCreateMsgQueue(hab, 0);

    /* Register window classes */
    WinRegisterClass(hab, "MyClientClass", ClientWndProc, CS_SIZEREDRAW, 0);
    WinRegisterClass(hab, "MyFrameClass", FrameWndProc, CS_SIZEREDRAW, 0);

    /* Create frame window */
    hwndFrame = WinCreateWindow(
        HWND_DESKTOP,
        "My Frame Window",
        "MyFrameClass",
        WS_VISIBLE | WS_BORDER | FCF_TITLEBAR | FCF_SYSMENU | FCF_MINMAX,
        0, 0, 200, 100,
        HWND_DESKTOP,
        HWND_TOP,
        hab,
        NULL,
        NULL
    );

    /* Create client window */
    hwndClient = WinCreateWindow(
        hwndFrame,
        "My Client Window",
        "MyClientClass",
        WS_VISIBLE,
        0, 0, 200, 100,
        hwndFrame,
        HWND_TOP,
        hab,
        NULL,
        NULL
    );

    /* Message loop */
    while (WinGetMsg(hab, &qmsg, NULL, 0, 0)) {
        WinDispatchMsg(hab, &qmsg);
    }

    /* Clean up */
    WinDestroyWindow(hwndFrame);
    WinDestroyMsgQueue(hmq);
    WinTerminate(hab);

    return 0;
}

Explanation:

    Include Header:
        #include <os2.h>: Includes the necessary header file for OS/2 Presentation Manager functions.
    Global Variables:
        hab: An anchor block handle, used to identify the application to Presentation Manager.
        hwndFrame: A handle to the frame window.
    Window Procedures:
        ClientWndProc: Handles messages for the client window.
            WM_PAINT: Fills the client area with blue color.
            WM_DESTROY: Posts a quit message to the frame window.
        FrameWndProc: Handles messages for the frame window.
            WM_COMMAND: Processes menu commands (not implemented in this example).
            WM_CLOSE: Destroys the frame window.
    Main Function:
        Initialization:
            WinInitialize: Initializes Presentation Manager and returns an anchor block handle.
            WinCreateMsgQueue: Creates a message queue for the application.
        Window Registration:
            WinRegisterClass: Registers the window classes for the client and frame windows.
        Window Creation:
            WinCreateWindow: Creates the frame and client windows with the specified attributes.
        Message Loop:
            WinGetMsg: Retrieves messages from the message queue.
            WinDispatchMsg: Dispatches messages to the appropriate window procedures.
        Cleanup:
            WinDestroyWindow: Destroys the frame window.
            WinDestroyMsgQueue: Destroys the message queue.
            WinTerminate: Terminates Presentation Manager.

Note:

    This is a basic example and can be extended to include more features such as menus, controls, and more complex window interactions.
    You'll need to use an OS/2 development environment (such as IBM Visual Age for C++) to compile and run this code.
    This code demonstrates the fundamental concepts of creating and managing windows in the OS/2 Presentation Manager environment.

This example provides a starting point for creating OS/2 Presentation Manager applications. You can further explore the Presentation Manager API to implement more advanced features and create sophisticated graphical user interfaces.

    https://github.com/spacerace/MPL

Mentore

  • Full Member
  • ***
  • Posts: 231
  • Karma: +11/-0
    • View Profile
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #25 on: January 09, 2025, 08:15:29 am »
Thought I'd ask Gemini a similar question. Larger example, includes where the example came from, missing #define INCL_WIN.
Actually, looking at the source, it is old MS Programming library v1.3, 16 bit API?
Code: [Select]
#include <os2.h>

/* Window class structure */
static HAB hab;
static HWND hwndFrame;

/* Window procedure */
MRESULT EXPENTRY ClientWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
    switch (msg) {
        case WM_PAINT: {
            HPS hps;
            RECTL rc;

            WinQueryWindowRect(hwnd, &rc);
            hps = WinGetPS(hwnd);
            GpiSetColor(hps, SYSCLR_BLUE);
            GpiFillRect(hps, &rc);
            WinReleasePS(hps);
            break;
        }
        case WM_DESTROY:
            WinPostMsg(hwndFrame, WM_QUIT, 0, 0);
            break;
        default:
            return WinDefWindowProc(hwnd, msg, mp1, mp2);
    }
    return 0;
}

/* Frame window procedure */
MRESULT EXPENTRY FrameWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
    switch (msg) {
        case WM_COMMAND:
            switch (SHORT1FROMMP(mp1)) {
                case IDM_QUIT:
                    WinPostMsg(hwnd, WM_CLOSE, 0, 0);
                    break;
            }
            break;
        case WM_CLOSE:
            WinDestroyWindow(hwnd);
            break;
        default:
            return WinDefWindowProc(hwnd, msg, mp1, mp2);
    }
    return 0;
}

int main(VOID) {
    HAB hab;
    HMQ hmq;
    HWND hwndFrame, hwndClient;
    QMSG qmsg;

    /* Initialize Presentation Manager */
    hab = WinInitialize(0);
    hmq = WinCreateMsgQueue(hab, 0);

    /* Register window classes */
    WinRegisterClass(hab, "MyClientClass", ClientWndProc, CS_SIZEREDRAW, 0);
    WinRegisterClass(hab, "MyFrameClass", FrameWndProc, CS_SIZEREDRAW, 0);

    /* Create frame window */
    hwndFrame = WinCreateWindow(
        HWND_DESKTOP,
        "My Frame Window",
        "MyFrameClass",
        WS_VISIBLE | WS_BORDER | FCF_TITLEBAR | FCF_SYSMENU | FCF_MINMAX,
        0, 0, 200, 100,
        HWND_DESKTOP,
        HWND_TOP,
        hab,
        NULL,
        NULL
    );

    /* Create client window */
    hwndClient = WinCreateWindow(
        hwndFrame,
        "My Client Window",
        "MyClientClass",
        WS_VISIBLE,
        0, 0, 200, 100,
        hwndFrame,
        HWND_TOP,
        hab,
        NULL,
        NULL
    );

    /* Message loop */
    while (WinGetMsg(hab, &qmsg, NULL, 0, 0)) {
        WinDispatchMsg(hab, &qmsg);
    }

    /* Clean up */
    WinDestroyWindow(hwndFrame);
    WinDestroyMsgQueue(hmq);
    WinTerminate(hab);

    return 0;
}

Explanation:

    Include Header:
        #include <os2.h>: Includes the necessary header file for OS/2 Presentation Manager functions.
    Global Variables:
        hab: An anchor block handle, used to identify the application to Presentation Manager.
        hwndFrame: A handle to the frame window.
    Window Procedures:
        ClientWndProc: Handles messages for the client window.
            WM_PAINT: Fills the client area with blue color.
            WM_DESTROY: Posts a quit message to the frame window.
        FrameWndProc: Handles messages for the frame window.
            WM_COMMAND: Processes menu commands (not implemented in this example).
            WM_CLOSE: Destroys the frame window.
    Main Function:
        Initialization:
            WinInitialize: Initializes Presentation Manager and returns an anchor block handle.
            WinCreateMsgQueue: Creates a message queue for the application.
        Window Registration:
            WinRegisterClass: Registers the window classes for the client and frame windows.
        Window Creation:
            WinCreateWindow: Creates the frame and client windows with the specified attributes.
        Message Loop:
            WinGetMsg: Retrieves messages from the message queue.
            WinDispatchMsg: Dispatches messages to the appropriate window procedures.
        Cleanup:
            WinDestroyWindow: Destroys the frame window.
            WinDestroyMsgQueue: Destroys the message queue.
            WinTerminate: Terminates Presentation Manager.

Note:

    This is a basic example and can be extended to include more features such as menus, controls, and more complex window interactions.
    You'll need to use an OS/2 development environment (such as IBM Visual Age for C++) to compile and run this code.
    This code demonstrates the fundamental concepts of creating and managing windows in the OS/2 Presentation Manager environment.

This example provides a starting point for creating OS/2 Presentation Manager applications. You can further explore the Presentation Manager API to implement more advanced features and create sophisticated graphical user interfaces.

    https://github.com/spacerace/MPL

Interesting. It doesn't use WinCreateStdWindow, so maybe you're right and it's not a 2.x PM code. That said, I see no big mistakes. Not surprising though - GPT and other AI tools are really useful in these cases, where there's a non-ambiguous code base to use. It hallucinates, but behaves better than in other topics.

Mentore

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5080
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Asking OS/2 things to OpenAI - Fun and maybe Insightful.
« Reply #26 on: January 09, 2025, 07:01:02 pm »
Actually, looking at the source, it is old MS Programming library v1.3, 16 bit API?

Maybe I uploaded the wrong book  :D
Martin Iturbide
OS2World NewsMaster
... just share the dream.