|
In all applications; by double clicking the tree will be expanded. You can create a context menu with a button as delete. on righ clicking on the tree or item invoke the context menu and click the delete button to delete the item.
Regards,
Syam
|
|
|
|
|
I ran into this issue about a year ago and the issue is exactly what Michael Dunn stated.
And I fixed the problem the same way suggested by syampi.
|
|
|
|
|
Not able to access child dialog object, Assert Error..
//Pointers to dialogs
CDialog * pCMyApp;
CDialog * pCChildDialogs[5]; //array of dialogs
.
.
.
void CMyApp::function()
{
//trying to SetWindowText to one of the child dialogs objects.
pCChildDialog[0]->GetDialogItem(IDC_STATIC1)->SetWindowText(mystring); //MVS2005 intelliSense shows this path ok
}
Other functions "PCChildDialog[N]->???" seem to work fine within this CMyApp function.
But in this situation I get an Assert Error..
and it drops me off here
void CWnd::SetWindowsText(LPCTSTR lpszString)
{
......
ENSURE(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL)); <------------
|
|
|
|
|
Hehe, go figure.. get stumped on something for hours and figure it out only seconds after writing a post..
pCChildDialog[0]->SetDlgItemTextW(IDC_STATIC1, mystring); //This fixed it
|
|
|
|
|
Hey fellas..
Need a lil help..
I am starting up with a application of cryptography and steganography. But i am lil confused like which language to use. I have option to do it in C++(borland), C++.NET OR C#.NET. Not VC++...
All depends in which language would i get more reference over the net and more help.
Can C#.NET perform all the tasks that C++ can. I want to know it now so that i dont end up in a mess. As in stego i want to use carriers like .mp3, .jpeg, .pdf etc. So would that be fine with C#.NET.
Any suggestions are welcome...
Thanks a lot
|
|
|
|
|
I recommend you to:
1) write a brief design-document for the application you wish to write;
2) while writing, decide what components you will require (cryptography, compression, etc.)
3) search google/yahoo/whatever for that component. The first programming language to have all components you need written - that is your choice.
But at first, look at your programming skills.
-------------------------
Don't worry, be happy )
|
|
|
|
|
Hello everybody, I'm writing a program to take the contents for several .txt files and make them into one single .txt file. The separate txt files have to go in the single file at a certain order.
The problem with the code (see below) is that when I call getline(file,bline), bline is left empty after the call I don't understand what could be the problem. The file opens properly according to file.is_open but getline doesn't read. Here is the code:
<br />
<br />
fstream file;<br />
<br />
string bline;<br />
int i,j;<br />
<br />
<br />
string month[]={"01","02","03","04","05","06","07","08","09","10","11","12"};
string year[]={"1999","2000","2001","2002","2003","2004","2005","2006"};
<br />
for(j=0;j<=7;j++)<br />
for(i=0;i<=11;i++)<br />
{<br />
string fname="E:\\Month\\"+month[i]+"_"+year[j]+".txt";<br />
<br />
file.open(fname.c_str());<br />
if(file.is_open()){<br />
<br />
while(!file.eof()){<br />
ofstream ofile;<br />
ofile.open("C://allfile.txt",ios::app);<br />
getline(file,bline);<br />
ofile<<year[j]<<'\t'<<month[i]<<'\t'<<bline<<endl;<br />
}<br />
<br />
cout<<"Finished month "<<i+1<<" year "<<j+1999<<endl;<br />
<br />
}<br />
else<br />
cout<<"Cant open file"<<endl;<br />
<br />
<br />
}<br />
|
|
|
|
|
if you need to concatenate all the files, why do you read line by line ?
just read the entier file...
|
|
|
|
|
The files are huge... approx 9mb
|
|
|
|
|
that's ok you know. now constructors provide 1GB RAM
but if you think reading 10MB in one run is two much, you could always read by packets of 1 or 2 MB, without caring too much of the file contents... (because at last, all the characters will be moved)
|
|
|
|
|
Try something like this:
========================
// Console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream> // For "cout" and "cerr".
#include <fstream> // For "ofstream" and "ifstream"
#include <string> // For "string"
#include <cstddef> // For "size_t"
int main()
{
using namespace std;
// Open the output file.
ofstream outFile("C://allfile.txt");
if (!outFile)
{
cerr << "Failed to open output file!" << endl;
return 1;
}
static const string months[] = {"01","02","03","04","05","06","07","08","09","10","11","12"}; // these are all the months in the files
static const string years[] = {"1999","2000","2001","2002","2003","2004","2005","2006"}; // and these are all the years
for (size_t m=0; m<sizeof(months)/sizeof(months[0]); ++m)
{
for (size_t y=0; y<sizeof(years)/sizeof(years[0]); ++y)
{
// Build the filename.
string fname = "E:\\Month\\" + months[m] + "_" + years[y] + ".txt";
// Attempt to open the input file.
ifstream inFile(fname.c_str());
if (inFile)
{
// We opened it so append it the the output file.
cout << "Appending '" << fname << "'..." << endl;
outFile << inFile.rdbuf();
}
else
{
// We failed to open it.
cout << "File '" << fname << "' not found!" << endl;
}
}
}
return 0;
}
Steve
|
|
|
|
|
stephen please, don't forget the <pre> tags
|
|
|
|
|
I used the "Ignore HTML tags in this message (good for code snippets)" option. There's no need for <pre> tags when this is selected. I can't see anything missing.
Steve
|
|
|
|
|
............
...........
else
cout<<"Cant open file"<
|
|
|
|
|
Is there a way to save and import components (.ogx files) in VS 2005 like there was in VC++6.0?
What I need is to transfer a dialog in VS2005 to a VC6.0 project.
Any help is appreciated.
Thanks
Dave
I'm pretty sure I would not like to live in a world in which I would never be offended.
I am absolutely certain I don't want to live in a world in which you would never be offended.
Dave
|
|
|
|
|
No component gallery om vc2005 (it was removed since vc2002).
To copy dialogs, copy the vc6 dialog part from resource file (.rc) into vc2005 resource file..
--
======
Arman
|
|
|
|
|
I need to access windows user account properties.
What I want to do is,
Whether a user account is part of,
a. local administrator
b. domain administrator
c. exchange administrator
d. local user
e. domain user
Apart from this I want to also display
a. local GPO(Group policy setting)
b. domain policy setting
c. security policy setting
d. domain controller policy setting
I want to get a windows user account name and display what properties and what GPO policy setting it has?
I tried using LDAP, ADSI, LSA, but could not get all these rights!
Please advise!
Ramesh
|
|
|
|
|
|
hello,
Suppose I am developing an application in VC++ which helps in modifying data in excel.
For doing so I use COM components to get connected to excel and add a sheet etc.
But Suppose I have written a program in VC++ which uses pointers and I want to use the program in VB then will I be able to run my methods written in VC++ from VB
Prithaa
|
|
|
|
|
If your VC++ app is a COM server then you can access from VB.
Cheers,
Suresh
|
|
|
|
|
Hello,
Thanks for your reply.
But even if VB does not support pointers and references can I use COM. I don't know whether VB supports pointers .But if it doesn't then in my COM classes I should not use pointers.Is it?
Prithaa
|
|
|
|
|
VB doesnt support Pointer, however you can use COMponents which use pointers in their code.
As we all know COM is a binary standard, you are basically re-using the binary code not the C++ source code.
Cheers,
Suresh
|
|
|
|
|
Hello,
Thanks for your reply.
Is there any link to elaborate your point.
I have sort of undestood.
Prithaa
|
|
|
|
|
|
Hi, I currently have bitmaps coming in as files from a usb input and I'm wondering what library is suitable for displaying the bitmaps into a video. If so can someone point me in the right direction?
Thanks
|
|
|
|