Click here to Skip to main content
15,908,173 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCannot load strings from VC++String table Pin
femi ashiru10-Jul-04 6:44
femi ashiru10-Jul-04 6:44 
GeneralRe: Cannot load strings from VC++String table Pin
Johan Rosengren10-Jul-04 9:16
Johan Rosengren10-Jul-04 9:16 
GeneralRe: Cannot load strings from VC++String table Pin
femi ashiru10-Jul-04 15:53
femi ashiru10-Jul-04 15:53 
GeneralRe: Cannot load strings from VC++String table Pin
Johan Rosengren10-Jul-04 20:50
Johan Rosengren10-Jul-04 20:50 
Generalmenubar custom draw Pin
s o v a n n10-Jul-04 5:46
s o v a n n10-Jul-04 5:46 
GeneralRe: menubar custom draw Pin
Mike Dimmick10-Jul-04 7:44
Mike Dimmick10-Jul-04 7:44 
GeneralCTreeView and CImagelist Pin
Monty210-Jul-04 3:57
Monty210-Jul-04 3:57 
GeneralRe: CTreeView and CImagelist Pin
inlandchris10-Jul-04 5:54
inlandchris10-Jul-04 5:54 
Here is a snippet of code I wrote last month. It makes a CTreeview with a list of icons (big size) on the left with a description on the right side (2nd column). Dont forget, icons have 2 sizes, small and big. See if you can understand what I wrote:


CImageList * m_pImageList;
CImageList * m_pImageListSmall;

<view file="">

// insert two columns (REPORT mode) and modify the new header items
m_ctlDatabaseList.GetWindowRect(&rect);
m_ctlDatabaseList.InsertColumn(0, strItem1, LVCFMT_LEFT, rect.Width() * 3/9, 0);
//spaces them equally. This is a header of the CTree control
m_ctlDatabaseList.InsertColumn(1, strItem2, LVCFMT_LEFT, rect.Width() * 1/3, 1);
m_ctlDatabaseList.InsertColumn(2, strItem3, LVCFMT_LEFT, rect.Width() * 2/7, 2);


///create the icons

CRect rect;
CzScanApp *pApp;
pApp = (CzScanApp*)AfxGetApp();

m_pImageList = new CImageList();
m_pImageListSmall = new CImageList();
ASSERT(m_pImageList != NULL && m_pImageListSmall != NULL);// serious allocation failure checking
m_pImageList->Create(32, 32, TRUE, 4, 4); //This is a large icon
m_pImageListSmall->Create(16, 16, TRUE,4, 4);//this is the small icon from the same file

m_pImageList->Add(pApp->LoadIcon(IDI_ICON1));
//Icons have 2 sides to them, small size and large size
//.....ADD AS MANY ICONS YOU WANT SO LONG AS YOU HAVE THE ICON FILES STORED TO USE
m_pImageList->Add(pApp->LoadIcon(IDI_ICON50));
//Icons have 2 sides to them, small size and large size

///now add the icons to show


for (iItem = 0; iItem < Limit; iItem++) // insert the items and subitems into the list view.
{
if(GROUP[iItem+1][0].NoOfDACs== 0)
continue;
for (iSubItem = 0; iSubItem < 3; iSubItem++)
{
if (iSubItem == 0)
iIcon = ++a; // choose the icon and legend for the entry
lvitem.mask = LVIF_TEXT | (iSubItem == 0? LVIF_IMAGE : 0);
lvitem.iItem = (iSubItem == 0)? iItem : iActualItem;
lvitem.iSubItem = iSubItem;
// calculate the main and sub-item strings for the current item
pStrTemp1= strIconShortDesc[iIcon].GetBuffer(strIconShortDesc[iIcon].GetLength());
pStrTemp2= strIconDesc[iIcon].GetBuffer(strIconDesc[iIcon].GetLength());
pStrTemp3= strIcon3rdCol[iIcon].GetBuffer(strIcon3rdCol[iIcon].GetLength());
//lvitem.pszText = iSubItem == 0? pStrTemp1 : pStrTemp2;//2;
switch(iSubItem)
{
case 0:
lvitem.pszText = pStrTemp1;
break;
case 1:
lvitem.pszText = pStrTemp2;
break;
case 2:
lvitem.pszText = pStrTemp3;
break;
default:
break;
}
lvitem.iImage = iIcon;
if (iSubItem == 0)
iActualItem = m_ctlDatabaseList.InsertItem(&lvitem);
// HERE, IT INSERTS A NEW ICON WITH A DESCRIPTION
else
m_ctlDatabaseList.SetItem(&lvitem);
// HERE, IT MODIFIES AN EXISTING ICON WITH DESCRIPTION, (the sub-item text)
}//for(iSubItem
Generalplease help me. winsock help Pin
deep_george9-Jul-04 22:55
sussdeep_george9-Jul-04 22:55 
GeneralRe: please help me. winsock help Pin
Mike Dimmick10-Jul-04 7:47
Mike Dimmick10-Jul-04 7:47 
Questionfopen,ftell &amp; AMD64..... they fails??!? Pin
Paolo Ponzano9-Jul-04 22:29
Paolo Ponzano9-Jul-04 22:29 
AnswerRe: fopen,ftell &amp; AMD64..... they fails??!? Pin
bikram singh11-Jul-04 3:57
bikram singh11-Jul-04 3:57 
Generaltracking a service Pin
Rubin Boban9-Jul-04 22:20
Rubin Boban9-Jul-04 22:20 
GeneralRe: tracking a service Pin
ThatsAlok10-Jul-04 5:27
ThatsAlok10-Jul-04 5:27 
GeneralRe: tracking a service Pin
bikram singh11-Jul-04 0:14
bikram singh11-Jul-04 0:14 
GeneralA intresting problem,hope any Felloow Programmer solve it Pin
ThatsAlok9-Jul-04 22:16
ThatsAlok9-Jul-04 22:16 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
Michael P Butler10-Jul-04 0:57
Michael P Butler10-Jul-04 0:57 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
ThatsAlok10-Jul-04 3:10
ThatsAlok10-Jul-04 3:10 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
Johan Rosengren10-Jul-04 3:39
Johan Rosengren10-Jul-04 3:39 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
ThatsAlok10-Jul-04 5:00
ThatsAlok10-Jul-04 5:00 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
Johan Rosengren10-Jul-04 8:55
Johan Rosengren10-Jul-04 8:55 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
ThatsAlok10-Jul-04 19:30
ThatsAlok10-Jul-04 19:30 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
Johan Rosengren10-Jul-04 20:44
Johan Rosengren10-Jul-04 20:44 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
palbano10-Jul-04 21:33
palbano10-Jul-04 21:33 
GeneralRe: A intresting problem,hope any Felloow Programmer solve it Pin
Johan Rosengren10-Jul-04 21:50
Johan Rosengren10-Jul-04 21:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.