Click here to Skip to main content
15,927,699 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ADO question ... Pin
mathiass19-Oct-01 7:39
mathiass19-Oct-01 7:39 
GeneralRe: ADO question ... Pin
Hadi Rezaee19-Oct-01 12:23
Hadi Rezaee19-Oct-01 12:23 
Generalchild window in new MFC app Pin
18-Oct-01 11:58
suss18-Oct-01 11:58 
GeneralRe: child window in new MFC app Pin
Fazlul Kabir18-Oct-01 12:06
Fazlul Kabir18-Oct-01 12:06 
GeneralRe: child window in new MFC app Pin
19-Oct-01 5:10
suss19-Oct-01 5:10 
GeneralRe: child window in new MFC app Pin
19-Oct-01 5:19
suss19-Oct-01 5:19 
QuestionUI Thread dummy window !?!?!? Pin
Luc Bergeron18-Oct-01 10:37
Luc Bergeron18-Oct-01 10:37 
AnswerRe: UI Thread dummy window !?!?!? Pin
Joaquín M López Muñoz18-Oct-01 12:32
Joaquín M López Muñoz18-Oct-01 12:32 
It is the call WSAAsyncSelect(m_sock.getSocket(), m_pMainWnd->GetSafeHwnd(),...) that is telling Winsock to send notifications to your dummy window. The problem is that WSAAsyncSelect needs a valid HWND to send the notifications to. One workaround for this is having PreTranslateMessage overriden so that it intercepts messages intended to the dummy window from Winsock, like this:
BOOL CConection::PreTranslateMessage(MSG *pMsg)
{
  if(pMsg->message==WSA_THREADSOCKETEVENT){
    pMsg->hwnd=0; // divert this message to the thread
  }
  return 0;
}
Haven't checked it out myself, so it'd be great if you tell us back whether this works.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: UI Thread dummy window !?!?!? Pin
Luc Bergeron19-Oct-01 2:49
Luc Bergeron19-Oct-01 2:49 
GeneralRe: UI Thread dummy window !?!?!? Pin
Joaquín M López Muñoz19-Oct-01 10:38
Joaquín M López Muñoz19-Oct-01 10:38 
GeneralDesktop Icon text color Pin
Bret Faller18-Oct-01 9:49
Bret Faller18-Oct-01 9:49 
GeneralRe: Desktop Icon text color Pin
Ravi Bhavnani18-Oct-01 10:24
professionalRavi Bhavnani18-Oct-01 10:24 
GeneralRe: Desktop Icon text color Pin
Bret Faller18-Oct-01 11:34
Bret Faller18-Oct-01 11:34 
GeneralRe: Desktop Icon text color Pin
Bret Faller18-Oct-01 12:40
Bret Faller18-Oct-01 12:40 
GeneralRe: Hue/Luminance Pin
Ravi Bhavnani19-Oct-01 2:16
professionalRavi Bhavnani19-Oct-01 2:16 
GeneralCAsyncSocket: sending large amounts of data to server Pin
18-Oct-01 9:20
suss18-Oct-01 9:20 
GeneralRe: CAsyncSocket: sending large amounts of data to server Pin
19-Oct-01 2:40
suss19-Oct-01 2:40 
GeneralMultithreaded Winsock DLL Pin
18-Oct-01 8:37
suss18-Oct-01 8:37 
GeneralRe: Multithreaded Winsock DLL Pin
Anders Molin18-Oct-01 9:07
professionalAnders Molin18-Oct-01 9:07 
GeneralSimple question which I can't figure out... Pin
James Spibey18-Oct-01 8:09
James Spibey18-Oct-01 8:09 
GeneralRe: Simple question which I can't figure out... Pin
#realJSOP18-Oct-01 8:59
professional#realJSOP18-Oct-01 8:59 
GeneralRe: Simple question which I can't figure out... Pin
Aaron Schaefer18-Oct-01 9:39
Aaron Schaefer18-Oct-01 9:39 
GeneralRe: Simple question which I can't figure out... Pin
PJ Arends18-Oct-01 10:03
professionalPJ Arends18-Oct-01 10:03 
GeneralRe: Simple question which I can't figure out... Pin
#realJSOP18-Oct-01 10:07
professional#realJSOP18-Oct-01 10:07 
GeneralRe: Simple question which I can't figure out... Pin
Mike Burston18-Oct-01 12:51
Mike Burston18-Oct-01 12:51 

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.