GetCursorPos(&pt);
SetForegroundWindow(g_hwndLogFrame);
TrackPopupMenu(hmenu, TPM_LEFTALIGN | TPM_TOPALIGN, pt.x, pt.y, 0, g_hwndLogFrame, NULL);
GetCursorPos(&pt);
SetForegroundWindow(g_hwndLogFrame);
TrackPopupMenu(hmenu, TPM_LEFTALIGN | TPM_TOPALIGN, pt.x, pt.y, 0, g_hwndLogFrame, NULL);