Click here to Skip to main content
15,917,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl HELP! Pin
Michael Dunn10-Nov-03 20:27
sitebuilderMichael Dunn10-Nov-03 20:27 
GeneralRe: CListCtrl HELP! Pin
BaldwinMartin10-Nov-03 20:37
BaldwinMartin10-Nov-03 20:37 
GeneralRe: CListCtrl HELP! Pin
ilinov10-Nov-03 20:33
ilinov10-Nov-03 20:33 
GeneralRe: CListCtrl HELP! Pin
BaldwinMartin10-Nov-03 20:41
BaldwinMartin10-Nov-03 20:41 
GeneralRe: CListCtrl HELP! Pin
Abin10-Nov-03 21:45
Abin10-Nov-03 21:45 
GeneralRe: CListCtrl HELP! Pin
BaldwinMartin10-Nov-03 21:49
BaldwinMartin10-Nov-03 21:49 
Generalphp and VC++ compatible encryption algorithm???help please Pin
xxhimanshu10-Nov-03 20:02
xxhimanshu10-Nov-03 20:02 
GeneralRe: php and VC++ compatible encryption algorithm???help please Pin
BaldwinMartin10-Nov-03 20:44
BaldwinMartin10-Nov-03 20:44 
GeneralRe: php and VC++ compatible encryption algorithm???help please Pin
geo_m11-Nov-03 8:03
geo_m11-Nov-03 8:03 
GeneralRe: php and VC++ compatible encryption algorithm???help please Pin
geo_m11-Nov-03 8:00
geo_m11-Nov-03 8:00 
GeneralOnSysChar Pin
Vancouver10-Nov-03 19:38
Vancouver10-Nov-03 19:38 
Generalgettin' jiggy with it Pin
closecall10-Nov-03 19:14
closecall10-Nov-03 19:14 
GeneralRe: gettin' jiggy with it Pin
RoyceF1-Dec-06 9:17
RoyceF1-Dec-06 9:17 
Generalto Pin
samhita10-Nov-03 18:39
samhita10-Nov-03 18:39 
GeneralDrag and Drop to WinXp Cd Wiz Takes a Wiz Pin
Swinefeaster10-Nov-03 18:15
Swinefeaster10-Nov-03 18:15 
QuestionAny Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 16:50
percyvimal10-Nov-03 16:50 
AnswerRe: Any Experts Like to Challange This Questions??? Pin
Dave Bryant10-Nov-03 17:08
Dave Bryant10-Nov-03 17:08 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 17:15
percyvimal10-Nov-03 17:15 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
Dave Bryant10-Nov-03 17:24
Dave Bryant10-Nov-03 17:24 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
percyvimal10-Nov-03 17:29
percyvimal10-Nov-03 17:29 
GeneralRe: Any Experts Like to Challange This Questions??? Pin
Antti Keskinen11-Nov-03 10:50
Antti Keskinen11-Nov-03 10:50 
GeneralIsWindow(m_hwnd) returns 0. Pin
suninwater10-Nov-03 16:48
suninwater10-Nov-03 16:48 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Dave Bryant10-Nov-03 17:14
Dave Bryant10-Nov-03 17:14 
The remarks in MSDN for IsWindow() actually say that a thread should not call IsWindow() for a window that it did not create because the window could be destroyed after the function is called - so that's not a promising start...

Anyway, here's a couple of likely reasons for your problem:
1) Does the call to CreateWindow() succeed? If not, then obviously IsWindow() will not succeed either.
2) When does the window get destroyed? If it is destroyed in the MyClass destructor, then this will be called at the end of the scope of the MyClass object (since it is created on the stack). From the code snippet above, that means that it will be called when mainfunc() terminates, which, unless you have some sort of syncrhonisation, will be before your thread function terminates. Consequently, the window will be destroyed before the thread gets around to using it.

Dave
http://www.cloudsofheaven.org
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
suninwater10-Nov-03 19:24
suninwater10-Nov-03 19:24 
GeneralRe: IsWindow(m_hwnd) returns 0. Pin
Dave Bryant11-Nov-03 8:26
Dave Bryant11-Nov-03 8:26 

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.