LINUX.ORG.RU

История изменений

Исправление Forum0888, (текущая версия) :

А поиск окон кроссплатформенно ты не сделаешь, всё равно для винды код придётся отдельный писать

Это не сложно реализовать.
Всё «как обычно».
Создаёте кроссплатформенную функцию, которая в зависимости от ОС использует тот или иной код.

Для Windows у меня вот такой API.
Далее немного ссылок на API Windows.

EnumLangsProc.cpp
EnumNamesProc.cpp
EnumResourcesModule.cpp
EnumTypesProc.cpp
ExtractResource.cpp
GetInfoResource.cpp
LoadResourceMemory.cpp

EnumResLangProc callback function  https://msdn.microsoft.com/en-us/library/windows/desktop/ms648033(v=vs.85).aspx
                                                           An application-defined callback function used with the EnumResourceLanguages and EnumResourceLanguagesEx functions. 
                                                           It receives the type, name, and language of a resource item. 
                                                           The ENUMRESLANGPROC type defines a pointer to this callback function. 
                                                           EnumResLangProc is a placeholder for the application-defined function name.

EnumResNameProc callback function  https://msdn.microsoft.com/en-us/library/windows/desktop/ms648034(v=vs.85).aspx
                                                           An application-defined callback function used with the EnumResourceNames and EnumResourceNamesEx functions. It receives the type and name of a resource. 
                                                           The ENUMRESNAMEPROC type defines a Указатель  к this callback function. 
                                                           

Возникнут проблемы, помогу.

Исправление Forum0888, :

А поиск окон кроссплатформенно ты не сделаешь, всё равно для винды код придётся отдельный писать

Это не сложно реализовать.
Всё «как обычно».
Создаёте кроссплатформенную функцию, которая в зависимости от ОС использует тот или иной код.

Для Windows у меня вот такой API.
Далее немного ссылок на API Windows.

EnumLangsProc.cpp
EnumNamesProc.cpp
EnumResourcesModule.cpp
EnumTypesProc.cpp
ExtractResource.cpp
GetInfoResource.cpp
LoadResourceMemory.cpp

EnumResLangProc callback function  https://msdn.microsoft.com/en-us/library/windows/desktop/ms648033(v=vs.85).aspx
                                                           An application-defined callback function used with the EnumResourceLanguages and EnumResourceLanguagesEx functions. 
                                                           It receives the type, name, and language of a resource item. 
                                                           The ENUMRESLANGPROC type defines a pointer to this callback function. 
                                                           EnumResLangProc is a placeholder for the application-defined function name.

EnumResNameProc callback function  https://msdn.microsoft.com/en-us/library/windows/desktop/ms648034(v=vs.85).aspx
                                                           An application-defined callback function used with the EnumResourceNames and EnumResourceNamesEx functions. It receives the type and name of a resource. 
                                                           The ENUMRESNAMEPROC type defines a Указатель  к this callback function. 
                                                           EnumResTypeProc callback         https://msdn.microsoft.com/en-us/library/windows/desktop/ms648041(v=vs.85).aspx
                        function                         An application-defined callback function used with the EnumResourceTypes and EnumResourceTypesEx functions. It receives resource types. 


Возникнут проблемы, помогу.

Исправление Forum0888, :

А поиск окон кроссплатформенно ты не сделаешь, всё равно для винды код придётся отдельный писать

Это не сложно реализовать.
Всё «как обычно».
Создаёте кроссплатформенную функцию, которая в зависимости от ОС использует тот или иной код.

Для Windows у меня вот такой API.
Далее немного ссылок на API Windows.

EnumLangsProc.cpp
EnumNamesProc.cpp
EnumResourcesModule.cpp
EnumTypesProc.cpp
ExtractResource.cpp
GetInfoResource.cpp
LoadResourceMemory.cpp

EnumResLangProc callback function  https://msdn.microsoft.com/en-us/library/windows/desktop/ms648033(v=vs.85).aspx
                                                           An application-defined callback function used with the EnumResourceLanguages and EnumResourceLanguagesEx functions. 
                                                           It receives the type, name, and language of a resource item. 
                                                           The ENUMRESLANGPROC type defines a pointer to this callback function. 
                                                           EnumResLangProc is a placeholder for the application-defined function name.

EnumResNameProc callback function  https://msdn.microsoft.com/en-us/library/windows/desktop/ms648034(v=vs.85).aspx
                                                           An application-defined callback function used with the EnumResourceNames and EnumResourceNamesEx functions. It receives the type and name of a resource. 
                                                           The ENUMRESNAMEPROC type defines a Указатель  к this callback function. 
                                                           EnumResNameProc is a placeholder for the application-defined function name.

                        EnumResourceNames function         https://msdn.microsoft.com/en-us/library/windows/desktop/ms648037(v=vs.85).aspx
                                                           Enumerates resources of a specified type within a binary module.
                                                           For Windows Vista and later, this is typically a language-neutral Portable Executable (LN file), and the enumeration will also include resources from the corresponding 
                                                           language-specific resource files (.mui files) that contain localizable language resources. 
                                                           It is also possible for hModule to specify an .mui file, in which case only that file is searched for resources.

EnumResourceNamesEx function       https://msdn.microsoft.com/en-us/library/windows/desktop/ms648038(v=vs.85).aspx
                                                           Enumerates resources of a specified type that are associated with a specified binary module. 
                                                           The search can include both an LN file and its associated .mui files, or it can be limited in several ways.

EnumResTypeProc callback         https://msdn.microsoft.com/en-us/library/windows/desktop/ms648041(v=vs.85).aspx
                        function                         An application-defined callback function used with the EnumResourceTypes and EnumResourceTypesEx functions. It receives resource types. 

 Links                  Enumerating Resources            https://msdn.microsoft.com/en-us/library/windows/desktop/ms648005(v=vs.85).aspx
                                                         The Windows SDK provides resource enumeration functions that enable an application to obtain lists of resource types, names, and languages in a specified module.

EnumResourceTypes function       https://msdn.microsoft.com/en-us/library/windows/desktop/ms648039(v=vs.85).aspx
                                                         Enumerates resource types within a binary module.
                                                         Starting with Windows Vista, this is typically a language-neutral Portable Executable (LN file), and the enumeration also includes resources from one of the corresponding 
                                                         language-specific resource files (.mui files)—if one exists—that contain localizable language resources.
                                                         It is also possible to use hModule to specify a .mui file, in which case only that file is searched for resource types.

EnumResourceTypesEx function     https://msdn.microsoft.com/en-us/library/windows/desktop/ms648040(v=vs.85).aspx
                                                         Enumerates resource types associated with a specified binary module.
                                                         The search can include both a language-neutral Portable Executable file (LN file) and its associated .mui files. Alternately, it can be limited to a single binary module of 
                                                         any type, or to the .mui files associated with a single LN file. 
                                                         The search can also be limited to a single associated .mui file that contains resources for a specific language.

Возникнут проблемы, помогу.

Исходная версия Forum0888, :

А поиск окон кроссплатформенно ты не сделаешь, всё равно для винды код придётся отдельный писать

Это не сложно реализовать.
Всё «как обычно».
Создаёте кроссплатформенную функцию, которая в зависимости от ОС использует тот или иной код.