Issues with F1-Help in C++ Projects

Issues with F1-Help in C++ Projects

  • Comments 23

Ulzii Luvsanbat

Hi! My name is Ulzii Luvsanbat and I’m a Senior Test Lead with the Visual C++ team. Diego told me about some feedback received in a recent post regarding the accuracy and usefulness of the F1-Help command when working on C++ projects.

First of all, I want to start by thanking all of you guys for your feedback on F1 Help experiences in C++.  We really appreciate you taking the time to share your thoughts and we apologize for any issues you’re seeing.  We have made lots of improvements in VS2010 around F1 Help specifically for C++ from updating content topics with more specialized tags, improving query content that gets built by the IntelliSense parser, and more.  However, C++ has wide spectrum of support in terms of runtimes, target OS, and even languages flavors, which greatly contribute to bugs in the entire F1 Help system.  Again, we apologize for missing any bugs.

Now, taking a closer look into some issues that were reported in previous blogs:

  • I want to use the example offered by Leo Davidson, who told that he pressed F1 over ::GetMessage() but thus brought a help page on Windows Azure.
    ::GetMessage() function does have a correct topic in MSDN with the right tags.  And you should not have seen the managed interface to Azure.  We have verified that it does bring up the right topic for VS2010 RTM and VS2010 SP1 (which was released last week).  So what might be happening to you is either one of these 2 cases:
    • IntelliSense parser for that source file isn’t working when started F1 Help query.  Every time you press F1, we use our C++ IntelliSense parser to fully resolve current token’s full qualified name and its associated header file, target platform, etc before sending the request to MSDN which topic to display.  If for any reason, IntelliSense parser isn’t working for that source file (translation unit) then we fall back to just sending that keyword and whatever else we can find out without compiling the source.  This will cause keywords/tags collisions in topics across different frameworks or platforms, and what topic will be chosen is undefined.
    • Your project is IJW ("it just works" C++ Interop), meaning you’re building that source file with /clr compiler option.  One of the hard choices we had to make in VS2010 was not to enable C++/CLI IntelliSense (we plan to correct that in a future release), and therefore the F1 Help will behave like above scenario I mentioned.
  • Jalf mentioned similar issues with Direct3D. DirectX topics in MSDN weren’t updated for a while to reflect the C++ language provider changes for F1 Help keyword search heuristics.  However, we have been working with the Windows team to make all the required changes in MSDN metadata. They’re almost done with those changes and you should be experiencing improved results soon.

