Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Print text by horzontal Pin
Shanmuga Sundar28-Nov-03 0:59
Shanmuga Sundar28-Nov-03 0:59 
GeneralChange default codepage Pin
GDavy28-Nov-03 0:14
GDavy28-Nov-03 0:14 
GeneralRe: Change default codepage Pin
Mike Dimmick28-Nov-03 0:29
Mike Dimmick28-Nov-03 0:29 
GeneralRe: Change default codepage Pin
GDavy28-Nov-03 1:01
GDavy28-Nov-03 1:01 
GeneralRe: Change default codepage Pin
Mike Dimmick28-Nov-03 1:13
Mike Dimmick28-Nov-03 1:13 
GeneralHelp needed in using thread and socket Pin
Aswin27-Nov-03 23:34
Aswin27-Nov-03 23:34 
GeneralRe: Help needed in using thread and socket Pin
Anonymous28-Nov-03 0:08
Anonymous28-Nov-03 0:08 
GeneralRe: Help needed in using thread and socket Pin
Atif Mushtaq28-Nov-03 2:32
Atif Mushtaq28-Nov-03 2:32 
Dear u can not use CSocket in the worker thread .If u want to use CSockets with threads then use User interface threads.
But there are so many problems when u even use it in User Inteface threads.

What u should do Accept the sockets in the context of one thread(may be primary thread) , then Detach the socket handle from the CSocket Object Then start the Thread in suspneded mode ,Save it to Class level object of your CWinThread derived class.
Then resume thread .And attatch the Socket handle to Class level object of CWinThread derived class. may be in the Ininstance .
Now your socket object will be valid in the context of new thread.

Note:
You should also called AfxSocketInit Initinstance of your CWiThred Derived class.
if u dont follow these steps , may be your program work fine in debug mode , but it will get crashed in release mode.




No Worries!
QuestionHow to create a region from String? Pin
User-37793627-Nov-03 23:12
User-37793627-Nov-03 23:12 
AnswerRe: How to create a region from String? Pin
Iain Clarke, Warrior Programmer28-Nov-03 0:06
Iain Clarke, Warrior Programmer28-Nov-03 0:06 
GeneralRe: How to create a region from String? Pin
User-37793628-Nov-03 0:48
User-37793628-Nov-03 0:48 
GeneralRotate DC Pin
El'Cachubrey27-Nov-03 23:07
El'Cachubrey27-Nov-03 23:07 
GeneralRe: Rotate DC Pin
Iain Clarke, Warrior Programmer28-Nov-03 1:25
Iain Clarke, Warrior Programmer28-Nov-03 1:25 
GeneralRe: Rotate DC Pin
John R. Shaw28-Nov-03 6:32
John R. Shaw28-Nov-03 6:32 
GeneralQuestions: SOUND/THREAD CREATION Pin
DaFrawg27-Nov-03 23:06
DaFrawg27-Nov-03 23:06 
GeneralRe: Questions: SOUND/THREAD CREATION Pin
Bob Stanneveld28-Nov-03 1:59
Bob Stanneveld28-Nov-03 1:59 
GeneralType of Control Pane Pin
Danis Solovyov27-Nov-03 22:33
sussDanis Solovyov27-Nov-03 22:33 
GeneralMFC tray icon Pin
conman11027-Nov-03 22:02
conman11027-Nov-03 22:02 
GeneralRe: MFC tray icon Pin
Iain Clarke, Warrior Programmer28-Nov-03 1:29
Iain Clarke, Warrior Programmer28-Nov-03 1:29 
QuestionIOCP goes wrong? Pin
huqian200227-Nov-03 21:43
huqian200227-Nov-03 21:43 
AnswerRe: IOCP goes wrong? Pin
Anand Paranjpe27-Nov-03 21:49
Anand Paranjpe27-Nov-03 21:49 
GeneralRe: IOCP goes wrong? Pin
huqian200227-Nov-03 22:00
huqian200227-Nov-03 22:00 
AnswerRe: IOCP goes wrong? Pin
geo_m27-Nov-03 22:47
geo_m27-Nov-03 22:47 
GeneralAbout XML parser with MSXML 4 Pin
YKWCH27-Nov-03 20:16
YKWCH27-Nov-03 20:16 
GeneralRe: About XML parser with MSXML 4 Pin
Shanmuga Sundar27-Nov-03 20:54
Shanmuga Sundar27-Nov-03 20:54 

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.