- bi.ulFlags |= BIF_NEWDIALOGSTYLE;
-
- // we'll get the "New Folder" button by default now, don't show it if
- // not needed
- if ( !needNewDir )
- bi.ulFlags |= BIF_NONEWFOLDERBUTTON;
- }
-#else
- if ( HasFlag(wxDD_NEW_DIR_BUTTON) && verComCtl32 >= 500 )
- {
- // use the new style to make the "New Folder" button appear
- bi.ulFlags |= BIF_NEWDIALOGSTYLE;
+ if (needNewDir)
+ {
+ bi.ulFlags |= BIF_NEWDIALOGSTYLE;
+ }
+ else
+ {
+ // Versions < 600 doesn't support BIF_NONEWFOLDERBUTTON
+ // The only way to get rid of the Make New Folder button is use
+ // the old dialog style which doesn't have the button thus we
+ // simply don't set the New Dialog Style for such comctl versions.
+ if (verComCtl32 >= 600)
+ {
+ bi.ulFlags |= BIF_NEWDIALOGSTYLE;
+ bi.ulFlags |= BIF_NONEWFOLDERBUTTON;
+ }
+ }