Click here to Skip to main content
15,923,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCheck if a window is hidden by another window Pin
Member 29654713-Jan-12 5:48
Member 29654713-Jan-12 5:48 
AnswerRe: Check if a window is hidden by another window Pin
Richard Andrew x643-Jan-12 5:57
professionalRichard Andrew x643-Jan-12 5:57 
AnswerRe: Check if a window is hidden by another window Pin
Randor 3-Jan-12 6:42
professional Randor 3-Jan-12 6:42 
AnswerRe: Check if a window is hidden by another window Pin
Albert Holguin4-Jan-12 9:39
professionalAlbert Holguin4-Jan-12 9:39 
QuestionThread sync Pin
columbos149272-Jan-12 20:05
columbos149272-Jan-12 20:05 
GeneralRe: Thread sync Pin
Randor 2-Jan-12 20:20
professional Randor 2-Jan-12 20:20 
GeneralRe: Thread sync Pin
columbos149272-Jan-12 20:29
columbos149272-Jan-12 20:29 
GeneralRe: Thread sync Pin
Randor 2-Jan-12 21:01
professional Randor 2-Jan-12 21:01 
Hi,
columbos14927 wrote:
1.The painting on the window is done by some function that is provided by frame grabber manufactorer.


Have you considered contacting the manufacturer?

columbos14927 wrote:
2.When i resize the window the App freezes and not responding to anything there are no error codes.

If you want to be a good software engineer then you will need to learn how to use your debugger.

When your application freezes:

1.) Execute a Debug build of your application from Visual Studio with debugger attached.
2.) Inside your Visual Studio you need to do a 'Break All'
3.) In Visual Studio make sure that Debug->Windows->Thread is visible. If you are a keyboard kind of guy this would be: CTRL+ALT+H
4.) In Visual Studio make sure that Debug->Windows->Callstack is visible. If you are a keyboard kind of guy this would be: CTRL+7
5.) Each thread is listed in the window along with the top of the callstack.
6.) You can select a thread in the Visual Studio debugger... and the 'CallStack' window will show the callstack associated with that thread.

Now you will be able to find what is causing the freeze.

Sometimes I find that WinDbg[^] is more powerful. If you want to use this then you would:

1.) Compile a Debug version of your application with Visual Studio.
2.) Download and install Debugging Tools for Windows[^]
3.) Launch your application from WinDbg or conversely... attach to the running instance.
4.) Wait for the freeze, or invoke it.
5.) When it freezes... Choose Debug->Break from the menu or from keyboard CTRL+BREAK
6.) Issue the command: !analyze -v -hang to have WinDbg analyze any hangs.
7.) Inspect the callstack of all threads and look for possible causes to the hang: ~*kv 250
8.) Another useful command is: !runaway[^] for having a look at thread times. Sometimes a hanging thread is spinning in an infinite loop and you can see which thread is hung... by observing that its consuming all of the thread times.
9.) If you still have not found it yet... it could be the main thread in a wait state... infinitely waiting to obtain a critical section or mutex... you can issue an !ntsdexts.locks[^] to look for critical sections and waiting threads.

If you are using WinDbg to debug a 32 bit executable under WOW64 then you might need to issue: .load wow64exts; .effmach x86

Someone should probably write and article or Tip/Trick about this.

Best Wishes,
-David Delaune
AnswerRe: Thread sync Pin
Bob Ciora4-Jan-12 1:06
Bob Ciora4-Jan-12 1:06 
GeneralRe: Thread sync Pin
columbos149274-Jan-12 1:26
columbos149274-Jan-12 1:26 
AnswerRe: Thread sync Pin
JackDingler4-Jan-12 12:19
JackDingler4-Jan-12 12:19 
QuestionDLL Questions Pin
Richard Andrew x642-Jan-12 17:19
professionalRichard Andrew x642-Jan-12 17:19 
AnswerRe: DLL Questions Pin
Rajesh R Subramanian2-Jan-12 17:41
professionalRajesh R Subramanian2-Jan-12 17:41 
GeneralRe: DLL Questions Pin
Richard Andrew x642-Jan-12 17:45
professionalRichard Andrew x642-Jan-12 17:45 
AnswerRe: DLL Questions Pin
Randor 2-Jan-12 18:50
professional Randor 2-Jan-12 18:50 
GeneralRe: DLL Questions Pin
Richard Andrew x642-Jan-12 18:57
professionalRichard Andrew x642-Jan-12 18:57 
GeneralRe: DLL Questions Pin
Randor 2-Jan-12 19:13
professional Randor 2-Jan-12 19:13 
QuestionHow to modify hardware's property via win32 API Pin
freshtiny2-Jan-12 16:17
freshtiny2-Jan-12 16:17 
AnswerRe: How to modify hardware's property via win32 API Pin
Vaclav_2-Jan-12 17:04
Vaclav_2-Jan-12 17:04 
AnswerRe: How to modify hardware's property via win32 API Pin
freshtiny2-Jan-12 21:05
freshtiny2-Jan-12 21:05 
QuestionDynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_2-Jan-12 15:56
Vaclav_2-Jan-12 15:56 
AnswerRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Chuck O'Toole2-Jan-12 16:01
Chuck O'Toole2-Jan-12 16:01 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Vaclav_2-Jan-12 16:39
Vaclav_2-Jan-12 16:39 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
ThatsAlok3-Jan-12 19:45
ThatsAlok3-Jan-12 19:45 
GeneralRe: Dynamic array of afx_msg functions - using CPtrArray ( MFC VC 6.0) Pin
Chuck O'Toole3-Jan-12 21:38
Chuck O'Toole3-Jan-12 21:38 

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.