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. How to use EnumSystemLanguageGroups

How to use EnumSystemLanguageGroups

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonhelptutorialquestion
8 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.
  • H Offline
    H Offline
    Hachaso
    wrote on last edited by
    #1

    Hi! I'm having trouble using this API callback function, EnumSystemLanguageGroups. When I compile I get this error message: c:\Documents and Settings\bsosla\Desktop\Regional Settings Plugin\Regional Settings\Regional Settings\regionalSettingsPlugin.cpp(457): error C3861: 'EnumSystemLanguageGroups': identifier not found, even with argument-dependent lookup Reading a little about this callback function I see that I have to include winnls.h and windows.h, adding the library kernel32.lib. All this is done but without any results. What am I doing wrong? Thanks!

    D 1 Reply Last reply
    0
    • H Hachaso

      Hi! I'm having trouble using this API callback function, EnumSystemLanguageGroups. When I compile I get this error message: c:\Documents and Settings\bsosla\Desktop\Regional Settings Plugin\Regional Settings\Regional Settings\regionalSettingsPlugin.cpp(457): error C3861: 'EnumSystemLanguageGroups': identifier not found, even with argument-dependent lookup Reading a little about this callback function I see that I have to include winnls.h and windows.h, adding the library kernel32.lib. All this is done but without any results. What am I doing wrong? Thanks!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Hachaso wrote: ...error C3861: 'EnumSystemLanguageGroups': identifier not found, even with argument-dependent lookup This is not a Visual Studio v6 error. Are you using Visual Studio v7.x instead? Have you seen this? Hachaso wrote: Reading a little about this callback function I see that I have to include winnls.h and windows.h... Actually, only winnls.h is required. You get that one by default if you are already including windows.h.


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      H 1 Reply Last reply
      0
      • D David Crow

        Hachaso wrote: ...error C3861: 'EnumSystemLanguageGroups': identifier not found, even with argument-dependent lookup This is not a Visual Studio v6 error. Are you using Visual Studio v7.x instead? Have you seen this? Hachaso wrote: Reading a little about this callback function I see that I have to include winnls.h and windows.h... Actually, only winnls.h is required. You get that one by default if you are already including windows.h.


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        H Offline
        H Offline
        Hachaso
        wrote on last edited by
        #3

        Hi! Thanks for helping me! I'm using Visual Studio .NET 2003. I guess that its version 7. Do you think that the problem can be related to what kind of project I've started? When I create a Win32 project, letting the Wizard create the base code, then add my lines I get no compile error. But adding the same lines to another existing project returns an error. This is why I'm wondering if it has to do with what kind of project I start? Thanks!

        D 1 Reply Last reply
        0
        • H Hachaso

          Hi! Thanks for helping me! I'm using Visual Studio .NET 2003. I guess that its version 7. Do you think that the problem can be related to what kind of project I've started? When I create a Win32 project, letting the Wizard create the base code, then add my lines I get no compile error. But adding the same lines to another existing project returns an error. This is why I'm wondering if it has to do with what kind of project I start? Thanks!

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          At this point, I would compare the project settings of the one that works with the one that doesn't work.


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          H 1 Reply Last reply
          0
          • D David Crow

            At this point, I would compare the project settings of the one that works with the one that doesn't work.


            "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

            H Offline
            H Offline
            Hachaso
            wrote on last edited by
            #5

            Hi Again! Thank you once more for helping me out. I've compared and can't find any difference that would solve the problem. I've looked at the weblink you gave me. That's the page that I've been looking at all the time. My problem is that they explain what the function does and what the different parameters do but they don't give you any example code. For example, BOOL EnumSystemLanguageGroups( LANGUAGEGROUP_ENUMPROC pLangGroupEnumProc, // callback function DWORD dwFlags, // language groups LONG_PTR lParam // callback parameter ); LANGUAGEGROUP_ENUMPROC is retrieved from another function called EnumLanguageGroupsProc. When I try, using the headerfiles needed and kernel32.lib I come to the conclusion that It may not exist anymore. Cause it doesn't recognize it. Could you maybe help med with some example how to implement the different parameters, so that I can understand what I'm doing wrong. Thanks!

            D 1 Reply Last reply
            0
            • H Hachaso

              Hi Again! Thank you once more for helping me out. I've compared and can't find any difference that would solve the problem. I've looked at the weblink you gave me. That's the page that I've been looking at all the time. My problem is that they explain what the function does and what the different parameters do but they don't give you any example code. For example, BOOL EnumSystemLanguageGroups( LANGUAGEGROUP_ENUMPROC pLangGroupEnumProc, // callback function DWORD dwFlags, // language groups LONG_PTR lParam // callback parameter ); LANGUAGEGROUP_ENUMPROC is retrieved from another function called EnumLanguageGroupsProc. When I try, using the headerfiles needed and kernel32.lib I come to the conclusion that It may not exist anymore. Cause it doesn't recognize it. Could you maybe help med with some example how to implement the different parameters, so that I can understand what I'm doing wrong. Thanks!

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Hachaso wrote: I've compared and can't find any difference that would solve the problem. I provided you two different links. They are completely different. Hachaso wrote: LANGUAGEGROUP_ENUMPROC is retrieved from another function called EnumLanguageGroupsProc. Huh? LANGUAGEGROUP_ENUMPROC is a typedef from winnls.h. Hachaso wrote: Could you maybe help med with some example how to implement the different parameters, so that I can understand what I'm doing wrong.

              BOOL CALLBACK EnumProc(
              LGRPID LanguageGroup,
              LPTSTR lpLanguageGroupString,
              LPTSTR lpLanguageGroupNameString,
              DWORD dwFlags,
              LONG_PTR lParam
              )
              {
              return TRUE;
              }
              ...
              EnumSystemLanguageGroups(EnumProc, LGRPID_INSTALLED, 0);


              "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

              H 1 Reply Last reply
              0
              • D David Crow

                Hachaso wrote: I've compared and can't find any difference that would solve the problem. I provided you two different links. They are completely different. Hachaso wrote: LANGUAGEGROUP_ENUMPROC is retrieved from another function called EnumLanguageGroupsProc. Huh? LANGUAGEGROUP_ENUMPROC is a typedef from winnls.h. Hachaso wrote: Could you maybe help med with some example how to implement the different parameters, so that I can understand what I'm doing wrong.

                BOOL CALLBACK EnumProc(
                LGRPID LanguageGroup,
                LPTSTR lpLanguageGroupString,
                LPTSTR lpLanguageGroupNameString,
                DWORD dwFlags,
                LONG_PTR lParam
                )
                {
                return TRUE;
                }
                ...
                EnumSystemLanguageGroups(EnumProc, LGRPID_INSTALLED, 0);


                "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

                H Offline
                H Offline
                Hachaso
                wrote on last edited by
                #7

                Hi! Hope I'm not to much trouble. I'm kind of new to this so thanks for all the help. DavidCrow wrote: Huh? LANGUAGEGROUP_ENUMPROC is a typedef from winnls.h. I hope I understand this right: How do I use this typedef? LANGUAGEGROUP_ENUMPROC EnumProc; (like this ??) Then declare the callback function: BOOL CALLBACK EnumProc( LGRPID LanguageGroup, LPTSTR lpLanguageGroupString, LPTSTR lpLanguageGroupNameString, DWORD dwFlags, LONG_PTR lParam ) { return TRUE; } Then send this to EnumSystemLanguageGroups: EnumSystemLanguageGroups(EnumProc, LGRPID_INSTALLED, 0); Is this how it is supposed to be used?? I read a remark in the page link you gave me; This function can carry out any desired task. An application registers an EnumLanguageGroupsProc function by passing its address to the EnumSystemLanguageGroups function. I'm really new to all this, so please explain in details. Thanks!

                D 1 Reply Last reply
                0
                • H Hachaso

                  Hi! Hope I'm not to much trouble. I'm kind of new to this so thanks for all the help. DavidCrow wrote: Huh? LANGUAGEGROUP_ENUMPROC is a typedef from winnls.h. I hope I understand this right: How do I use this typedef? LANGUAGEGROUP_ENUMPROC EnumProc; (like this ??) Then declare the callback function: BOOL CALLBACK EnumProc( LGRPID LanguageGroup, LPTSTR lpLanguageGroupString, LPTSTR lpLanguageGroupNameString, DWORD dwFlags, LONG_PTR lParam ) { return TRUE; } Then send this to EnumSystemLanguageGroups: EnumSystemLanguageGroups(EnumProc, LGRPID_INSTALLED, 0); Is this how it is supposed to be used?? I read a remark in the page link you gave me; This function can carry out any desired task. An application registers an EnumLanguageGroupsProc function by passing its address to the EnumSystemLanguageGroups function. I'm really new to all this, so please explain in details. Thanks!

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  Hachaso wrote: How do I use this typedef? LANGUAGEGROUP_ENUMPROC EnumProc; (like this ??) Not necessary. Hachaso wrote: Is this how it is supposed to be used?? Yes, just like the code snippet I provided.


                  "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

                  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