473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Building a Tree Control with 2 CRecordset


chankokchern wrote:
Hi,I am building a Tree control using 2 CRecordset-->m_procom &
m_prodet

I trying to get a output of this:
Deck ->from m_procom.product_com_name
deck_A ->from m_prodet.product_det_name
deck_B ->from m_prodet.product_det_name
Tendon ->from m_procom.product_com_name
ten_A ->from m_prodet.product_det_name
ten_B ->from m_prodet.product_det_name
Falsework ->from m_procom.product_com_name
false_A ->from m_prodet.product_det_name
false_B ->from m_prodet.product_det_name

source code:

Code:
--------------------
>
if (pDoc->m_procom.IsOpen())
{
while(!pDoc->m_procom.IsEOF())
{
ProCompo = m_tree.InsertItem(pDoc->m_procom.m_Product_Component_Name, 0, 0);

while(!pDoc->m_prodet.IsEOF())
{
UINT procom = pDoc->m_procom.m_Product_Component_ID; // Product Component
UINT prodet = pDoc->m_prodet.m_Product_Component_ID; // Product Detail

if(procom == prodet)
{
CString Name = pDoc->m_prodet.m_Product_Detail_Name;
m_tree.InsertItem(Name, 1, 1, ProCompo);
}
pDoc->m_prodet.MoveNext();
}
pDoc->m_procom.MoveNext();
}
}
--------------------
>
I got the output of this
Deck
Deck_A
Deck_B
Tendon
Falsework

How i do it. Pls Help!
Sorry still very new to VC++
I am using VC++ 6.0 IDE
Thanks in Advance.

Problem solved

--
chankokchern
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jan 9 '07 #1
0 977

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Max | last post by:
We want to implement assigning permissions to web pages using a tree like view. The text below illustrates what the page would look like. Each of the items in the boxes are types of permissions...
4
by: Mike van Engelen | last post by:
If I want to add a new derived class of the CRecordset type then it does not appear in the classes list, which I used to have before. The CDatabase class, for example, is available. Does anyone...
0
by: GS | last post by:
Hi Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Desktop Engine on Windows NT 5.1 (Build 2600: Dodatek Service Pack. 1)...
1
by: Jim Walsh | last post by:
I am transitioning to Visual Studio 2003 .NET. To get started, I am converting an existing application that I built using VS 6.0 C++ to C++ .NET. My application uses a CRecordset-derived class...
0
by: Senapathy | last post by:
Environment : WinXP SP2, .NET 2003 Std edition I posted a query to the group some days back asking about how to identify stack corruption / array bounds or buffer overruns using .NET compiler...
0
by: Alfonso Morra | last post by:
Hi, I am storing data in a custom format (binary files on disk). I read the data which is essentially a 2D table - similar to a Db table. My question is that, is it possible to create a...
4
by: Henry | last post by:
Does anybody have a real-world sample of buiding a treeview control using data from database tables? All the sample code I have found either builds the treeview manually or uses a file directory...
2
by: UJ | last post by:
I have an app that I've already written that works just great. It's a window's explorer like app for our data. Problem is, to build the treeview takes too long (30 secs and upward for less than...
1
by: Mike C# | last post by:
Hi all, I'm writing a little app that uses ODBC to call a SQL 2K stored procedure several times in a loop, with a different parameter each time. The SP can return no results in some instances. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.