RE: [GD-Windows] Mind numbing GetOpenFileName Problem
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2002-02-18 18:56:15
|
> > OPENFILENAME ofn; > > ZeroMemory(&ofn, sizeof(ofn)); I second this advice; never forget it! > > ofn.lStructSize = sizeof( OPENFILENAME_SIZE_VERSION_400 ); // = > > unless you're sure you're setting every field, you should probably get > in the habit of doing that... After reading on MSDN, I believe that OPENFILENAME_SIZE_VERSION_400 is a (constant) int. sizeof( int ) is 4. You probably want to drop the "sizeof" in this piece of code. Cheers, / h+ PS: if you had stepped through the offending data set-up in the debugger, or just inspected it right before you called Windows, you might have caught it more quickly. |