Thanks again for this valuable feedback.

  • It's disappointing that searching for "GetMessage" returns the expected Win32 page as the #1 hit in both Bing and Google, yet the F1 help always seems to come back with the least relevant version of the topic.   In this case it's Azure, but in the past it's had a peculiar love for the Windows CE and FoxPro documentation.

    In the scenarios where the context isn't known and there are multiple possibilities, could you bias the results towards selecting the Platform SDK, or some predefined order rather than just picking one at random?    This won't be as accurate as the full context search, but it will be better than what we've got now, and could be delivered a lot sooner than the C++/CLI Intellisense fix.

  • I'm testing with VS2010 RTM.

    In case it was an issue with the project, I created a new project from scratch using the Win32 project wizard.

    I did not edit the code at all, so everything is supplied by the IDE. I did a rebuild-all, then also waited for the status bar to indicate that the intellisense stuff was done updating.

    I scrolled down to the GetMessage call in the wizard-generated code and pushed F1, and this is what happened (a page on Windows Azure Platform, CloudQueue.GetMessage Method appears):

    Let me know if there's anything I can do to help debug this. I would love to see it fixed.

    I can try installing VS2010 SP1 if desired, but I'll leave my machine on the RTM for now in case you want me to check anything against the current state. (I'm still using VS2008 as my main IDE so I don't mind which version the parallel VS2010 install is on.)

    Another thing that makes this problem more and more frustrating over the years is that there keep being added new technologies which re-use the names of old ones. On top of the old annoyances of MFC, ATL, Windows CE and .Net pages coming up when Win32 devs push F1, we get new annoyances like STL/CLR. Not that the frameworks themselves are an annoyance -- STL/CLR seems like a good thing -- but they make it even more important for the IDE to understand the language, platform and framework context of the project when F1 is pushed.

  • This is the full URL which the F1 push seems to take me to. It does have "DevLang-C++" in the query, FWIW, but that doesn't seem to do any good (and even if the web server respected that language hint, the language alone wouldn't be enough to ensure the Win32 API was found rather than another that might be called from other types of C++ projects):

  • > (we plan to correct that in a future release)

    Ulzii, I'm getting a bit frustrated with the lack of information about plans for C++/CLI Intellisense. Despite repeated requests for more detail, the only information we've heard back from Microsoft are vague promises that Intellisense will be re-introduced in some unspecified future release. There are a number of customers like me who pay thousands and thousands of dollars to Microsoft every year for their MSDN subscriptions, only to hit a wall when we ask for more information. Your plans affect our plans, so more insight into the roadmap would be appreciated.

  • I agree, unfortunately I've found F1 help to be so broken as to be completely worthless. I'd like to offer constructive criticism, but when something doesn't work at all there's nothing to really do. If it could ever return a relevant result that'd be a good start. (Though to be fair I wouldn't know if this got fixed, I always just Google it. Works every time).

  • One problem I'm having all the time is that getting F1 help for a message (like WM_DESTROY) brings up the help for CWnd::OnDestroy. No, sorry, I'm not using MFC. This is a big issue for non-MFC programmers (Win32, WTL). Often the MFC help is incomplete and refers to the Win32 page "for more details". That's actually the better case, because I can click on the link and go where I want. Often though the Win32 topic is not linked in the MFC topic, so I have to go to the Index/Search and type what I want.

    I fail to see how this can be helpful even for MFC programmers. If I'm writing an MFC application I would never have to deal with WM_DESTROY directly in my code.

    As it stands, F1 is mostly useful just to bring up the help browser. After that I have to type my text again in the index box.

  • I'm getting some pretty bizarre results on this myself, at least with VC++ Express 2010 SP1beta and online help.

    If I just create a standalone C++ file with this code:

    #include <windows.h>

    int main() {



    ...and hit F1 on GetMessage(), I get Microsoft.Practices.EnterpriseLibrary.Validation.Validators.GetMessage().

    When I create a new Win32 Console Project, create a new .cpp file in the project with the code and hit F1, I get help on the Code and Text Editor at first. Not very helpful (but that brings back memories of VC6!). If I wait about 10-20 seconds for Intellisense to update, then I finally get Win32 GetMessage(). So it looks like you can get the correct answer, but there are multiple cases in which the heuristics could still be improved.

    I frequently hit the same problem as Ivo with getting MFC/ATL help when looking for Win32 info, and that's been a long standing problem in VC Help even back to the VC6 days. It was made worse by the MFC help getting bundled with other C++ help such that you couldn't avoid installing it. Generally, I think I would prefer just having better options to exclude help, as heuristics are too hard to get right and there are different times where I want different help collections to have higher priority.

  • I agree with Leo and Phaeron. With VS 2010 SP1 beta creating a skeleton Win32 GUI app, GetMessage's F1 help gives help on:

    ManagementPackExceptionMessages.GetMessage Method

    And this is in VS 2010 SP1, which I thought was supposed to be better!

    Mike Diack

  • Like Phaeron, with VS2010 SP1, I also get through to that page:


    First of all the new Help viewer appears, says "Can’t find requested content on your computer", and gives me a link to view the content online - and it's that that takes me to the wrong topic.

    I'm a tad worried that things are requiring Intellisense to function in order to improve the searches. Almost inevitably when you want help, you're editing code, so it's in a non-compilable state anyway!

  • Hi,

    My name is Sunny Gupta and I work for VC++ team. First of all thanks everyone for the constructive feedback. We would really like to make things work the way everyone would expect and therefore we truly value all these comments.

    @Leo and @Phaeron:

    Can you please confirm if you are selecting the entire word and then pressing F1? In that case we query for only the word highlighted and as a result the context is not proper. If you place the cursor on the word (without selecting the word) and then press F1, you will get what you want. Having said that, I will admit that we are depending on intellisense to provide correct context and that can sometime back fire if the intellisense does not work. But under common scenario where if you have a project with files on which intellisense works and you place your cursor on the Word and press F1, you will go the right topic.

    Under scenarios where the intellisense is working and the word is not highlighted, if we don't get the correct F1 help, then it’s an issue that we would like to fix in our future release. You can help us out by giving us the entire URL that is being passed to the browser. That way we will know what is the supplied data by the IDE to the Help system. And that would help us narrow down the problem and fix it for you.

    If you have any questions about F1 help you can also email me directly at (sugupta at microsoft dot com) and I will try my best to get that thing fixed for you in our next release.

    Thanks a ton for using VS and helping us with your valuable feedback.

    -Sunny Gupta

  • @Sunny:

    For me, F1 help for GetMessage() fails exactly the same way regardless whether I highlight the function or place the cursor in the word. Like the others, I have become accustomed to just press F1 to bring up the help viewer, then type in or copy/paste to get what I need. I did just now try F1 on LoadAccelerators() and was surprised to see it open the correct topic in the Platform SDK documentation (installed locally, FWIW). Interesting, I just assumed that native programmers had been left out to dry as usual.

  • @Sunny:

    I haven't been selecting any text when hitting F1. Oddly, however, I'm now getting slightly different results than last time.

    When I create a loose C++ file (no project) and hit F1, this is what is opened in the browser:;k(DevLang-"C%2B%2B")&rd=true

    This then redirects to this page:

    ...which is the Azure doc that Leo hit earlier. If I then use a Win32 Console Application project to hold the file, I get this query:

    Which then returns the expected Win32 function.

    I think I have figured out one way that queries degrade, however. If you have your help set to local help and then jump from there to online help because you don't have the help locally, some parts of the query are dropped. For instance, doing that with the no project case produces this query:

    Which is missing the C++ language tag, and leads to this topic from the Windows CE 1.0 documentation instead:

    Bizarrely, this is actually a better fit than the Azure documentation returned with the DevLang-"C++" tag added.

  • Hi,

    With all respect to all your involvelemnt into solving so simple problem.

    Don't you all think all those failures are caused by too complex design of this system? I understand that intellisense is great and improving from release to release but you must know the simple thing is usually better that overcomplicated.

    Why not just show "dialog" box" with list of topics found like:

    GetMessage (MFC 4.1 doc ...)

    GetMessage (Windows SDK blabla)

    GetMessage (Windows CE SDK blabla)

    This list would be shown of course when system isn't sure what is the best choice (i bet you've got score for each entry somewhere in algorithm)

    It's only two clicks/presses more from standard F1 and enables to find reasonable source fast.

    (i bet that this system could learn by those choices better than rely of inlellisence which can befouled by complicated C++ constructs)


    PS. I'm not using VC since 10 years or more  i'm just astonished that it does not work now as it worked quite well in last century.

    KISS :)

  • I too find the VC2010 environment a step back from previous versions. I described the look and feel as 'Dark', it must be WPF. I really dont't like it, I have been using VS since 1994. To make my like easier I run up the help from VS 2008 and enter the keyword in the index and adjust the collection to C++/C# to reduce the noise. Perhaps Microsoft are trying to be too clever. And whose bright idea was it to use WPF when VS2005/2008 was not that bad.

  • @Sunny and everyone

    With VS2010 SP1 beta:

    In fairness to sunny, I've just retried the GetMessage thing, having just put the cursor on the word and hit F1 (rather than selecting the whole word), and it appears he's right (for me at least), the help then correctly showed the right information about ::GetMessage.


Page 1 of 2 (23 items) 12