Home > Software engineering >  FindResource problem
FindResource problem

Time:10-06

HRSRC hRes=FindResource (GetModuleHandle (0), MAKEINTRESOURCE (VS_VERSION_INFO), RT_VERSION);
//normal return
HRSRC hRess=FindResource (GetModuleHandle (0), MAKEINTRESOURCE (IDR_APPJS1), _T (" TXT "));
Insert resource//own text returns NULL

Don't know what's the problem

CodePudding user response:

Type case type are consistent with your resources? _T (" TXT ")?

CodePudding user response:

GetLastError see what error code is first

CodePudding user response:

My intuition to analyze your this HRSRC hRess=FindResource (GetModuleHandle (0), MAKEINTRESOURCE (IDR_APPJS1), _T (" TXT "));

First, by default, the VC support Dialog, Bitmap, Icon, HTML, such as VERSION resource types, such as:

And the function of the last parameter, it is more than the value of a string representation of the resource type, defined in Winuser. J h, such as:


of course, also can customize the resource type, but first you have to in the rc file defines a custom type out , for example, I here for example is the "CONFIG"


And then to add/import resource file:


Finally checked. Rc files, the resource. A resource ID, sources in the h file binding relationship correctly


Validation:
HRSRC hRes=FindResource (GetModuleHandle (0), MAKEINTRESOURCE (IDR_CONFIG_URL), _T (" CONFIG "));

CodePudding user response:

Said along while, which means FindResource last parameter is the existing resource type in your project, rather than the resource bundle file suffix

Don't know your HRSRC hRess=FindResource (GetModuleHandle (0), MAKEINTRESOURCE (IDR_APPJS1), _T (" TXT ")); In the last parameter represents the what?

CodePudding user response:

Top 7, 8 floor!

CodePudding user response:

Wrong, it is 3, 4 floor,

CodePudding user response:

refer to 6th floor zhao4zhong1 response:
wrong, is building 3, 4,

Don't come for a long time, I don't know zhao old wet also lectures?

CodePudding user response:

refer to 7th floor lsq19871207 response:
Quote: refer to the sixth floor zhao4zhong1 response:

Wrong, it is 3, 4 floor,

Don't come for a long time, I don't know zhao old wet also lectures?

Has spoken:
http://edu.csdn.net/course/detail/2344 C language pointer and assembly - a memory address. The code element
http://edu.csdn.net/course/detail/2455 C language pointer and assembly memory address - 2. Function
http://edu.csdn.net/course/detail/2516 C language pointer and assembly memory address - three. Array and two-dimensional array
http://edu.csdn.net/course/detail/2517 C language pointer and assembly memory address - four. Three dimensional array
Unable to continue to speak:
C language pointer and assembly memory address - five. Lead the singly linked list of nodes
C language pointer and assembly memory address - six. The headless singly linked list of nodes
C language pointer and assembly memory address - seven. Two-way linked list
C language pointer and assembly memory address - eight. Circulation two-way linked list
C language pointer and assembly memory address - nine. Curb table (on)
C language pointer and assembly memory address - ten. Curb table (below)

Do you still want to continue to the back of the class?
Suggestions for CSDN petition to the person responsible for public class

CodePudding user response:

Or in the http://bbs.csdn.net/topics/391971215 petition,

CodePudding user response:

refer to the eighth floor zhao4zhong1 response:
Quote: refer to 7th floor lsq19871207 response:

Quote: refer to the sixth floor zhao4zhong1 response:

Wrong, it is 3, 4 floor,

Don't come for a long time, I don't know zhao old wet also lectures?

Has spoken:
http://edu.csdn.net/course/detail/2344 C language pointer and assembly - a memory address. The code element
http://edu.csdn.net/course/detail/2455 C language pointer and assembly memory address - 2. Function
http://edu.csdn.net/course/detail/2516 C language pointer and assembly memory address - three. Array and two-dimensional array
http://edu.csdn.net/course/detail/2517 C language pointer and assembly memory address - four. Three dimensional array
Unable to continue to speak:
C language pointer and assembly memory address - five. Lead the singly linked list of nodes
C language pointer and assembly memory address - six. The headless singly linked list of nodes
C language pointer and assembly memory address - seven. Two-way linked list
C language pointer and assembly memory address - eight. Circulation two-way linked list
C language pointer and assembly memory address - nine. Curb table (on)
C language pointer and assembly memory address - ten. Curb table (below)

Do you still want to continue to the back of the class?
Suggestions for CSDN petition to the person responsible for public class

Good thing of course. Just too busy recently,,,

CodePudding user response:

refer to the eighth floor zhao4zhong1 response:
Quote: refer to 7th floor lsq19871207 response:

Quote: refer to the sixth floor zhao4zhong1 response:

Wrong, it is 3, 4 floor,

Don't come for a long time, I don't know zhao old wet also lectures?

Has spoken:
http://edu.csdn.net/course/detail/2344 C language pointer and assembly - a memory address. The code element
http://edu.csdn.net/course/detail/2455 C language pointer and assembly memory address - 2. Function
http://edu.csdn.net/course/detail/2516 C language pointer and assembly memory address - three. Array and two-dimensional array
http://edu.csdn.net/course/detail/2517 C language pointer and assembly memory address - four. Three dimensional array
Unable to continue to speak:
C language pointer and assembly memory address - five. Lead the singly linked list of nodes
C language pointer and assembly memory address - six. The headless singly linked list of nodes
C language pointer and assembly memory address - seven. Two-way linked list
C language pointer and assembly memory address - eight. Circulation two-way linked list
C language pointer and assembly memory address - nine. Curb table (on)
C language pointer and assembly memory address - ten. Curb table (below)

Do you still want to continue to the back of the class?
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related