Disappearing frame window shortcut functions. - OS2

This is a discussion on Disappearing frame window shortcut functions. - OS2 ; Hi, I have run into a problem which I don't quite understand so if there is anybody out there who can shed some light on this problem I would appreciate hearing from you. The problem is as follows. Normally when ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: Disappearing frame window shortcut functions.

  1. Disappearing frame window shortcut functions.

    Hi,

    I have run into a problem which I don't quite understand so if there is
    anybody out there who can shed some light on this problem I would appreciate
    hearing from you.

    The problem is as follows. Normally when a frame window is created it is
    possible to use the short cuts

    Alt+F4 to close the window
    Alt+F7 to move the window
    Alt+F9 to minimize the window
    Alt+F10 to maximize the window

    If I create a frame window in the normal way add a client there is no
    problem. However if I fill the client area with a dialogue then the
    shortcut keys no longer work. What am I missing!


    Here is the very abbreviated code but it exibits the symptoms I describe.
    Removeing the line


    hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);

    corrects the problem.


    int main(int argc, char * argv[])
    {
    static CHAR szClientClass [] = "SearchPlus" ;
    static ULONG flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU |
    FCF_MINMAX | FCF_TASKLIST|
    FCF_MENU | FCF_BORDER |
    FCF_ICON |FCF_SHELLPOSITION ;
    HAB hab ;
    HMQ hmq ;
    QMSG qmsg ;
    APIRET rc;
    UCHAR szBadName[CCHMAXPATH];
    CHAR szBuffer[SZBUFFERSIZE];



    hab = WinInitialize (0) ;
    hmq = WinCreateMsgQueue (hab, 0) ;
    WinRegisterClass (
    hab, /* Anchor block handle
    */
    szClientClass, /* Name of class being registered
    */
    ClientWndProc, /* Window procedure for class
    */
    0L, /* Class style
    */
    0) ; /* Extra bytes to reserve
    */

    rc=DosLoadModule(NULL,0L,"srchplEN",&langhmod); /* load my DLL
    */
    if(rc)
    {
    WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,"Error Loading Language
    DLL",
    szClientClass, 0, MB_ERROR|MB_OK);
    abort();
    }



    hwndFrame = WinCreateStdWindow (
    HWND_DESKTOP, /* Parent window handle
    */
    WS_VISIBLE, /* Style of frame window
    */
    &flFrameFlags, /* Pointer to control data
    */
    szClientClass, /* Client window class name
    */
    SVERSION, /* Title bar text
    */
    0L, /* Style of client window
    */
    langhmod, /* Module handle for resources
    */
    ID_RESOURCE, /* ID of resources
    */
    &hwndClient) ; /* Pointer to client window handle
    */


    hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    while (WinGetMsg (hab, &qmsg, NULLHANDLE, 0, 0))
    WinDispatchMsg (hab, &qmsg) ;

    WinDestroyWindow (hwndFrame) ;
    WinDestroyMsgQueue (hmq) ;
    WinTerminate (hab) ;
    return 0 ;
    }


    MRESULT EXPENTRY ClientWndProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM
    mp2)
    {

    return WinDefWindowProc (hwnd, msg, mp1, mp2) ;
    }


    MRESULT EXPENTRY DlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    {
    return WinDefDlgProc (hwnd, msg, mp1, mp2) ;

    }




  2. Re: Disappearing frame window shortcut functions.

    On Thu, 28 Jun 2007 19:00:48 UTC, "Keith Merrington"
    wrote:

    > Hi,
    >
    > I have run into a problem which I don't quite understand so if there is
    > anybody out there who can shed some light on this problem I would appreciate
    > hearing from you.
    >
    > The problem is as follows. Normally when a frame window is created it is
    > possible to use the short cuts
    >
    > Alt+F4 to close the window
    > Alt+F7 to move the window
    > Alt+F9 to minimize the window
    > Alt+F10 to maximize the window
    >
    > If I create a frame window in the normal way add a client there is no
    > problem. However if I fill the client area with a dialogue then the
    > shortcut keys no longer work. What am I missing!
    >
    >
    > Here is the very abbreviated code but it exibits the symptoms I describe.
    > Removeing the line
    >
    >
    > hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    >
    > corrects the problem.
    >
    >
    > int main(int argc, char * argv[])
    > {
    > static CHAR szClientClass [] = "SearchPlus" ;
    > static ULONG flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU |
    > FCF_MINMAX | FCF_TASKLIST|
    > FCF_MENU | FCF_BORDER |
    > FCF_ICON |FCF_SHELLPOSITION ;
    > HAB hab ;
    > HMQ hmq ;
    > QMSG qmsg ;
    > APIRET rc;
    > UCHAR szBadName[CCHMAXPATH];
    > CHAR szBuffer[SZBUFFERSIZE];
    >
    >
    >
    > hab = WinInitialize (0) ;
    > hmq = WinCreateMsgQueue (hab, 0) ;
    > WinRegisterClass (
    > hab, /* Anchor block handle
    > */
    > szClientClass, /* Name of class being registered
    > */
    > ClientWndProc, /* Window procedure for class
    > */
    > 0L, /* Class style
    > */
    > 0) ; /* Extra bytes to reserve
    > */
    >
    > rc=DosLoadModule(NULL,0L,"srchplEN",&langhmod); /* load my DLL
    > */
    > if(rc)
    > {
    > WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,"Error Loading Language
    > DLL",
    > szClientClass, 0, MB_ERROR|MB_OK);
    > abort();
    > }
    >
    >
    >
    > hwndFrame = WinCreateStdWindow (
    > HWND_DESKTOP, /* Parent window handle
    > */
    > WS_VISIBLE, /* Style of frame window
    > */
    > &flFrameFlags, /* Pointer to control data
    > */
    > szClientClass, /* Client window class name
    > */
    > SVERSION, /* Title bar text
    > */
    > 0L, /* Style of client window
    > */
    > langhmod, /* Module handle for resources
    > */
    > ID_RESOURCE, /* ID of resources
    > */
    > &hwndClient) ; /* Pointer to client window handle
    > */
    >
    >

    move that line into WM_CREATE in client window:
    > hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    > while (WinGetMsg (hab, &qmsg, NULLHANDLE, 0, 0))
    > WinDispatchMsg (hab, &qmsg) ;
    >
    > WinDestroyWindow (hwndFrame) ;
    > WinDestroyMsgQueue (hmq) ;
    > WinTerminate (hab) ;
    > return 0 ;
    > }
    >
    >
    > MRESULT EXPENTRY ClientWndProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM
    > mp2)
    > {

    switch (msg) {
    WM_CLOSE:
    /* send the dialog WM_CLOSE for let it cleanup itself */
    /* cleanup the client */
    break;
    WM_SIZE:
    /* WM_SIZE occures when upper or right hand border moves */

    /* do anything to resize the frame WinDefWindowproc() does not
    */
    /* forward the message to the dialogproc to let it do its own
    */
    /* work for this event */
    WinSendMsg(hwndDlg, msg, mp1, mp2);
    /* do anything to resize the frame WinDefWindowproc() does not
    */

    break;
    WM_MOVE:
    /* WM_MOVE occures everey time lefthand or lower border moves
    */
    /* tell the dialog this event to let it do its own work to fit
    */
    /* the clients size */
    WinSendMsg(hwndDlg, msg, mp1, mp2);
    /* do anything you needs to move the frame that
    WinDefWindowProc() */
    /* does not alone */
    break;
    /* forward other messages to the dialog window that have a need
    */
    /* to known by the dialog but gets received by the client */
    }
    return WinDefWindowProc (hwnd, msg, mp1, mp2) ;
    > }
    >
    >
    > MRESULT EXPENTRY DlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    > {


    switch (msg) {
    WM_INITDLG:
    /* fill up the child windows like listbox, combobox,
    containers */
    break;
    WM_SIZE:
    /* calculate the new size of the dialog and its childs
    depending */
    /* of the new size of the client window */
    /* calculate and set the new coordinates of the childs */
    break;
    WM_MOVE:
    /* possible nothing to do */
    break;
    /* more messages */
    }

    > return WinDefDlgProc (hwnd, msg, mp1, mp2) ;
    >
    > }
    >
    >
    >



    --
    Tschau/Bye
    Herbert

    Visit http://www.ecomstation.de the home of german eComStation
    eComStation 1.2R Deutsch ist da!

  3. Re: Disappearing frame window shortcut functions.

    On Thu, 28 Jun 2007 21:00:48 +0200, Keith Merrington
    wrote:
    > I have run into a problem which I don't quite understand so if there is
    > anybody out there who can shed some light on this problem I would appreciate
    > hearing from you.
    >
    > The problem is as follows. Normally when a frame window is created it is
    > possible to use the short cuts
    >
    > Alt+F4 to close the window
    > Alt+F7 to move the window
    > Alt+F9 to minimize the window
    > Alt+F10 to maximize the window
    >
    > If I create a frame window in the normal way add a client there is no
    > problem. However if I fill the client area with a dialogue then the
    > shortcut keys no longer work. What am I missing!
    >
    >
    > Here is the very abbreviated code but it exibits the symptoms I describe.
    > Removeing the line
    >
    >
    > hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    > corrects the problem.


    Just a WAG, but wouldn't it be better for the owner window be hwndFrame
    rather than hwndClient? I'm a bit vague about how this works, especially
    when loading dialogs into frames, but I think this code would cause the
    client (the dialog) to pass unhandled messages back to itself, which
    doesn't seem right...

    --
    Alex Taylor
    http://www.cs-club.org/~alex

    Remove hat to reply (reply-to address).

  4. Re: Disappearing frame window shortcut functions.


    > If I create a frame window in the normal way add a client there is no
    > problem. However if I fill the client area with a dialogue then the
    > shortcut keys no longer work. What am I missing!


    Why do you create a client window at all ?
    When I'm in need to have a dialog act as main window, I use this code:

    //--------------------------------------------------------------//
    // //
    // Dialog als Hauptfenster einer Applikation //
    // (incl. Menü und Icon) //
    // //
    // Erzeugt: 30.03.95 R.Ihle //
    // //
    //--------------------------------------------------------------//

    #define INCL_WIN
    #include
    #include


    static HWND hwndFrame;

    #define IDD_DLG1 1000


    //--------------------------------------------------------------//
    // Dialog Procedure //
    //--------------------------------------------------------------//

    MRESULT EXPENTRY MainDlgProc(HWND hwnd, ULONG msg,
    MPARAM mp1, MPARAM mp2)
    {
    switch( msg )
    {
    case WM_INITDLG :
    // initialize controls here
    break;

    case WM_ADJUSTWINDOWPOS :
    // we don't get a WM_SIZE...
    break;

    case WM_COMMAND :
    // currently we exit on every command msg...
    WinPostMsg(hwnd, WM_CLOSE, 0, 0);
    break;

    case WM_CLOSE:
    // exit message loop
    WinPostMsg(hwndFrame, WM_QUIT, 0, 0);
    break;

    default:
    return WinDefDlgProc(hwnd, msg, mp1, mp2);
    }

    return 0;
    }


    //--------------------------------------------------------------//
    // H A U P T P R O G R A M M //
    //--------------------------------------------------------------//

    #pragma argsused
    int main(int argc, char *argv[])
    {
    HAB hab;
    HMQ hmq;
    QMSG qmsg;
    SWP swp;
    SWCNTRL SwitchCtrl = { 0 };

    hab = WinInitialize(0);
    hmq = WinCreateMsgQueue(hab, 0);

    hwndFrame = WinLoadDlg(HWND_DESKTOP, HWND_DESKTOP,
    MainDlgProc, NULLHANDLE, IDD_DLG1, NULL);
    if( hwndFrame )
    {
    // setup switch list entry
    SwitchCtrl.hwnd = hwndFrame;
    SwitchCtrl.uchVisibility = SWL_VISIBLE;
    SwitchCtrl.fbJump = SWL_JUMPABLE;
    WinQueryWindowProcess(hwndFrame, &SwitchCtrl.idProcess, NULL);
    WinQueryWindowText(hwndFrame,
    sizeof(SwitchCtrl.szSwtitle), SwitchCtrl.szSwtitle);
    WinAddSwitchEntry(&SwitchCtrl);

    // setup menu
    WinLoadMenu(hwndFrame, NULLHANDLE, IDD_DLG1);
    WinSendMsg(hwndFrame, WM_UPDATEFRAME, (MPARAM)FCF_MENU, 0);

    // setup icon
    WinSendMsg(hwndFrame, WM_SETICON,
    (MPARAM)WinLoadPointer(HWND_DESKTOP, 0, IDD_DLG1), (MPARAM)0);

    // set initial window position
    WinQueryTaskSizePos(hab, 0, &swp);
    WinSetWindowPos(hwndFrame, NULLHANDLE,
    swp.x, swp.y, 0, 0, SWP_SHOW | SWP_MOVE);

    while( WinGetMsg(hab, &qmsg, 0, 0, 0) ) WinDispatchMsg(hab, &qmsg);
    }

    WinDestroyMsgQueue(hmq);
    WinTerminate(hab);
    return 0;
    }


    //--------------------------------------------------------------//
    // //
    // Ressource file //
    // //
    //--------------------------------------------------------------//

    #ifndef WORKSHOP_INVOKED
    #define INCL_NOBASEAPI
    #define INCL_NLS
    #include
    #endif


    MENU 1000
    BEGIN
    SUBMENU "File"
    BEGIN
    MENUITEM "Exit", DID_OK, MIS_TEXT
    END
    END


    ICON 1000 "dlgmain.ico"


    DLGTEMPLATE 1000
    BEGIN
    DIALOG "Test dialog", 1000, 80, 100, 152, 80, WS_VISIBLE |
    WS_CLIPSIBLINGS | WS_SAVEBITS, FCF_TITLEBAR | FCF_SYSMENU |
    FCF_NOBYTEALIGN
    PRESPARAMS PP_FONTNAMESIZE "9.WarpSans"
    BEGIN
    CONTROL "Hellp !", -1, 6, 19, 140, 43, WC_STATIC, SS_GROUPBOX |
    DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
    DEFPUSHBUTTON "O~K", DID_OK, 6, 3, 40, 12, BS_PUSHBUTTON |
    BS_DEFAULT | WS_VISIBLE | WS_GROUP | WS_TABSTOP
    END

    END




    --
    Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    http://www.s-t.de
    Please remove all characters left of the "R" in my email address


  5. Re: Disappearing frame window shortcut functions.

    Thanks Herbert,
    I did however know what to put in the Procedures, I had only removed
    everything in order to keep the code to the barest minimum in order to be
    able to show the problem of no frame schortcut controls.

    Keith

    "Herbert Rosenau" wrote in message
    news:wmzsGguTDN6N-pn2-cnwi9eXJ9zJ5@JUPITER1.PC-ROSENAU.DE...
    > On Thu, 28 Jun 2007 19:00:48 UTC, "Keith Merrington"
    > wrote:
    >
    > > Hi,
    > >
    > > I have run into a problem which I don't quite understand so if there

    is
    > > anybody out there who can shed some light on this problem I would

    appreciate
    > > hearing from you.
    > >
    > > The problem is as follows. Normally when a frame window is created it is
    > > possible to use the short cuts
    > >
    > > Alt+F4 to close the window
    > > Alt+F7 to move the window
    > > Alt+F9 to minimize the window
    > > Alt+F10 to maximize the window
    > >
    > > If I create a frame window in the normal way add a client there is no
    > > problem. However if I fill the client area with a dialogue then the
    > > shortcut keys no longer work. What am I missing!
    > >
    > >
    > > Here is the very abbreviated code but it exibits the symptoms I

    describe.
    > > Removeing the line
    > >
    > >
    > > hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    > >
    > > corrects the problem.
    > >
    > >
    > > int main(int argc, char * argv[])
    > > {
    > > static CHAR szClientClass [] = "SearchPlus" ;
    > > static ULONG flFrameFlags = FCF_TITLEBAR | FCF_SYSMENU |
    > > FCF_MINMAX | FCF_TASKLIST|
    > > FCF_MENU | FCF_BORDER |
    > > FCF_ICON |FCF_SHELLPOSITION ;
    > > HAB hab ;
    > > HMQ hmq ;
    > > QMSG qmsg ;
    > > APIRET rc;
    > > UCHAR szBadName[CCHMAXPATH];
    > > CHAR szBuffer[SZBUFFERSIZE];
    > >
    > >
    > >
    > > hab = WinInitialize (0) ;
    > > hmq = WinCreateMsgQueue (hab, 0) ;
    > > WinRegisterClass (
    > > hab, /* Anchor block handle
    > > */
    > > szClientClass, /* Name of class being

    registered
    > > */
    > > ClientWndProc, /* Window procedure for class
    > > */
    > > 0L, /* Class style
    > > */
    > > 0) ; /* Extra bytes to reserve
    > > */
    > >
    > > rc=DosLoadModule(NULL,0L,"srchplEN",&langhmod); /* load my

    DLL
    > > */
    > > if(rc)
    > > {
    > > WinMessageBox(HWND_DESKTOP, HWND_DESKTOP,"Error Loading

    Language
    > > DLL",
    > > szClientClass, 0, MB_ERROR|MB_OK);
    > > abort();
    > > }
    > >
    > >
    > >
    > > hwndFrame = WinCreateStdWindow (
    > > HWND_DESKTOP, /* Parent window handle
    > > */
    > > WS_VISIBLE, /* Style of frame window
    > > */
    > > &flFrameFlags, /* Pointer to control data
    > > */
    > > szClientClass, /* Client window class name
    > > */
    > > SVERSION, /* Title bar text
    > > */
    > > 0L, /* Style of client window
    > > */
    > > langhmod, /* Module handle for resources
    > > */
    > > ID_RESOURCE, /* ID of resources
    > > */
    > > &hwndClient) ; /* Pointer to client window

    handle
    > > */
    > >
    > >

    > move that line into WM_CREATE in client window:
    > > hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    > > while (WinGetMsg (hab, &qmsg, NULLHANDLE, 0, 0))
    > > WinDispatchMsg (hab, &qmsg) ;
    > >
    > > WinDestroyWindow (hwndFrame) ;
    > > WinDestroyMsgQueue (hmq) ;
    > > WinTerminate (hab) ;
    > > return 0 ;
    > > }
    > >
    > >
    > > MRESULT EXPENTRY ClientWndProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM
    > > mp2)
    > > {

    > switch (msg) {
    > WM_CLOSE:
    > /* send the dialog WM_CLOSE for let it cleanup itself */
    > /* cleanup the client */
    > break;
    > WM_SIZE:
    > /* WM_SIZE occures when upper or right hand border moves */
    >
    > /* do anything to resize the frame WinDefWindowproc() does not
    > */
    > /* forward the message to the dialogproc to let it do its own
    > */
    > /* work for this event */
    > WinSendMsg(hwndDlg, msg, mp1, mp2);
    > /* do anything to resize the frame WinDefWindowproc() does not
    > */
    >
    > break;
    > WM_MOVE:
    > /* WM_MOVE occures everey time lefthand or lower border moves
    > */
    > /* tell the dialog this event to let it do its own work to fit
    > */
    > /* the clients size */
    > WinSendMsg(hwndDlg, msg, mp1, mp2);
    > /* do anything you needs to move the frame that
    > WinDefWindowProc() */
    > /* does not alone */
    > break;
    > /* forward other messages to the dialog window that have a need
    > */
    > /* to known by the dialog but gets received by the client */
    > }
    > return WinDefWindowProc (hwnd, msg, mp1, mp2) ;
    > > }
    > >
    > >
    > > MRESULT EXPENTRY DlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    > > {

    >
    > switch (msg) {
    > WM_INITDLG:
    > /* fill up the child windows like listbox, combobox,
    > containers */
    > break;
    > WM_SIZE:
    > /* calculate the new size of the dialog and its childs
    > depending */
    > /* of the new size of the client window */
    > /* calculate and set the new coordinates of the childs */
    > break;
    > WM_MOVE:
    > /* possible nothing to do */
    > break;
    > /* more messages */
    > }
    >
    > > return WinDefDlgProc (hwnd, msg, mp1, mp2) ;
    > >
    > > }
    > >
    > >
    > >

    >
    >
    > --
    > Tschau/Bye
    > Herbert
    >
    > Visit http://www.ecomstation.de the home of german eComStation
    > eComStation 1.2R Deutsch ist da!




  6. Re: Disappearing frame window shortcut functions.

    Thanks for your input Alex,

    I did try changing the line

    hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);

    to

    hwndDlg=WinLoadDlg(hwndFrame,hwndClient,DlgProc,la nghmod,IDN_DLG,NULL);

    but to no avail.

    However if I change it to

    hwndDlg=WinLoadDlg(HWND_OWNER,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);

    it does. The downside is that the dialogue moves sometimes with the frame
    window but if you move he frame very slowly it the dialogue window remains
    where it is. Of course I could add some logic to keep the window positioned
    relative to the frame window but I still don't see adding the dialogue
    usurps the frame control shortcuts.

    Keith



  7. Re: Disappearing frame window shortcut functions.

    CORRECTION SHOULD HAVE READ

    hwndDlg=WinLoadDlg(HWND_DESKTOP,hwndClient,DlgProc ,langhmod,IDN_DLG,NULL);


    "Keith Merrington" wrote in message
    news:tKJhi.2387$%q4.2155@amstwist00...
    > Thanks for your input Alex,
    >
    > I did try changing the line
    >
    > hwndDlg=WinLoadDlg(hwndClient,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    >
    > to
    >
    > hwndDlg=WinLoadDlg(hwndFrame,hwndClient,DlgProc,la nghmod,IDN_DLG,NULL);
    >
    > but to no avail.
    >
    > However if I change it to
    >
    > hwndDlg=WinLoadDlg(HWND_OWNER,hwndClient,DlgProc,l anghmod,IDN_DLG,NULL);
    >
    > it does. The downside is that the dialogue moves sometimes with the frame
    > window but if you move he frame very slowly it the dialogue window remains
    > where it is. Of course I could add some logic to keep the window

    positioned
    > relative to the frame window but I still don't see adding the dialogue
    > usurps the frame control shortcuts.
    >
    > Keith
    >
    >




  8. Re: Disappearing frame window shortcut functions.

    On Thu, 28 Jun 2007 21:00:48 +0200, Keith Merrington
    wrote:

    > The problem is as follows. Normally when a frame window is created it is
    > possible to use the short cuts
    >
    > Alt+F4 to close the window
    > Alt+F7 to move the window
    > Alt+F9 to minimize the window
    > Alt+F10 to maximize the window
    >
    > If I create a frame window in the normal way add a client there is no
    > problem. However if I fill the client area with a dialogue then the
    > shortcut keys no longer work. What am I missing!


    The accelerator keys end up in the dialog's window proc., so you need to
    forward them back to the frame window. In DlgProc:

    case WM_SYSCOMMAND:
    WinSendMsg (hwndFrame, msg, mp1, mp2);
    break;

    At least, that is what I did in one of my apps.

  9. Re: Disappearing frame window shortcut functions.

    THAT DID THE TRICK

    Thanks

    Keith

    "Paul Ratcliffe" wrote in message
    news:slrnf8fa1b.20c.abuse@news.pr.network...
    > On Thu, 28 Jun 2007 21:00:48 +0200, Keith Merrington
    > wrote:
    >
    > > The problem is as follows. Normally when a frame window is created it is
    > > possible to use the short cuts
    > >
    > > Alt+F4 to close the window
    > > Alt+F7 to move the window
    > > Alt+F9 to minimize the window
    > > Alt+F10 to maximize the window
    > >
    > > If I create a frame window in the normal way add a client there is no
    > > problem. However if I fill the client area with a dialogue then the
    > > shortcut keys no longer work. What am I missing!

    >
    > The accelerator keys end up in the dialog's window proc., so you need to
    > forward them back to the frame window. In DlgProc:
    >
    > case WM_SYSCOMMAND:
    > WinSendMsg (hwndFrame, msg, mp1, mp2);
    > break;
    >
    > At least, that is what I did in one of my apps.




  10. Re: Disappearing frame window shortcut functions.

    On Sun, 1 Jul 2007 08:32:25 UTC, "Keith Merrington"
    wrote:

    > Thanks Herbert,
    > I did however know what to put in the Procedures, I had only removed
    > everything in order to keep the code to the barest minimum in order to be
    > able to show the problem of no frame schortcut controls.


    Please stop producing TOFU!

    Look at the details I'd posted. You have to forward some messages to
    your dialog to give it a chance to act on them because the frame tells
    only the client window and not its child (the dialog about.

    --
    Tschau/Bye
    Herbert

    Visit http://www.ecomstation.de the home of german eComStation
    eComStation 1.2R Deutsch ist da!

  11. Re: Disappearing frame window shortcut functions.

    Alex Taylor wrote:
    >
    > Just a WAG, but wouldn't it be better for the owner window be hwndFrame
    > rather than hwndClient? I'm a bit vague about how this works, especially
    > when loading dialogs into frames, but I think this code would cause the
    > client (the dialog) to pass unhandled messages back to itself, which
    > doesn't seem right...
    >


    Gosh Alex, if *you're* a bit vague, where can I find good documentation?
    I've got several books on PM programming including Petzold, who seems
    to be pretty good, but whenever I try something new it seems to take me
    quite a while to work out the kinks.


  12. Re: Disappearing frame window shortcut functions.

    On Tue, 03 Jul 2007 18:04:08 -0500, Peter Flass wrote:
    >> Just a WAG, but wouldn't it be better for the owner window be hwndFrame
    >> rather than hwndClient? I'm a bit vague about how this works, especially
    >> when loading dialogs into frames, but I think this code would cause the
    >> client (the dialog) to pass unhandled messages back to itself, which
    >> doesn't seem right...
    >>

    >
    > Gosh Alex, if *you're* a bit vague, where can I find good documentation?
    > I've got several books on PM programming including Petzold, who seems
    > to be pretty good, but whenever I try something new it seems to take me
    > quite a while to work out the kinks.


    I'm not sure I deserve that emphasis. I don't own significant literature
    on OS/2 programming, since I started so late in the game (2003-ish).
    Other than textbooks, generally you can get good help from the genuinely
    skilled PM programmers (I am not one of them) that still hang around these
    parts...


    --
    Alex Taylor
    http://www.cs-club.org/~alex

    Remove hat to reply (reply-to address).

+ Reply to Thread