while (1)
, infinite loop, or while (!1), which while (0) while (false), no loop.
GetOpenFileName()
returns a non-zero or a zero value (Boolean), depending on if it opens a file or not. So, you can just say this.while ( ! GetOpenFileName(&ofn) ) {}
while (! 1)
, which translates to while (0)
, orwhile (false)
, and it will terminate. Otherwise, if it returns 0, then the not turns it into a 1, or true. while ( ! (fileFound = GetFileName(&ofn)) ) {}