Click here to Skip to main content
15,845,744 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: User interface problem -- check a point is inside a polygon or not [modified] Pin
George_George1-Jun-06 23:32
George_George1-Jun-06 23:32 
Questionsorting vector that holds object Pin
voorugonda prashanth1-Jun-06 21:49
voorugonda prashanth1-Jun-06 21:49 
AnswerRe: sorting vector that holds object Pin
Stephen Hewitt1-Jun-06 22:13
Stephen Hewitt1-Jun-06 22:13 
AnswerRe: sorting vector that holds object [modified] Pin
Viorel.1-Jun-06 22:29
Viorel.1-Jun-06 22:29 
AnswerRe: sorting vector that holds object Pin
toxcct1-Jun-06 22:54
toxcct1-Jun-06 22:54 
QuestionHow to draw line graph without using MsExcel Pin
MikeRT1-Jun-06 21:39
MikeRT1-Jun-06 21:39 
AnswerRe: How to draw line graph without using MsExcel Pin
Cedric Moonen1-Jun-06 22:09
Cedric Moonen1-Jun-06 22:09 
QuestionIcon added to system trat but popup menu not disappear if I click somewhere else Pin
zahid_ash1-Jun-06 21:38
zahid_ash1-Jun-06 21:38 
I have dowloaded a code from codeproject that adds a icon in systemtray and also a popup menu appears when a right click is made on the icon, but the if I do not select any option fron popup menu and click on some where else this popup menu do not disappear, why it is happening.
How it can disappear if i do not select any option and click some else where it should disappear.

Code snipts are here :

in header file

afx_msg void OnTrayNotify(WPARAM wParam, LPARAM lParam);

in message map

ON_MESSAGE(WM_TRAY_MESSAGE ,OnTrayNotify)

Notify function defenition

afx_msg void CTrayMinDlg::OnTrayNotify(WPARAM wParam, LPARAM lParam)
{
UINT uID;
UINT uMsg;

uID = (UINT) wParam;
uMsg = (UINT) lParam;


if (uID != 1)
return;

CPoint pt;


switch (uMsg )
{

case WM_LBUTTONDOWN:
GetCursorPos(&pt);
ClientToScreen(&pt);
OnTrayLButtonDown(pt);
break;

case WM_RBUTTONDOWN:
case WM_CONTEXTMENU:
GetCursorPos(&pt);
OnTrayRButtonDown(pt);
break;

}
return;
}


void CTrayMinDlg::OnTrayLButtonDown(CPoint pt)
{
MessageBox("You have clicked Left mouse Button ");
}


void CTrayMinDlg::OnTrayRButtonDown(CPoint pt)
{
//m_menu is the member of CTrayMinDlg as CMenu m_menu;
m_menu.GetSubMenu(0)->TrackPopupMenu(TPM_BOTTOMALIGN|
TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
}




Regards.
AnswerRe: Icon added to system trat but popup menu not disappear if I click somewhere else Pin
Hamid_RT1-Jun-06 21:47
Hamid_RT1-Jun-06 21:47 
GeneralRe: used the same one but popup menu not disappear if I click on some other window Pin
zahid_ash1-Jun-06 21:54
zahid_ash1-Jun-06 21:54 
AnswerRe: Icon added to system trat but popup menu not disappear if I click somewhere else [modified] Pin
Viorel.1-Jun-06 22:52
Viorel.1-Jun-06 22:52 
Questionprogram executing error Pin
Y_Kaushik1-Jun-06 21:31
Y_Kaushik1-Jun-06 21:31 
AnswerRe: program executing error Pin
_AnsHUMAN_ 1-Jun-06 21:37
_AnsHUMAN_ 1-Jun-06 21:37 
AnswerRe: program executing error Pin
toxcct1-Jun-06 22:50
toxcct1-Jun-06 22:50 
QuestionFFMPEG(Libavcodec DLL)+VC++ Pin
RahulOP1-Jun-06 21:29
RahulOP1-Jun-06 21:29 
AnswerRe: FFMPEG(Libavcodec DLL)+VC++ Pin
Hamid_RT1-Jun-06 21:37
Hamid_RT1-Jun-06 21:37 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ Pin
RahulOP1-Jun-06 22:08
RahulOP1-Jun-06 22:08 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ Pin
Hamid_RT1-Jun-06 22:31
Hamid_RT1-Jun-06 22:31 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ [modified] Pin
RahulOP1-Jun-06 23:43
RahulOP1-Jun-06 23:43 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ [modified] Pin
Hamid_RT2-Jun-06 2:10
Hamid_RT2-Jun-06 2:10 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ [modified] Pin
RahulOP4-Jun-06 19:36
RahulOP4-Jun-06 19:36 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ Pin
Hamid_RT4-Jun-06 23:24
Hamid_RT4-Jun-06 23:24 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ Pin
RahulOP4-Jun-06 23:38
RahulOP4-Jun-06 23:38 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ Pin
Hamid_RT4-Jun-06 23:54
Hamid_RT4-Jun-06 23:54 
GeneralRe: FFMPEG(Libavcodec DLL)+VC++ Pin
RahulOP4-Jun-06 23:57
RahulOP4-Jun-06 23:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.