Click here to Skip to main content
15,925,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: header-files Pin
testcrap2-Jul-08 20:39
testcrap2-Jul-08 20:39 
QuestionEasy Question Pin
C# Beginner Nick2-Jul-08 18:40
C# Beginner Nick2-Jul-08 18:40 
AnswerRe: Easy Question Pin
Hamid_RT2-Jul-08 20:14
Hamid_RT2-Jul-08 20:14 
GeneralRe: Easy Question Pin
C# Beginner Nick3-Jul-08 3:41
C# Beginner Nick3-Jul-08 3:41 
AnswerRe: Easy Question Pin
Mark Salsbery3-Jul-08 6:46
Mark Salsbery3-Jul-08 6:46 
GeneralRe: Easy Question Pin
C# Beginner Nick3-Jul-08 13:40
C# Beginner Nick3-Jul-08 13:40 
GeneralRe: Easy Question Pin
C# Beginner Nick3-Jul-08 17:14
C# Beginner Nick3-Jul-08 17:14 
Question// Ttrouble launching 2nd thread from MainWindow, beginner // Pin
RTrelles2-Jul-08 18:13
RTrelles2-Jul-08 18:13 
Hi!

I'm new to multithreading and developing in VC++ 6 directly with the win32 API.

In console mode, the usual code to create another thread and use it runs well in my system, but I have no success when using WinMain, like in the very simple code below:
int globalval;

void __cdecl TestThread( void* param ){ globalval=10; }

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE,
 PSTR szCmdLine, int nCmdShow )
{
globalval = 5;
_beginthread( TestThread, 0, (void*)NULL ); 

CreateMyWindows(hInstance);

MSG mess;
while( GetMessage(&mess,0,0,0) )
{  
TranslateMessage( &mess ); 
DispatchMessage( &mess ); 
} 

return mess.wParam;
}

I go past the _beginthread call and it even returns a thread number, but apparently TestThread doesn't run at all, because globalval doesn't change. Then after the first call to GetMessage I get the error message "R6016 not enough space for thread data".

Yes, I have VC6 with project set for run-time library "Debugging Multithread".

Any ideas?

Thanks a lot,

Rick Trelles
QuestionHow can I show only Cancel button on Messagebox Pin
sheshidar2-Jul-08 18:10
sheshidar2-Jul-08 18:10 
AnswerRe: How can I show only Cancel button on Messagebox Pin
Hamid_RT2-Jul-08 18:33
Hamid_RT2-Jul-08 18:33 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 18:46
Saurabh.Garg2-Jul-08 18:46 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Hamid_RT2-Jul-08 20:14
Hamid_RT2-Jul-08 20:14 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 20:26
Saurabh.Garg2-Jul-08 20:26 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Hamid_RT2-Jul-08 20:55
Hamid_RT2-Jul-08 20:55 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 20:57
Saurabh.Garg2-Jul-08 20:57 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Hamid_RT2-Jul-08 21:25
Hamid_RT2-Jul-08 21:25 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 21:33
Saurabh.Garg2-Jul-08 21:33 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Hamid_RT2-Jul-08 21:42
Hamid_RT2-Jul-08 21:42 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 21:47
Saurabh.Garg2-Jul-08 21:47 
AnswerRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 18:34
Saurabh.Garg2-Jul-08 18:34 
GeneralRe: How can I show only Cancel button on Messagebox Pin
sheshidar2-Jul-08 18:48
sheshidar2-Jul-08 18:48 
GeneralRe: How can I show only Cancel button on Messagebox Pin
Saurabh.Garg2-Jul-08 18:59
Saurabh.Garg2-Jul-08 18:59 
QuestionHow to change resource FORMVIEW's language(In VC.net IDE) Pin
zhaokang19812-Jul-08 17:38
zhaokang19812-Jul-08 17:38 
AnswerRe: How to change resource FORMVIEW's language(In VC.net IDE) Pin
zhaokang19812-Jul-08 21:38
zhaokang19812-Jul-08 21:38 
Questionhelp format a number as a CString Pin
limesp2-Jul-08 17:37
limesp2-Jul-08 17:37 

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.