c++ - How to stop EnumWindows running infinitely win32 -


The code worked with all. Either way I manage to get Visual C ++ Express, do not hit the break point on the last return statement and it started running forever.

In the example code, EnumWindows tells infinitely. How can I stop it after calculating all the windows.

  #include & lt; Windows.h & gt; Bull Callback EnumWindowsProc (HWND HWN, Long LPARM) {TCHAR Buff [255]; If (Iseindo vizibil (hwnd)) {gatewondo text (hwnd, (lppws), 254); Printf ("% s \ n", buff); } Return TRUE; } Int _tmain (int argc, _TCHAR * argv []) {enum window (EnumWindowsProc, 0); Return 0; }    

Your code works for me, Removed and added Printf () #include & lt; Stdio.h & gt; What product does it produce on your system?

The code that works for me is:

  #include & lt; Windows.h & gt; # Include & lt; Stdio.h & gt; Bull Callback EnumWindowsProc (HWND HWN, Long LPARM) {Four Buffs [255]; If (Iseindo vizibil (hwnd)) {gatewondo text (hwnd, (lttr) bref, 254); Printf ("% s \ n", buff); } Return TRUE; } Int main () {EnumWindows (EnumWindowsProc, 0); Return 0; }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -