CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2006
    Posts
    8

    Question Re: Windows Vista issues

    Hello! Here's another WindowsVista issue...

    I developed a C++ program in Visual Studio 2005 w/c was compiled in a Windows XP OS. The application works properly, except that I noticed that the Open Dialog UI (CFileDialog) is different when run in Windows Vista.

    In WinXP, the "Files of Type" Combo box displays all the selections when the pull down button is clicked. (combo box is expanded)

    On the other hand, in WindowsVista, the combo box only displays the 1st selection even if you click the pull down button. But when you press the down arrow key in your keyboard, the other selections will be displayed one by one (e.g. All Files (*.*) ). This issue occurs when there are only 2 File types selection in the combo box. (combo box is not expanded)

    I also noticed that in Windows Vista, when there are more than 2 File types in the combo box, vertical scroll bar will appear.

    How can my application properly display all the selections (just like File name combo box) in Windows Vista?

    Thank you.

  2. #2
    Join Date
    Aug 2006
    Posts
    8

    Re: Windows Vista issues

    I now discovered that my CFileDialog in Windows Vista still has the "look and feel" / properties of WinXP that's why some controls and icons are not similar to the CFileDialog of Vista.

    So now my question is, how can my application (compiled in VS2005) "adapt" the CFileDialog properties of Windows Vista? Is there any libraries to be updated during my compilation?

    Thank you.

    =)

    Quote Originally Posted by raceirolg
    Hello! Here's another WindowsVista issue...

    I developed a C++ program in Visual Studio 2005 w/c was compiled in a Windows XP OS. The application works properly, except that I noticed that the Open Dialog UI (CFileDialog) is different when run in Windows Vista.

    In WinXP, the "Files of Type" Combo box displays all the selections when the pull down button is clicked. (combo box is expanded)

    On the other hand, in WindowsVista, the combo box only displays the 1st selection even if you click the pull down button. But when you press the down arrow key in your keyboard, the other selections will be displayed one by one (e.g. All Files (*.*) ). This issue occurs when there are only 2 File types selection in the combo box. (combo box is not expanded)

    I also noticed that in Windows Vista, when there are more than 2 File types in the combo box, vertical scroll bar will appear.

    How can my application properly display all the selections (just like File name combo box) in Windows Vista?

    Thank you.

  3. #3
    Join Date
    Jun 2006
    Posts
    25

    Re: Windows Vista issues

    how can my application (compiled in VS2005) "adapt" the CFileDialog properties of Windows Vista? Is there any libraries to be updated during my compilation?
    you need to remove OFN_ENABLEHOOK flag. You can disable the hook just before the DoModal, e.g.

    dlg.m_ofn.Flags &= ~OFN_ENABLEHOOK;

  4. #4
    Join Date
    Aug 2006
    Posts
    8

    Re: Windows Vista issues

    Thanks for the reply.

    I tried applying the line of code you stated, however, Debug Assertion occured. I just ignored it then the CFileDialog appeared, still w/ the old style look. (not Vista look).

    Anyway, the non-Vista look is okay except that the "Files of Type" combo box length doesn't expand if it only contains 2 entries:

    E.g.
    Data Files (*.dat)
    All Files (*.*)

    When the pull down arrow of the combo box is pressed, the combo box does not expand, thus giving the user the mis-impression that only one File Type exists. But when you press the down arrow key in the keyboard, the All Files (*.*) will appear.

    (If the entries are more than 2, a vertical scroll bar will appear)


    Quote Originally Posted by Ted.
    you need to remove OFN_ENABLEHOOK flag. You can disable the hook just before the DoModal, e.g.

    dlg.m_ofn.Flags &= ~OFN_ENABLEHOOK;

  5. #5
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: Windows Vista issues

    Quote Originally Posted by raceirolg
    Hello! Here's another WindowsVista issue...
    Please don't hijack other people's threads. Make a new one for you question instead. A moderator should split this thread to give a chance to the OP to receive an answer to his problem.
    Har Har

  6. #6
    Join Date
    Aug 2006
    Posts
    8

    Re: Windows Vista issues

    My apologies for the misunderstanding. Since the thread was entitled "Windows Vista issues", i thought one can post here anything about the topic (general).

    anyway, i made a more specific thread, Windows Vista CFileDialog Problem.

    thank you. =)

    Quote Originally Posted by PadexArt
    Please don't hijack other people's threads. Make a new one for you question instead. A moderator should split this thread to give a chance to the OP to receive an answer to his problem.

  7. #7
    Join Date
    Aug 2006
    Posts
    8

    Windows Vista CFileDialog Problem

    question previously from Windows Vista issue thread:

    =====

    Hello! Here's another WindowsVista issue...

    I developed a C++ program in Visual Studio 2005 w/c was compiled in a Windows XP OS. The application works properly, except that I noticed that the Open Dialog UI (CFileDialog) is different when run in Windows Vista.

    In WinXP, the "Files of Type" Combo box displays all the selections when the pull down button is clicked. (combo box is expanded)

    On the other hand, in WindowsVista, the combo box only displays the 1st selection even if you click the pull down button. But when you press the down arrow key in your keyboard, the other selections will be displayed one by one (e.g. All Files (*.*) ). This issue occurs when there are only 2 File types selection in the combo box. (combo box is not expanded)

    I also noticed that in Windows Vista, when there are more than 2 File types in the combo box, vertical scroll bar will appear.

    How can my application properly display all the selections (just like File name combo box) in Windows Vista?

    Thank you.

  8. #8
    Join Date
    Aug 2006
    Posts
    8

    Re: Windows Vista CFileDialog Problem

    I now discovered that my CFileDialog in Windows Vista still has the "look and feel" / properties of WinXP that's why some controls and icons are not similar to the CFileDialog of Vista.

    So now my question is, how can my application (compiled in VS2005) "adapt" the CFileDialog properties of Windows Vista? Is there any libraries to be updated during my compilation?

    Thank you.

    =)


    Quote Originally Posted by raceirolg
    question previously from Windows Vista issue thread:

    =====

    Hello! Here's another WindowsVista issue...

    I developed a C++ program in Visual Studio 2005 w/c was compiled in a Windows XP OS. The application works properly, except that I noticed that the Open Dialog UI (CFileDialog) is different when run in Windows Vista.

    In WinXP, the "Files of Type" Combo box displays all the selections when the pull down button is clicked. (combo box is expanded)

    On the other hand, in WindowsVista, the combo box only displays the 1st selection even if you click the pull down button. But when you press the down arrow key in your keyboard, the other selections will be displayed one by one (e.g. All Files (*.*) ). This issue occurs when there are only 2 File types selection in the combo box. (combo box is not expanded)

    I also noticed that in Windows Vista, when there are more than 2 File types in the combo box, vertical scroll bar will appear.

    How can my application properly display all the selections (just like File name combo box) in Windows Vista?

    Thank you.

  9. #9
    Join Date
    Aug 2006
    Posts
    8

    Re: Windows Vista CFileDialog Problem

    Thanks for the reply.

    I tried applying the line of code you stated, however, Debug Assertion occured. I just ignored it then the CFileDialog appeared, still w/ the old style look. (not Vista look).

    Anyway, the non-Vista look is okay except that the "Files of Type" combo box length doesn't expand if it only contains 2 entries:

    E.g.
    Data Files (*.dat)
    All Files (*.*)

    When the pull down arrow of the combo box is pressed, the combo box does not expand, thus giving the user the mis-impression that only one File Type exists. But when you press the down arrow key in the keyboard, the All Files (*.*) will appear.

    (If the entries are more than 2, a vertical scroll bar will appear)


    Quote Originally Posted by Ted.
    you need to remove OFN_ENABLEHOOK flag. You can disable the hook just before the DoModal, e.g.

    dlg.m_ofn.Flags &= ~OFN_ENABLEHOOK;

  10. #10
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: CFileDialog and Windows Vista

    [ Split thread ]
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  11. #11
    Join Date
    Aug 2006
    Posts
    8

    Unhappy Re: CFileDialog and Windows Vista

    even if i implement the above code, the controls (icons, combo boxes, etc) would still look like Win2K controls (the old style). Even if i compile my program in a WinVista or WinXP environment same behaviour occurs. (I developed the program in Visual Studio .NET 2005). Hope you could help me on this. Thank you. =)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured