Click here to Skip to main content
15,916,693 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Open Text File into Hexadecimal Pin
l a u r e n15-Sep-02 0:58
l a u r e n15-Sep-02 0:58 
GeneralRe: Open Text File into Hexadecimal Pin
mzakarni15-Sep-02 2:39
mzakarni15-Sep-02 2:39 
GeneralLogical bug in program Pin
axa14-Sep-02 22:20
axa14-Sep-02 22:20 
GeneralRe: Logical bug in program Pin
Hans Ruck15-Sep-02 5:54
Hans Ruck15-Sep-02 5:54 
GeneralRe: Logical bug in program Pin
axa15-Sep-02 10:44
axa15-Sep-02 10:44 
QuestionCan't a message be peeked in a thread? Pin
Chen Jiadong14-Sep-02 22:04
Chen Jiadong14-Sep-02 22:04 
AnswerRe: Can't a message be peeked in a thread? Pin
Neville Franks14-Sep-02 22:52
Neville Franks14-Sep-02 22:52 
GeneralRe: Can't a message be peeked in a thread? Pin
Chen Jiadong15-Sep-02 1:55
Chen Jiadong15-Sep-02 1:55 
Thanks Franks.
The main purpose of doing this by this way is i want to wait another message comes in, just like:
unsigned long ThreadProc(LPVOID pvParam)
{
MSG msg;
SetTimer(...);
while(1)
{
if( PeekMessage(&msg, hWnd, WM_SOCKET_MESSAGE, WM_SOCKET_MESSAGE, PM_REMOVE)
{
// Receive the data from the socket
// ...
// if (it's the last part of the data)
// break;
// else
// Reset the timer
// bSuccess = TRUE;
}
if( PeekMessage(&msg, hWnd, WM_TIMER, WM_TIMER, PM_REMOVE)
{
// Time is up
bSuccess = FALSE;
break;
}
}
KillTimer(...);
if( bSuccess )
return nLengthOfTheDataReceive;
else
return -1; //Error
}
Do you have a better way of doing this?
GeneralRe: Can't a message be peeked in a thread? Pin
Neville Franks15-Sep-02 2:16
Neville Franks15-Sep-02 2:16 
GeneralRe: Can't a message be peeked in a thread? Pin
Chen Jiadong15-Sep-02 4:24
Chen Jiadong15-Sep-02 4:24 
QuestionHow to print > 1 copies faster? Pin
Hiusing14-Sep-02 17:22
Hiusing14-Sep-02 17:22 
AnswerRe: How to print > 1 copies faster? Pin
Mike Nordell16-Sep-02 0:37
Mike Nordell16-Sep-02 0:37 
GeneralSeparate COLORREF Pin
Steve L.14-Sep-02 13:07
Steve L.14-Sep-02 13:07 
GeneralRe: Separate COLORREF Pin
Piotr Mizera14-Sep-02 13:35
Piotr Mizera14-Sep-02 13:35 
GeneralRe: Separate COLORREF Pin
Steve L.14-Sep-02 13:42
Steve L.14-Sep-02 13:42 
QuestionVS.NET: Compartible with MFC6? Pin
Philip Patrick14-Sep-02 12:47
professionalPhilip Patrick14-Sep-02 12:47 
AnswerRe: VS.NET: Compartible with MFC6? Pin
Anders Molin14-Sep-02 13:10
professionalAnders Molin14-Sep-02 13:10 
AnswerRe: VS.NET: Compartible with MFC6? Pin
Michael Dunn14-Sep-02 15:23
sitebuilderMichael Dunn14-Sep-02 15:23 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Mustafa Demirhan15-Sep-02 21:01
Mustafa Demirhan15-Sep-02 21:01 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Michael Dunn16-Sep-02 3:48
sitebuilderMichael Dunn16-Sep-02 3:48 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Mustafa Demirhan16-Sep-02 7:13
Mustafa Demirhan16-Sep-02 7:13 
AnswerRe: VS.NET: Compartible with MFC6? Pin
Pavel Klocek14-Sep-02 21:37
Pavel Klocek14-Sep-02 21:37 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Philip Patrick14-Sep-02 23:12
professionalPhilip Patrick14-Sep-02 23:12 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Pavel Klocek15-Sep-02 0:22
Pavel Klocek15-Sep-02 0:22 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Ancient Dragon15-Sep-02 17:09
Ancient Dragon15-Sep-02 17:09 

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.