CFileDialog + Tooltip = Program Termination?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: CFileDialog + Tooltip = Program Termination?

  1. #1
    Join Date
    Jun 2005
    Posts
    315

    CFileDialog + Tooltip = Program Termination?

    I've got an odd problem to do with a CFileDialog object and tooltips I think. The first time the CFileDialog is displayed everything works OK (the files display and the user can select a file to open (and tooltips pop up noting file types and size..). The second time the CFileDialog is displayed, once the user hovers over a filename for less than a second, the program terminates (no message denoting a exception) in the release version. In the debug version there is an exception message.
    Unhandled exception in ProNC.exe (SHELL32.DLL): 0xc0000005: Access Violation.
    . Looking at the call stack, none of my functions are listed, the last listed one is "SHELL32". If I select the file I want quickly (not allowing tooltips to popup) everything works OK, or if I manually enter the file name in the editbox of the CFileDialog all is OK. No problems on 2000 machine either. I'm using XP Professional SP2 and VC 6.0. Any ideas?

    Thanks in advance,
    Jeron

  2. #2
    Join Date
    Apr 2006
    Location
    Buenos Aires - Argentina
    Posts
    31

    Re: CFileDialog + Tooltip = Program Termination?

    Can you show us the block of code where you're having problems?
    Last edited by CPPFanatic; May 8th, 2006 at 06:16 PM.
    People who think they know everything really annoy those of us who know we don't. - Bjarne Stroustrup

  3. #3
    Join Date
    Apr 2006
    Posts
    3

    Re: CFileDialog + Tooltip = Program Termination?

    the main point is

  4. #4
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,915

    Re: CFileDialog + Tooltip = Program Termination?

    Quote Originally Posted by maie2000
    the main point is
    Is it a part of the sentence?

    jeron, in addition to what CPPFanatic suggested, could you either post your original project or create test project where you are able to duplicate your problem and post it?
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  5. #5
    Join Date
    Jun 2005
    Posts
    315

    Re: CFileDialog + Tooltip = Program Termination?

    Unfortunately I can't post the whole project (boss won't let me), but I will try to reproduce the problem in a test app and post that.

    Thanks,
    Jeron

  6. #6
    Join Date
    Jun 2005
    Posts
    315

    Re: CFileDialog + Tooltip = Program Termination?

    Here is a small app which exhibits the problem. Click on the main button which brings up a CFileDialog box select a file (and click on Open button) CFileDialog closes and all is OK. Click on the main button again, then hover over a particular file so that the tool tip would typically display and the app shuts down without any error (exception) description, like you hit the close button. I tried it on someone elses machine (XP Pro Version 2002 SP1) and (and on a Win2000machine) and it worked OK. I'm using and ACER laptop with XP Pro Version 2002 SP 2 and VC 6.0.

    Thanks in advance,

    Jeron
    Attached Files Attached Files

  7. #7
    Join Date
    Jul 2005
    Posts
    767

    Re: CFileDialog + Tooltip = Program Termination?

    But even I don't get any crashes, I use Win 2K SP4.

  8. #8
    Join Date
    Sep 2002
    Location
    14 39'19.65"N / 121 1'44.34"E
    Posts
    9,815

    Re: CFileDialog + Tooltip = Program Termination?

    Quote Originally Posted by jeron
    Click on the main button again, then hover over a particular file so that the tool tip would typically display and the app shuts down without any error (exception) description, like you hit the close button. I tried it on someone elses machine (XP Pro Version 2002 SP1) and (and on a Win2000machine) and it worked OK. I'm using and ACER laptop with XP Pro Version 2002 SP 2 and VC 6.0.
    Sorry, couldn't repro it on my machine either (XP Pro / SP2). I tried both the debug and release builds, and could open the file dialog multiple times, the tooltips always worked fine. Did you check whether other applications expose the same behaviour on your machine?

  9. #9
    Join Date
    Jun 2005
    Posts
    315

    Re: CFileDialog + Tooltip = Program Termination?

    Thanks for the responses,

    No, other apps do not exhibit this problem on this machine. This whole thing makes no sense to me

    Thanks,

    Jeron

  10. #10
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: CFileDialog + Tooltip = Program Termination?

    This could be due to something else. Possibly one of your shell components got changed by some other update that you might have installed on your machine ??

  11. #11
    Join Date
    Feb 2002
    Posts
    3,788

    Re: CFileDialog + Tooltip = Program Termination?

    i tried both Debug / Release on my XP SP2. doesn't crash.

  12. #12
    Join Date
    Jun 2005
    Posts
    315

    Re: CFileDialog + Tooltip = Program Termination?

    Thanks for taking the time to try it. I think I'll try not using the CFileDialog class and use API calls (like GetOpenFileName()). Let you know what I find.

  13. #13
    Join Date
    Sep 2002
    Location
    14 39'19.65"N / 121 1'44.34"E
    Posts
    9,815

    Re: CFileDialog + Tooltip = Program Termination?

    Quote Originally Posted by jeron
    Thanks for taking the time to try it. I think I'll try not using the CFileDialog class and use API calls (like GetOpenFileName()). Let you know what I find.
    Yes, that would be interesting to narrow down the problem. The CFileDialog wrapper around GetOpenFileName() is not so thin. However, I doubt that it is an MFC problem - I rather suspect some component / defect on your machine which corrupts the behaviour of the common file dialog.

  14. #14
    Join Date
    Feb 2007
    Posts
    2

    Re: CFileDialog + Tooltip = Program Termination?

    Quote Originally Posted by jeron
    Thanks for taking the time to try it. I think I'll try not using the CFileDialog class and use API calls (like GetOpenFileName()). Let you know what I find.
    Hi jeron

    I've got a similar problem
    Like you, the bug occurs only to a few PC: In my case, it works perfectly on my computer but crash on those of the Test&Release Team.

    Finally, how did you solved your problem ?

    Thanks,
    David

  15. #15
    Join Date
    Jun 2005
    Posts
    315

    Re: CFileDialog + Tooltip = Program Termination?

    Unfortunatly due to time constraints I didn't solve it, but I had lots of people try it on thier XP machines at work and no problems were found. At this point I kind of attribute the problem to the a component update like Kirants mentioned. I'm getting a Vista upgrade for it this week, I'll let you know if the problem still exists on that particular machine.

    Jeron

Page 1 of 2 12 LastLast

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center