Есть функция
Код | void OnRButtonDowm(HWND hWnd,BOOL,int x,int y,UINT) { char str1[] = "Fon: Blue"; char str2[] = "Fon: Blue"; char str3[] = "Exit";
RECT rect; HMENU hPopupMenu = CreatePopupMenu(); AppendMenu(hPopupMenu,MF_STRING,MI_BLUE,str1); AppendMenu(hPopupMenu,MF_STRING,MI_GREEN,str2); AppendMenu(hPopupMenu,MF_SEPARATOR,0,NULL); AppendMenu(hPopupMenu,MF_STRING,MI_EXIT,str3); GetWindowRect(hWnd,&rect); TrackPopupMenu(hPopupMenu,TPM_LEFTALIGN | TPM_LEFTBUTTON,MSG.pt.x,MSG.pt.y,0,hWnd,NULL); }
|
которая создает плавающее меню.... так вот..... она материться при получении координати мишки((, тоесть вот ето: "MSG.pt.x,MSG.pt.y" не понимаю почему.. может ви мне подскажете ??? З.Ы. Вот ошибки:
Код | --------------------Configuration: Win23 - Win32 Debug-------------------- Compiling resources... Compiling... Wins.cpp d:\programmer\!!! projects !!!\visual c++\win32 - 2\wins.cpp(115) : error C2275: 'MSG' : illegal use of this type as an expression d:\programmer\programs\vc98\include\winuser.h(1236) : see declaration of 'MSG' d:\programmer\!!! projects !!!\visual c++\win32 - 2\wins.cpp(115) : error C2228: left of '.x' must have class/struct/union type d:\programmer\!!! projects !!!\visual c++\win32 - 2\wins.cpp(115) : error C2275: 'MSG' : illegal use of this type as an expression d:\programmer\programs\vc98\include\winuser.h(1236) : see declaration of 'MSG' d:\programmer\!!! projects !!!\visual c++\win32 - 2\wins.cpp(115) : error C2228: left of '.y' must have class/struct/union type Error executing cl.exe.
Win23.exe - 4 error(s), 0 warning(s)
|
|