/*首先程序级别要达到1级或0级*/<br>#define IDM_ABOUT 1<br><br>LRESULT CALLBACK WndProc1(HWND, UINT, WPARAM, LPARAM);<br>LRESULT (CALLBACK* oldProc)(HWND, UINT, WPARAM, LPARAM);<br><br>void __fastcall TForm1::Button1Click(TObject *Sender)<br>{<br> HWND dt;<br> dt = GetDesktopWindow();<br> oldProc = (WNDPROC)SetWindowLong(dt, GWL_WNDPROC, (LONG)WndProc1);<br>}<br><br>LRESULT CALLBACK WndProc1(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)<br>{<br> static HMENU hMenu;<br> switch (msg)<br> {<br> case WM_INITMENUPOPUP:<br> hMenu = (HMENU)wParam;<br> AppendMenu(hMenu, MF_STRING, IDM_ABOUT, "About...")<br> break;<br> }<br> return CallWindowProc((FARPROC)oldProc, hWnd, msg, wParam, lParam);<br>}<br>