Monthly Archives: May 2009

links for 2009-05-31

Mac Buyer's Guide: Know When to Buy Your Mac, iPod or iPhone This page provides a product summary for each Apple model. The intent is to provide our best recommendations regarding current product cycles, and to provide a summary of currently available rumors for each model. (tags: geek shopping utilities gadget ipodtouch ipod guide buy) [...]

links for 2009-05-28

Testing three pan-tilt gimbals – DIY Drones In my quest for the perfect pan-tilt gimbal assembly for a small UAV, I've made one out of Lego and have some clumsy ones out of aluminum. Most commercial pan-tilt assemblies are made for much larger cameras than the ones we fly, or they're incredibly expensive turrets meant [...]

links for 2009-05-23

Kushaura : Blog : Installing CakePHP in a Subdirectory I've tried installing CakePHP several times on different web hosts, and on each I usually hit a snag when configuring an installation of cake in a subdirectory. There are several reasons for installing in a subdirectory–the primary being that I want to access certain types of [...]

How to find the text column header of a CListCtrl in MFC

  How to find the text column header of a CListCtrl in MFC CString GetColumnName( CListCtrl * list, int nCol ) {     CString strNome;     CHeaderCtrl* pHdr = list->GetHeaderCtrl();     if ( pHdr )         if ( nCol < pHdr->GetItemCount() )         {             HDITEM hdi;             hdi.mask = HDI_TEXT;             hdi.pszText = strNome.GetBuffer( [...]

Add/Remove operation is impossible, the code element ‘Cxxx’ is read only

  When attempting to add a Control Event Handler to a control on a dialog, we are encountering the message: Add/Remove operation is impossible, the code element ‘Cxxx’ is read only. After an hour of trying to solve it my self, a quick Google search turned up the following solutions. Add random charters to the [...]

Dump a CListCtrl

This snippet dumps the content of a CListCtrl in to a file. It also gets the number of columns in the list.   int GetColumnsCount( CListCtrl * list ) {     if( list != NULL )     {         const CHeaderCtrl * pHeaderCtrl = (CHeaderCtrl*) list->GetDlgItem(0);         if( pHeaderCtrl != NULL ) {             return  pHeaderCtrl->GetItemCount() [...]

How to create a menu and submenu on right click in MFC

  void ::OnNMRClickBacnetTree(NMHDR *pNMHDR, LRESULT *pResult) {     CPoint ptScreen;     SendMessage(WM_CONTEXTMENU, (WPARAM) m_hWnd, GetMessagePos() );     if (! GetCursorPos(&ptScreen))     {         return ;     }     // Select an element under the right click     CPoint ptClient(ptScreen);     m_BACnetTree.ScreenToClient(&ptClient);        // Create the right click menu     CMenu rightClickMenu;     rightClickMenu.CreatePopupMenu();     rightClickMenu.AppendMenu(MF_STRING,1021,_T("One")); [...]