Pages: [1]
|
 |
|
Author
|
Topic: MAKEINTRESOURCE (Read 7130 times)
|
six_L
The Poor English and ASM
Member
    
Posts: 311
see you, see me, see you...
|
MAKEINTRESOURCE
This macro converts an integer value to a resource type compatible with Windows resource-management functions. This macro is used in place of a string containing the name of the resource.
LPTSTR MAKEINTRESOURCE( WORD wInteger; );
Parameters
wInteger Specifies the integer value to be converted.
Return Values
The return value is the specified value in the low-order word and zero in the high-order word. Remarks
The return value should be passed only to the Microsoft® Win32® resource-management functions, as the lpType parameter.
The MAKEINTRESOURCE macro is defined as follows.
#define MAKEINTRESOURCE(i) (LPTSTR) ((DWORD) ((WORD) (i))) how do translate the macros into asm?
|
|
|
Logged
|
regards
|
|
|
u
Not a
Member
    
Posts: 527
dog eat dog xenophobic forum
|
In the end, it's all a DWORD  That C++ definition is just to trick the C++ compiler. The OS will recognize if the passed parameter is an ID or a string simply by checking if the value is >65535. In the OS, it's basically forbidden to have memory, allocated in the first virtual 64kB (and quite a bit more). So, any pointer will be >>65535.
|
|
|
Logged
|
Please use a smaller graphic in your signature.
|
|
|
six_L
The Poor English and ASM
Member
    
Posts: 311
see you, see me, see you...
|
thanks you.
|
|
|
Logged
|
regards
|
|
|
bomz
|
and how convert IDI_ICONATERISK to MAKEINTRESOURCE(IDI_ICONASTERISK) ? STRING db 4 dup (?) mov dword ptr [STRING+3], IDI_ICONASTERISK How Use here resourses from system32\shell32.dll? ImageFile db 'my.bmp',0
invoke CreatePopupMenu mov hPopupMenu,eax invoke LoadImage,0,addr ImageFile,IMAGE_BITMAP,120,120,LR_LOADFROMFILE mov bytesWrite, eax invoke AppendMenu,hPopupMenu,MF_BITMAP,IDM_EXIT,bytesWrite
|
|
« Last Edit: May 02, 2011, 11:19:28 AM by bomz »
|
Logged
|
|
|
|
|
Pages: [1]
|
|
|
 |