Podcast
Questions and Answers
Windows программаларының ресурс мақсаты неде?
Windows программаларының ресурс мақсаты неде?
Ресурстар - бағдарламаның орындалу модулінде жазылған бинарлық деректер.
Ресурстарды жаңарту үшін қандай функциялар пайдаланылады?
Ресурстарды жаңарту үшін қандай функциялар пайдаланылады?
BeginUpdateResource, UpdateResource және EndUpdateResource функциялары пайдаланылады.
Курсор мен меню ресурстары арасындағы негізгі айырмашылық неде?
Курсор мен меню ресурстары арасындағы негізгі айырмашылық неде?
Курсор - экранда курсор ретінде көрсетілетін ресурс, ал меню - қолданушыларға мәзір опцияларын ұсынатын ресурс.
RCData ресурсының мақсаты қандай?
RCData ресурсының мақсаты қандай?
Dialog Box ресурсының жүктелуі қалай жүзеге асырылады?
Dialog Box ресурсының жүктелуі қалай жүзеге асырылады?
Ресурстың идентификаторы қалай көрінеді?
Ресурстың идентификаторы қалай көрінеді?
Функция, ресурсты табу үшін қолданылатын, қалай аталады?
Функция, ресурсты табу үшін қолданылатын, қалай аталады?
Бірнеше бағдарламаның ресурстарды бөлісуі қандай артықшылық береді?
Бірнеше бағдарламаның ресурстарды бөлісуі қандай артықшылық береді?
Ресурстарды жою үшін қандай параметр қолданылуы мүмкін?
Ресурстарды жою үшін қандай параметр қолданылуы мүмкін?
Ресурс түрлерінің қандай стандартты түрлері бар?
Ресурс түрлерінің қандай стандартты түрлері бар?
Flashcards
Windows program resources
Windows program resources
Binary data embedded in an application's executable file, used for graphical elements, menus, and more.
Resource types
Resource types
Different kinds of resources like cursors, bitmaps, icons, and menus, each serving a specific purpose.
Resource file
Resource file
Files (.rc) containing descriptions of resources, seperate from code and data.
Resource updating function
Resource updating function
Signup and view all the flashcards
BeginUpdateResource
BeginUpdateResource
Signup and view all the flashcards
UpdateResource
UpdateResource
Signup and view all the flashcards
EndUpdateResource
EndUpdateResource
Signup and view all the flashcards
Resource loading function
Resource loading function
Signup and view all the flashcards
FindResourceEx
FindResourceEx
Signup and view all the flashcards
Executable file
Executable file
Signup and view all the flashcards
Study Notes
Windows Program Resources
- Windows program resources are binary data embedded in executable modules.
- Standard resource types include: cursors, bitmaps, icons, menus, dialog boxes, string tables, message tables, fonts, accelerator tables, version information, Plug and Play resources, VXD resources, HTML resources, manifest files, and RCData (raw binary data).
- Dialog boxes are loaded from resources and executed by a single function in single-threaded applications.
- Programmers can create custom resource types.
- Resources are separate from code and data and can be shared across multiple programs.
- Resources can be identified by a number (0 to 65536) or a string within a
.exe
file. - Resources are defined using a resource description language (RC language) in
.rc
files. These are compiled into the.exe
file.
Resource Management Functions
- Updating resources:
BeginUpdateResource(LPCTSTR pFileName, bool bDeleteExistingResources)
: Starts resource update process; returns a handle to use in subsequent operations.bDeleteExistingResources
specifies whether existing resources should be removed before updating.UpdateResource(HANDLE hUpdate, LPCTSTR lpType, LPCTSTR lpName, WORD wLanguage, void* lpData, DWORD cbData)
: Adds, removes, or replaces a resource. Called multiple times between BeginUpdateResource and EndUpdateResource.EndUpdateResource(HANDLE hUpdate, bool fDiscard)
: Finishes resource updating; iffDiscard
is true, resource updates are cancelled.
Loading Resources
- Locating resources:
FindResourceEx(HMODULE hModule, LPCTSTR lpType, LPCTSTR lpName, WORD wLanguage)
: Locates a resource with given type, name, and language in a specified module. Related functions includeFindResource
.
- Loading resources into memory:
LoadResource(HMODULE hModule, HRSRC hResInfo)
: Loads specified resource into global memory; related loading functions includeLoadImage
,LoadMenu
, etc.
- Getting resource size:
SizeofResource(HMODULE hModule, HRSRC hResInfo)
: Gets the size of a loaded resource in memory.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.