Ok cercherò di spiegare meglio
Riguardo al menu? Idee?
codice:
HMENU Menu;
HWND fakedialog;
MSG Msg;
INT_PTR CALLBACK DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_USER + 1100)
if (lParam == WM_RBUTTONDOWN)
{
SetForegroundWindow(fakedialog);
TrackPopupMenuEx(Menu,TPM_RIGHTALIGN,800,600,fakedialog,NULL);
}
return 0;
}
int __stdcall WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
{
//Varie dichiarazioni e inizializzazioni
Menu = LoadMenu(hInstance,MAKEINTRESOURCE(ID_MENU));
fakedialog = CreateDialogParam(hInstance,MAKEINTRESOURCE(FAKE_DIALOG),GetDesktopWindow(),DialogProc,NULL);
Shell_NotifyIcon(NIM_ADD,&ref);
while (true)
{
//Codice codice codice codice codice
PeekMessage(&Msg,NULL,0,0,0);
IsDialogMessage(fakedialog,&Msg);
} //while infinito.
IPageDownloader::Delete(t);
return 0;
}
Lasciate stare se non ritorno i valori di ritorno, per ora è solo una prova.
Come va sostituito?