Re: Run App only once

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The code was not correct and could not work right in any version of Win32. Any opinions
that it could work are merely delusional rantings. All the OP claims is that nobody saw
the actual, fundamental, bug occur in ten years, so therefore it must not exist. I,
however, have not only seen it, I've demonstrated why it is a bug, and why the code is
wrong. Therefore, any views that the FindWindow method will stop multiple instances from
occurring is erroneous. Furthermore, trying to act upon the window which may not yet
exist and expecting something will happen is depending upon impossible behavior (remember
that my article points out that the code only works because you are NOT trying to act upon
the window of the other app that is still coming up but hasn't created its window yet).

But I agree: taking incorrect code and modifying it and expecting it will work is relying
on too many optimistic scenarios.
joe

On Mon, 16 Apr 2007 09:21:45 -0700, "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx> wrote:


"GT" <ContactGT_remove_@xxxxxxxxxxx> wrote in message
news:46232bc0$0$26163$c3e8da3@xxxxxxxxxxxxxxxxxxxx

the above code is lifted from an application and has been working
perfectly for over 10 years. However, when I inserted the code into my
application and changed the register and findwindow text label, it does't
work in my app! Strange.


This is what differs correct code from the code that just happened to work
in some particular conditions and some particular OS.

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • tell Ronette its elder fearing outside a dose
    ... They are expecting under the office now, ... Get your weekly pouring jar inside my window. ... It's very clean today, I'll ... badly as Dickie opens, you can wander the poultice much more ...
    (sci.electronics.design)
  • Re: Steve Carroll does not know the difference between saving and quitting.
    ... or in an app where it can be used for additional work it ... Most apps cannot be used with no window open... ... yet it does not quit. ... And nor should it Snit! ...
    (comp.sys.mac.advocacy)
  • Re: Steve Carroll does not know the difference between saving and quitting.
    ... or in an app where it can be used for additional work it ... Most apps cannot be used with no window open... ... yet it does not quit. ... And nor should it Snit! ...
    (comp.sys.mac.advocacy)
  • Re: display array in a frame wnd
    ... An SDI app, where the image is displayed in the view. ... There would never be a need to create a frame window; ... I better prefered to reuse display provided with the librairy opencv, ...
    (microsoft.public.vc.mfc)
  • Re: display array in a frame wnd
    ... you have to create an app that is suitable for displaying an image. ... There would never be a need to create a frame window; it is not at all clear why such code ... I have to display results. ... Why is this not in an OnPaint handler? ...
    (microsoft.public.vc.mfc)