主题:[求助]向LRESULT这类参数是什么意思?
这是《windows程序书》中的第一个例子:
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);
return 0 ;
}
在书中的解释:
WINAPI标识符在WINDEF.H定义,语句如下:
#define WINAPI __stdcall
该语句指定了一个呼叫约定,包括如何生产机械码以在堆栈中放置函数呼叫的参数。许多Windows函数呼叫声明为WINAPI。
MSDN解释:
Use in place of FAR PASCAL in API declarations. If you are writing a DLL with exported API entry points, you can use this for your own APIs.
类似的回调函数CALLBACK也不太懂,不知道各位前辈能否解释下
#include <windows.h>
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0);
return 0 ;
}
在书中的解释:
WINAPI标识符在WINDEF.H定义,语句如下:
#define WINAPI __stdcall
该语句指定了一个呼叫约定,包括如何生产机械码以在堆栈中放置函数呼叫的参数。许多Windows函数呼叫声明为WINAPI。
MSDN解释:
Use in place of FAR PASCAL in API declarations. If you are writing a DLL with exported API entry points, you can use this for your own APIs.
类似的回调函数CALLBACK也不太懂,不知道各位前辈能否解释下