Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: interface in background Pin
Johpoke13-Nov-06 8:52
Johpoke13-Nov-06 8:52 
GeneralRe: interface in background Pin
Mike_V13-Nov-06 12:20
Mike_V13-Nov-06 12:20 
GeneralRe: interface in background Pin
Johpoke14-Nov-06 6:21
Johpoke14-Nov-06 6:21 
GeneralRe: interface in background Pin
Johpoke14-Nov-06 9:09
Johpoke14-Nov-06 9:09 
Questionhow to generate key for using in AES algo Pin
sharad puttar12-Nov-06 0:22
sharad puttar12-Nov-06 0:22 
AnswerRe: how to generate key for using in AES algo Pin
Mark Salsbery12-Nov-06 8:02
Mark Salsbery12-Nov-06 8:02 
QuestionDetecting mouse buttons Pin
Waldermort11-Nov-06 23:55
Waldermort11-Nov-06 23:55 
AnswerRe: Detecting mouse buttons Pin
Mike_V12-Nov-06 15:23
Mike_V12-Nov-06 15:23 
Every time I see the Sleep function in user-interface code I know there has to be a better way. You NEVER, except under most unusual circumstances, want to Sleep in a user-facing thread.

Kudos to you for using CallMsgFilter. Been reading Raymond Chen? Smile | :)

What I would suggest would be rewriting it: (pseudocode)

WM_LBUTTONDOWN:
    set a timer for 500ms

WM_LBUTTONUP:
    kill the timer

WM_TIMER:
    kill the timer
    post / send / call a OnMouseHold handler


Much simpler, no Sleep()s, and unless I missed something it should work.

Mike
QuestionWant help,please. Pin
toeh11-Nov-06 23:04
toeh11-Nov-06 23:04 
AnswerRe: Want help,please. Pin
Hamid_RT11-Nov-06 23:13
Hamid_RT11-Nov-06 23:13 
GeneralRe: Want help,please. Pin
toeh11-Nov-06 23:38
toeh11-Nov-06 23:38 
GeneralRe: Want help,please. Pin
Hamid_RT12-Nov-06 0:13
Hamid_RT12-Nov-06 0:13 
GeneralRe: Want help,please. Pin
toeh12-Nov-06 0:19
toeh12-Nov-06 0:19 
GeneralRe: Want help,please. Pin
Hamid_RT12-Nov-06 0:49
Hamid_RT12-Nov-06 0:49 
GeneralRe: Want help,please. Pin
toeh12-Nov-06 0:55
toeh12-Nov-06 0:55 
GeneralRe: Want help,please. Pin
toeh12-Nov-06 1:30
toeh12-Nov-06 1:30 
GeneralRe: Want help,please. Pin
Waldermort12-Nov-06 2:24
Waldermort12-Nov-06 2:24 
AnswerRe: Want help,please. Pin
David Crow6-Dec-06 3:40
David Crow6-Dec-06 3:40 
QuestionGet titlebar height Pin
Toubou11-Nov-06 20:47
Toubou11-Nov-06 20:47 
AnswerRe: Get titlebar height Pin
Hadi Dayvary11-Nov-06 20:51
professionalHadi Dayvary11-Nov-06 20:51 
Questionfunction signature Pin
amaneet11-Nov-06 20:47
amaneet11-Nov-06 20:47 
AnswerRe: function signature Pin
Christian Graus11-Nov-06 20:53
protectorChristian Graus11-Nov-06 20:53 
AnswerRe: function signature Pin
Hamid_RT11-Nov-06 23:06
Hamid_RT11-Nov-06 23:06 
AnswerRe: function signature Pin
vijay_aroli12-Nov-06 23:46
vijay_aroli12-Nov-06 23:46 
QuestionRe: function signature Pin
David Crow13-Nov-06 3:40
David Crow13-Nov-06 3:40 

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.