首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

帮忙纠个错,该怎么处理

2012-09-12 
帮忙纠个错buttonhwnd1CreateWindow(TEXT(button),TEXT(放大),WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,cx

帮忙纠个错
buttonhwnd1=CreateWindow(TEXT("button"),TEXT("放大"),WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,cxChar,cyChar*5,10*cxChar,7*cyChar/4,hwnd,IDC_BUTTON1,((LPCREATESTRUCT)lParam)->hInstance,NULL);

 buttonhwnd2=CreateWindow(TEXT("button"),TEXT("缩小"),WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,cxChar,cyChar*7,10*cxChar,7*cyChar/4,hwnd,IDC_BUTTON2,((LPCREATESTRUCT)lParam)->hInstance,NULL);




C:\Users\niu\Desktop\TestResource\test.cpp(83) : error C2664: 'CreateWindowExA' : cannot convert parameter 10 from 'const int' to 'struct HMENU__ *'
  Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\Users\niu\Desktop\TestResource\test.cpp(84) : error C2664: 'CreateWindowExA' : cannot convert parameter 10 from 'const int' to 'struct HMENU__ *'
  Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
执行 cl.exe 时出错.

test.obj - 1 error(s), 0 warning(s)


[解决办法]
很明显需要传递一个HMENU

热点排行