Monthly Archives: December 2011

C++11 FAQ from Bjarne Stroustrup

Available on ATT web site and Bjarne Stroustrup (inventor of C++) space, here a FAQ for C++0x named C++ 11.

FAQ C++ 11 :

To learn about specific chapters of the langage, see the DRAFT (which is very closed to the final paper):

PPL explained easy !

PPL is part of Visual C++ 2010 CRT…


shared_ptr explained simple !

To find advanced STL topics, check out Advanced STL channel9 sessions :

See Part 1 -> shared_ptr and friends
See Part 2 -> Algorithm optimization
See Part 3 -> STL’s comprehensive correctness checks
See Part 4 -> rvalue references, perfect forwarding, associative containers

See part 5 ->


PPL tasks updated

PPL is located under the C runtime aka CRT.

Try this updated preview header for Windows 8 async programming: view ppltasks.preview.h here ppltasks.preview

Download at

C++ for kernel mode : pros and cons

C++ in kernel mode. Pros and Cons.

The essence of power and performance.

Enjoy the CRT!

Check this channel9 topic about CRT.

C Run-time (CRT).pptx


Microsoft TechDays 2012 Paris – France

I will be proud to present a C++ session with a MCS Microsoft guy. It will be titled “Writing modern C++ code”

More informations:

VS and a Ribbon (MFC prototype)

Thinked after a couple of hours spent on Visual Studio 2011 Refersh UI – VS 11 Metro UI program… NDA.
Some features of the Visual Studio Shell could be explained as a standard Office UI Fluent Interface a.k.a. a Ribbon based UI.

books Oldies but Goodies

I needed some GDI stuff about scroolbar, CScrollView and others viewport and DPtoLP()… Drawing in the Windows C++ world requires some books !
Remember the old Petzold & Kruglinsky times ?

How to program a Ribbon based UI using MFC

Just declare a small set of stuff in your MainFrame class:

CMFCRibbonBar m_wndRibbonBar;
CMFCRibbonApplicationButton m_MainButton;

Implement it as:

void CMainFrame::InitMainButton()
m_wndRibbonBar.SetApplicationButton(&m_MainButton, CSize(45, 45));
CMFCRibbonMainPanel* pMainPanel = m_wndRibbonBar.AddMainCategory(_T("File"), IDB_RIBBON_FILESMALL, IDB_RIBBON_FILELARGE);
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_NEW, _T("&New"), 0, 0));
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_OPEN, _T("&Open..."), 1, 1));
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE, _T("&Save"), 2, 2));
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SAVE_AS, _T("Save &As..."), 3, 3));
std::auto_ptr<CMFCRibbonButton> apBtnPrint(new CMFCRibbonButton(ID_FILE_PRINT, _T("&Print"), 4, 4));
apBtnPrint->AddSubItem(new CMFCRibbonLabel(_T("Preview and print the document")));
apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_DIRECT, _T("&Quick Print"), 7, 7, TRUE));
apBtnPrint->AddSubItem(new CMFCRibbonButton(ID_FILE_PRINT_PREVIEW, _T("Print Pre&view"), 6, 6, TRUE));
apBtnPrint->SetKeys(_T("p"), _T("w"));
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SEND_MAIL, _T("Sen&d..."), 8, 8));
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_SUMMARYINFO, _T("Summary &Info..."), 9, 9));
pMainPanel->Add(new CMFCRibbonButton(ID_FILE_CLOSE, _T("&Close"), 5, 5));
pMainPanel->AddRecentFilesList(_T("Recent Documents"));
pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_TOOLS_OPTIONS, _T("Opt&ions"), 10));
pMainPanel->AddToBottom(new CMFCRibbonMainPanelButton(ID_APP_EXIT, _T("E&xit"), 11));

Explore the Visual C++ sample called DrawClient located in MFC\Visual C++ 2008 Feature Pack\DrawClient !

VS with a Ribbon UI

Have you ever wonder why VS does not have a Ribbon UI ?