Click here to Skip to main content
15,914,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to load a .jpg picture? Pin
Vasiliy Zverev2-Apr-03 0:49
Vasiliy Zverev2-Apr-03 0:49 
AnswerRe: How to load a .jpg picture? Pin
Chintan2-Apr-03 7:04
Chintan2-Apr-03 7:04 
GeneralPassing CString objs to an MFC extension DLL Pin
Abin2-Apr-03 0:28
Abin2-Apr-03 0:28 
GeneralRe: Passing CString objs to an MFC extension DLL Pin
Roger Allen2-Apr-03 1:04
Roger Allen2-Apr-03 1:04 
GeneralRe: Passing CString objs to an MFC extension DLL Pin
Abin2-Apr-03 3:22
Abin2-Apr-03 3:22 
GeneralRe: Passing CString objs to an MFC extension DLL Pin
Alvaro Mendez2-Apr-03 10:12
Alvaro Mendez2-Apr-03 10:12 
GeneralRe: Passing CString objs to an MFC extension DLL Pin
RobJones2-Apr-03 3:51
RobJones2-Apr-03 3:51 
GeneralMessage Loop for specific messages Pin
peterchen2-Apr-03 0:20
peterchen2-Apr-03 0:20 
Hi,
I got a tricky deadlock, and I'm wondering if it's a good idea to process only individual messages.
What I would need to do is specifically pick and process WM_DEVICECHANGE messages from the message queue (without "killing" or processing other messages)

The PeekMessage documentation looks like it's possible (by providing a message range), but there's no discussion of it's implications. Any experience / documentation on that?



Problem at hand:
Communication with an USB device. When communication fails for any reason, the communication should try to recover and repeat the last transfer. This might involve a device reset, and reconnecting to the device.This should happen without knowledge of the caller.
To reconnect after a lost connection, I need to enumerate devices to find the device with the same serial. Windows sends WM_DEVICECHANGE messages to announce the device removal and reconnection.
Problem: Win 98 waits ca. 20 seconds for these messages to be processed before it gives up. This means that the new device (although plugged in) is not enumerated systemwide for 20 seconds (unless I process messages or cancel the process). Not acceptable (just to long).
The communication has no knowledge about the hosting application, and the hosting application can't easily process messages while transfers are pending (but it can't timeout for 20s)


Italian is a beautiful language. amare means to love, and amara bitter.

sighist | Agile Programming | doxygen

GeneralRe: Message Loop for specific messages Pin
Vasiliy Zverev2-Apr-03 0:36
Vasiliy Zverev2-Apr-03 0:36 
GeneralRe: Message Loop for specific messages Pin
56789012342-Apr-03 0:46
56789012342-Apr-03 0:46 
GeneralMidi API, please help Pin
bob_0002-Apr-03 0:17
bob_0002-Apr-03 0:17 
GeneralAutometed Content Publishing System for Intranet Pin
Bajwagr81-Apr-03 23:53
Bajwagr81-Apr-03 23:53 
GeneralDisable a tab in a CPropertySheet Pin
JensB1-Apr-03 22:42
JensB1-Apr-03 22:42 
GeneralRe: Disable a tab in a CPropertySheet Pin
Rage1-Apr-03 23:39
professionalRage1-Apr-03 23:39 
GeneralChanging font type in a View Pin
Anonymous1-Apr-03 22:05
Anonymous1-Apr-03 22:05 
GeneralRe: Changing font type in a View Pin
jhwurmbach1-Apr-03 22:19
jhwurmbach1-Apr-03 22:19 
GeneralRe: Changing font type in a View Pin
Anonymous1-Apr-03 22:29
Anonymous1-Apr-03 22:29 
GeneralRe: Changing font type in a View Pin
ilgale1-Apr-03 23:32
ilgale1-Apr-03 23:32 
GeneralRe: Changing font type in a View Pin
Cedric Moonen2-Apr-03 0:08
Cedric Moonen2-Apr-03 0:08 
GeneralRe: Changing font type in a View Pin
Chintan2-Apr-03 7:09
Chintan2-Apr-03 7:09 
GeneralModeless property sheet and OK/Cancel buttons. Pin
justin2231-Apr-03 21:58
justin2231-Apr-03 21:58 
GeneralRe: Modeless property sheet and OK/Cancel buttons. Pin
jhwurmbach1-Apr-03 22:24
jhwurmbach1-Apr-03 22:24 
GeneralProgress Bar Pin
summo1-Apr-03 21:26
summo1-Apr-03 21:26 
GeneralRe: Progress Bar Pin
Cedric Moonen1-Apr-03 22:03
Cedric Moonen1-Apr-03 22:03 
GeneralSearching database more effective Pin
Ohaiyo1-Apr-03 19:33
Ohaiyo1-Apr-03 19: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.