C语言中嵌入汇编代码实现弹出对话框

文章作者 100test 发表时间 2008:03:31 11:51:34
来源 100Test.Com百考试题网


由于实际需要在C语言中嵌入汇编代码实现弹出对话框:
#include
#include
char format[] = "%s %s\n".
char hello[] = "Hello".
char world[] = "world".
HWND hwnd.
void main( void )
{
__asm
{
//push NULL
//call dword ptr GetModuleHandle
//mov hwnd,eax
push MB_OK
mov eax, offset world
push eax
mov eax, offset hello
push eax
push 0//说明此处不能将前面注释掉代码处得到的hwnd压栈,否则对话框弹不出来。
call dword ptr MessageBox
}
}

相关文章


VC下Debug和Release区别
C语言中嵌入汇编代码实现弹出对话框
无线技术应用无线网桥技术在室外的应用
万瑞布线网调查:布线行业出现人才荒
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