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. CDialog Help urgent????

CDialog Help urgent????

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionlearning
8 Posts 3 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
    nutkase
    wrote on last edited by
    #1

    hi, well the problem i am facing is that i have a class say A..which has the following declaration class A: public CFontDialog { .... } now in the initinstance of the dialog i want to get the resource id of dialog. Can anyone please help me on the issue! PS. i have tried GetWindowLong( GWL_ID )... but it returns 0.:confused:...... please help. lid.

    T M 2 Replies Last reply
    0
    • N nutkase

      hi, well the problem i am facing is that i have a class say A..which has the following declaration class A: public CFontDialog { .... } now in the initinstance of the dialog i want to get the resource id of dialog. Can anyone please help me on the issue! PS. i have tried GetWindowLong( GWL_ID )... but it returns 0.:confused:...... please help. lid.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      you will have it under A::IDD


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      N 1 Reply Last reply
      0
      • N nutkase

        hi, well the problem i am facing is that i have a class say A..which has the following declaration class A: public CFontDialog { .... } now in the initinstance of the dialog i want to get the resource id of dialog. Can anyone please help me on the issue! PS. i have tried GetWindowLong( GWL_ID )... but it returns 0.:confused:...... please help. lid.

        M Offline
        M Offline
        Martin Koorts
        wrote on last edited by
        #3

        Hi It might be in the CDialog::m_lpszTemplateName parameter. HTH Martin

        N 1 Reply Last reply
        0
        • M Martin Koorts

          Hi It might be in the CDialog::m_lpszTemplateName parameter. HTH Martin

          N Offline
          N Offline
          nutkase
          wrote on last edited by
          #4

          Hi, i have checked the m_lpszTemplateName parameter but its value is NULL..... anything else..??? please:confused:

          M 1 Reply Last reply
          0
          • T toxcct

            you will have it under A::IDD


            TOXCCT >>> GEII power
            [toxcct][VisualCalc]

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

            well as i told earlier... i have this class manually defined and not defined against a dialog resource.... the member A::IDD you mentioned is defined by the new dlg wizard and is not present in case of CCustomDialogs more specifically CFontDialog ... so if you have anything else in mind. please update me.. thankx for the time and consideration. lid

            T 1 Reply Last reply
            0
            • N nutkase

              Hi, i have checked the m_lpszTemplateName parameter but its value is NULL..... anything else..??? please:confused:

              M Offline
              M Offline
              Martin Koorts
              wrote on last edited by
              #6

              Hi What are you trying to do here? The Dialog Resource is only used to create the dialog and once the dialog is running it's not accessed again - the same principle (barring contrived cases) applies to any dialog created from a resource template. If you're trying to override the Font Dialog's default resource layout with your own, set the CFontDialog's m_cf.lpTemplateName data member to your adapted version of the standard Choose Font resource and work from there. Martin

              N 1 Reply Last reply
              0
              • M Martin Koorts

                Hi What are you trying to do here? The Dialog Resource is only used to create the dialog and once the dialog is running it's not accessed again - the same principle (barring contrived cases) applies to any dialog created from a resource template. If you're trying to override the Font Dialog's default resource layout with your own, set the CFontDialog's m_cf.lpTemplateName data member to your adapted version of the standard Choose Font resource and work from there. Martin

                N Offline
                N Offline
                nutkase
                wrote on last edited by
                #7

                Hi, This is almost exactly what i m trying to do over here... i have added my custom controls to the standard font dialog....? the problem is that when the windows DPI is changed to 120 some of the controls starts overlapping or the text is just bigger than the size of the control....i have found a code on code project which when provided the ID of the dialog makes all the controls of the dialog bigger according to the current DPI. So, i was hoping to get the resource of the dialog somewho and pass it to the code downloaded from code project..... BTW if the idea is silly :) and is not workable... do tell me ...so i could search for some other solution. lid

                1 Reply Last reply
                0
                • N nutkase

                  well as i told earlier... i have this class manually defined and not defined against a dialog resource.... the member A::IDD you mentioned is defined by the new dlg wizard and is not present in case of CCustomDialogs more specifically CFontDialog ... so if you have anything else in mind. please update me.. thankx for the time and consideration. lid

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #8

                  otherwise, you can have the hWnd pointer with :

                  CFontDialog fontDlg(/* Some initialisation */);
                  CWnd pWnd = fontDlg->m_hWnd;


                  TOXCCT >>> GEII power
                  [toxcct][VisualCalc]

                  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