Click here to Skip to main content
15,889,651 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionusing boost::bind cause error prj0002 Pin
fley_fly17-Sep-09 19:58
fley_fly17-Sep-09 19:58 
AnswerRe: using boost::bind cause error prj0002 Pin
Stuart Dootson17-Sep-09 20:50
professionalStuart Dootson17-Sep-09 20:50 
QuestionOutlook Automation Pin
john563217-Sep-09 19:29
john563217-Sep-09 19:29 
QuestionWM_LBUTTONUP does not trigger, please help Pin
Isuru_Perera17-Sep-09 19:27
Isuru_Perera17-Sep-09 19:27 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Code-o-mat17-Sep-09 20:36
Code-o-mat17-Sep-09 20:36 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Romualdas Cukuras17-Sep-09 20:36
Romualdas Cukuras17-Sep-09 20:36 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Isuru_Perera17-Sep-09 22:15
Isuru_Perera17-Sep-09 22:15 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
Iain Clarke, Warrior Programmer17-Sep-09 23:10
Iain Clarke, Warrior Programmer17-Sep-09 23:10 
The mouse up message does happen - you can check this with Spy++.

But the window moving stuff happens in response to the WM_NCLBUTTONDOWN message you've manually sent. That starts a message loop looking for mouse messages that is not the MFC message loops. It moves the window until you let go of the mouse, or press escape.

If you want your window to be movable with the mouse, a far more elegant way of doing it is responding to the WM_NCHITTEST message.

class CMyMovableDialog : public CDialog
{
...
afx_msg LRESULT OnNcHitTest(CPoint point);
...
};
...
ON_WM_NCHITTEST()
...
LRESULT CMyMovableDialog::OnNcHitTest(CPoint point)
{
   return HTCAPTION;  // make it think everywhere is a caption!
}


I hope that helps,

Iain.

I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]

GeneralRe: WM_LBUTTONUP does not trigger, please help Pin
Isuru_Perera18-Sep-09 1:42
Isuru_Perera18-Sep-09 1:42 
GeneralRe: WM_LBUTTONUP does not trigger, please help Pin
Iain Clarke, Warrior Programmer18-Sep-09 4:22
Iain Clarke, Warrior Programmer18-Sep-09 4:22 
AnswerRe: WM_LBUTTONUP does not trigger, please help Pin
ouly23-Sep-09 17:55
ouly23-Sep-09 17:55 
QuestionHow to visually click the radio button in propertypage. [modified] Pin
DevelopmentNoob17-Sep-09 15:24
DevelopmentNoob17-Sep-09 15:24 
AnswerRe: How to visually click the radio button in propertypage. Pin
David Crow17-Sep-09 16:40
David Crow17-Sep-09 16:40 
GeneralRe: How to visually click the radio button in propertypage. Pin
DevelopmentNoob17-Sep-09 16:53
DevelopmentNoob17-Sep-09 16:53 
AnswerRe: How to visually click the radio button in propertypage. Pin
vasu_sri17-Sep-09 19:23
vasu_sri17-Sep-09 19:23 
GeneralRe: How to visually click the radio button in propertypage. Pin
vasu_sri17-Sep-09 19:27
vasu_sri17-Sep-09 19:27 
QuestionMS09-035 Zero Day bug Pin
fredsparkle17-Sep-09 11:29
fredsparkle17-Sep-09 11:29 
AnswerRe: MS09-035 Zero Day bug Pin
Randor 17-Sep-09 12:33
professional Randor 17-Sep-09 12:33 
AnswerRe: MS09-035 Zero Day bug Pin
Joe Woodbury17-Sep-09 17:39
professionalJoe Woodbury17-Sep-09 17:39 
QuestionRFC 868 [solved] Pin
David Crow17-Sep-09 10:38
David Crow17-Sep-09 10:38 
AnswerRe: RFC 868 Pin
CPallini17-Sep-09 10:57
mveCPallini17-Sep-09 10:57 
GeneralRe: RFC 868 Pin
David Crow17-Sep-09 11:01
David Crow17-Sep-09 11:01 
GeneralRe: RFC 868 Pin
CPallini17-Sep-09 11:04
mveCPallini17-Sep-09 11:04 
GeneralRe: RFC 868 Pin
David Crow17-Sep-09 16:31
David Crow17-Sep-09 16:31 
GeneralRe: RFC 868 Pin
CPallini17-Sep-09 20:38
mveCPallini17-Sep-09 20:38 

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.