Click here to Skip to main content
15,915,501 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to add button on title bar Pin
baldha rakesh13-Mar-06 17:20
baldha rakesh13-Mar-06 17:20 
AnswerRe: how to add button on title bar Pin
Hamid_RT13-Mar-06 17:24
Hamid_RT13-Mar-06 17:24 
GeneralRe: how to add button on title bar Pin
baldha rakesh13-Mar-06 17:26
baldha rakesh13-Mar-06 17:26 
GeneralRe: how to add button on title bar Pin
baldha rakesh13-Mar-06 18:28
baldha rakesh13-Mar-06 18:28 
GeneralRe: how to add button on title bar Pin
Hamid_RT13-Mar-06 18:34
Hamid_RT13-Mar-06 18:34 
GeneralRe: how to add button on title bar Pin
baldha rakesh13-Mar-06 19:37
baldha rakesh13-Mar-06 19:37 
GeneralRe: how to add button on title bar Pin
Hamid_RT13-Mar-06 19:56
Hamid_RT13-Mar-06 19:56 
GeneralRe: how to add button on title bar Pin
baldha rakesh13-Mar-06 20:06
baldha rakesh13-Mar-06 20:06 
i am setting timer on mouse move function like that

void CShow_ImageDlg::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default

CRect rect; // Get the bounds of the control (just the client area)
GetClientRect(rect);
bool WasIn=false; // Check the mouse is inside the control
if(rect.PtInRect(point))
{
if(!WasIn)
{ // This is the OnMouseEnter area
KillTimer(1);
SetCapture();
}
else
SetWindowText("Moved Again"); // This else wouldn't normally be used.
WasIn=true;
}
else
{ //This is the OnMouseLeave area:


SetTimer(1,100,0);
ReleaseCapture();
WasIn=false;

}
//TrackMouseEvent( LPTRACKMOUSEEVENT lpEventTrack);

CDialog::OnMouseMove(nFlags, point);
}

when i stop timer then thses costom button functions properly but i have to use timer.

eg. for custom button function is that:

void CShow_ImageDlg::OnBnClickedClose(NMHDR * pNotifyStruct, LRESULT * result)
{
CPoint pt;
::GetCursorPos(&pt);
PostMessage(WM_SYSCOMMAND,SC_CLOSE,MAKEWORD(pt.x,pt.y));
}






Bankey Khandelwal
Software Engineer



GeneralRe: how to add button on title bar Pin
Hamid_RT13-Mar-06 20:28
Hamid_RT13-Mar-06 20:28 
GeneralRe: how to add button on title bar Pin
baldha rakesh13-Mar-06 21:06
baldha rakesh13-Mar-06 21:06 
GeneralRe: how to add button on title bar Pin
Hamid_RT13-Mar-06 21:17
Hamid_RT13-Mar-06 21:17 
GeneralRe: how to add button on title bar Pin
Hamid_RT13-Mar-06 21:28
Hamid_RT13-Mar-06 21:28 
QuestionWinZip LZW compression algorithm Pin
Aqueel13-Mar-06 17:08
Aqueel13-Mar-06 17:08 
AnswerRe: WinZip LZW compression algorithm Pin
kakan13-Mar-06 19:21
professionalkakan13-Mar-06 19:21 
GeneralRe: WinZip LZW compression algorithm Pin
Aqueel14-Mar-06 0:08
Aqueel14-Mar-06 0:08 
GeneralRe: WinZip LZW compression algorithm Pin
Gary R. Wheeler14-Mar-06 1:54
Gary R. Wheeler14-Mar-06 1:54 
QuestionRegarding Create bitmap Pin
himuskanhere13-Mar-06 16:55
himuskanhere13-Mar-06 16:55 
AnswerRe: Regarding Create bitmap Pin
Hamid_RT13-Mar-06 17:07
Hamid_RT13-Mar-06 17:07 
GeneralRe: Regarding Create bitmap Pin
himuskanhere13-Mar-06 19:19
himuskanhere13-Mar-06 19:19 
AnswerRe: Regarding Create bitmap Pin
Nibu babu thomas13-Mar-06 17:47
Nibu babu thomas13-Mar-06 17:47 
QuestionTerminating a process Pin
Fernando A. Gomez F.13-Mar-06 16:01
Fernando A. Gomez F.13-Mar-06 16:01 
AnswerRe: Terminating a process Pin
Naveen13-Mar-06 16:22
Naveen13-Mar-06 16:22 
AnswerRe: Terminating a process Pin
Nibu babu thomas13-Mar-06 16:24
Nibu babu thomas13-Mar-06 16:24 
GeneralRe: Terminating a process Pin
Stephen Hewitt13-Mar-06 16:37
Stephen Hewitt13-Mar-06 16:37 
GeneralRe: Terminating a process Pin
Naveen13-Mar-06 17:33
Naveen13-Mar-06 17:33 

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.