WinDlgBox - OS2

This is a discussion on WinDlgBox - OS2 ; The parameters of a desktop object may contain "[Enter a float]". I want something just like that, but the docs mention a *.RES file. Can I use a WinDlgBox() without having to have a resource file? The only thing I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: WinDlgBox

  1. WinDlgBox


    The parameters of a desktop object may contain "[Enter a float]".

    I want something just like that, but the docs mention a *.RES file. Can I
    use a WinDlgBox() without having to have a resource file? The only thing
    I actually need is to set the title, e.g. "Enter a float", and allow the
    user to enter something. Other bells and whistles aren't required (yet),
    for one because I'm extremely new to PM programming! :-)



    ---

  2. Re: WinDlgBox

    ML wrote:
    > The parameters of a desktop object may contain "[Enter a float]".
    >
    > I want something just like that, but the docs mention a *.RES file. Can I
    > use a WinDlgBox() without having to have a resource file? The only thing
    > I actually need is to set the title, e.g. "Enter a float", and allow the
    > user to enter something. Other bells and whistles aren't required (yet),
    > for one because I'm extremely new to PM programming! :-)


    You could build up the binary resource in memory and create a dialog
    window out of it, or you could go the easier route and just create a
    standard PM frame window and create a static text window and entry field
    windows within it. If you want some good example's I'd recommend
    Charles Petzold's books on PM programming.

    --
    [Reverse the parts of the e-mail address to reply.]

  3. Re: WinDlgBox


    > If you want some good example's I'd recommend Charles Petzold's
    > books on PM programming.


    Oh well, that wouldn't hurt. The DIALOG.EXE example is helpful too,
    but OTOH the PM UI offers so much opportunities for my app that I'll
    probably hit all walls between wishes, needs, possibilities and an
    extreme lack of knowledge! :-)

    Obviously I can ignore my wishlist, which doesn't include a lot of
    complicated items, but each one is new to me. A DIALOG.EXE-like app
    would be fine for now, but I think it wouldn't add very much. It's
    not meeting the (IMVhO) typcial OS/2 standards, and you would be
    able to notice that immediately.

    Additional PM-related wishlist items could be displaying a picture
    instead of just loading it, support D&D, make the output editable,
    selecting to be used items in a picture, supporting colors instead
    of just lack-of-knowledge-B&W, adjustable settings and options, and
    so on. The non-PM wishlist is shorter, e.g. stop using a bytemap to
    store a bitmap. ;-)

    But if PM programming (beyond standard dialogs) is "required", I'll
    look into that. It's going to look ugly-featureless, but I'll meet
    proper WM_QUIT-processing then too.


    Right now I've got it almost working as-is, BTW. No WinDlgBox (yet),
    which is solved/avoided by using parameters at the moment.



    ---

  4. Re: WinDlgBox

    ML schrieb:
    > The parameters of a desktop object may contain "[Enter a float]".
    >
    > I want something just like that, but the docs mention a *.RES file. Can I
    > use a WinDlgBox() without having to have a resource file? The only thing
    > I actually need is to set the title, e.g. "Enter a float", and allow the
    > user to enter something. Other bells and whistles aren't required (yet),
    > for one because I'm extremely new to PM programming! :-)


    It's far easier to create a small .rc resource file (and compile a
    binary .res file from it and bind that to the executable) and
    load/process the dialog via "WinDlgBox" than creating the dialog in
    memory ("WinCreateDlg", extremely painful) or building a window that
    contains the resource (also painful with all the positioning etc.)

    Lars

+ Reply to Thread