Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. adgHANDLE_DLGMSG???

adgHANDLE_DLGMSG???

Scheduled Pinned Locked Moved C / C++ / MFC
questionjsontutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NicholasCougar
    wrote on last edited by
    #1

    Hi, I am reading Window95: A Developer's Guide and encounter a function in Dialog box procedure function.

    switch(uMsg){
    adgHANDLE_DLGMSG(hwnd, WM_INITDIALOG, keyCount_OnCommand);
    ...
    }

    My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

    N 1 Reply Last reply
    0
    • N NicholasCougar

      Hi, I am reading Window95: A Developer's Guide and encounter a function in Dialog box procedure function.

      switch(uMsg){
      adgHANDLE_DLGMSG(hwnd, WM_INITDIALOG, keyCount_OnCommand);
      ...
      }

      My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      NicholasCougar wrote: My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? It must be a user defined function. Look further into the source code. Nish


      Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

      N 1 Reply Last reply
      0
      • N Nish Nishant

        NicholasCougar wrote: My question is, I can't find the function adgHANDLE_DLGMSG in WIN32 API, why??? It must be a user defined function. Look further into the source code. Nish


        Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

        N Offline
        N Offline
        NicholasCougar
        wrote on last edited by
        #3

        Hi, The follows are another copy from Programming Application for Microsoft Windows, Fourth Edition . There is a function similar with the previous one: chHANDLE_DLGMSG By now, I have not found any function defined as chHANDLE_DLGMSG in source file.

        INT_PTR WINAPI Dlg_Proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
        {
        switch(uMsg)
        {
        chHANDLE_DLGMSG(hwnd, WM_INITDIALOG, Dlg_OnInitDialog);
        chHANDLE_DLGMSG(hwnd, WM_TIMER, Dlg_OnTimer);
        chHANDLE_DLGMSG(hwnd, WM_COMMAND, Dlg_OnCommand);
        }
        return (FALSE);
        }

        Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

        N 1 Reply Last reply
        0
        • N NicholasCougar

          Hi, The follows are another copy from Programming Application for Microsoft Windows, Fourth Edition . There is a function similar with the previous one: chHANDLE_DLGMSG By now, I have not found any function defined as chHANDLE_DLGMSG in source file.

          INT_PTR WINAPI Dlg_Proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
          {
          switch(uMsg)
          {
          chHANDLE_DLGMSG(hwnd, WM_INITDIALOG, Dlg_OnInitDialog);
          chHANDLE_DLGMSG(hwnd, WM_TIMER, Dlg_OnTimer);
          chHANDLE_DLGMSG(hwnd, WM_COMMAND, Dlg_OnCommand);
          }
          return (FALSE);
          }

          Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Is this the Jeffrey Richter book? If so look at the last, or the 2nd from last chapter. It may even be part of the appendix. He has his own custom header files with his own custom functions and macros :-) Nish


          Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

          N 1 Reply Last reply
          0
          • N Nish Nishant

            Is this the Jeffrey Richter book? If so look at the last, or the 2nd from last chapter. It may even be part of the appendix. He has his own custom header files with his own custom functions and macros :-) Nish


            Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

            N Offline
            N Offline
            NicholasCougar
            wrote on last edited by
            #5

            Hi, You are right!!! Following is the Macro Jeffrey Richter wrote. // The normal HANDLE_MSG macro in WINDOWSX.H does not work properly for dialog // boxes because DlgProc's return a BOOL instead of an LRESULT (like // WndProcs). This adgHANDLE_DLGMSG macro corrects the problem: #define adgHANDLE_DLGMSG(hwnd, message, fn) \ case (message): return (SetDlgMsgResult(hwnd, uMsg, \ HANDLE_##message((hwnd), (wParam), (lParam), (fn)))) And this Macro is collected in Win95adg.h which is included in source file. Thank you Best regard. I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups