|
|
Great Program! I love it, exactly what I was looking for. Thanks Neville
Aidman » over and out
|
|
|
|
|
Hi,
Can anybody suggest me some code profiler which is simple to use. I just need the timing analysis of all the functions that are invoked in the project.
I am working on VC++
For eg. any command gprof in unix will suffice.
I have tried using glowcode but not so friendly and the profiler in msdev is not handy.
Please suggest.
Thanks,
Prashant
|
|
|
|
|
Hello,
how can I change the Title of an MDI-Child-Window? I tried to use SetWindowText in my "view-class" but nothing happend...?
|
|
|
|
|
This has recently been answered in this message forum. A search should find it. You need to look at CMainFrame::OnUpdateFrameTitle().
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi everybody,
I have a big problem.
I would like to execute the plink.exe (putty) program from my vc++ code.
The command line is pretty long (because of ssh tunnels definition).
My problem is that I must wait that the tunnel are established for trying a connection with my socket.
So I know how to launch an executable from a vc++ program but how can I know that the connection is ready.
I mean when I launch plink.exe the command line is unavailable for the time of the establishment of the tunnel and after the command line is available. And at this time I would be able to try my Connect from my socket.
Hope I explained well,
Rgds
Bibip
|
|
|
|
|
Does CreateProcess() and WaitForSingleObject() help?
|
|
|
|
|
Maybe but how do I use the WaitForSingleObject() for telling me that the connection is established ?
|
|
|
|
|
I was just assuming that plink was used to make the connection. If so, something like the following might work:
PROCESS_INFORMATION pi;
CreateProcess("plink.exe", ..., &pi);
WaitForSingleObject(pi.hProcess, ...);
I may be way off on this, however, as I don't fully understand your problem.
|
|
|
|
|
i want to write a simple addin for VS.NET, which comments(like //##MYNAME**NR2003##//) the selceted lines of code.
this is all finde and easy, but i have now a hughe problem:
if "selction margin" is switched on (under tools/ options/texteditor), then the addin does not work properly, when selecting code, that contents of outlined code.
when i make things like:
pTextSelection->get_CurrentLine(&lCurrLine);
pTextSelection->get_TopLine(&lTop);
pTextSelection->get_BottomLine(&lBottom);
i get only the linenumbers of the code currently visible on the screen. but i also want the numbers of the lines who are outlined!
how can i do this???? i didnt found any function!
the only function i found is the one to outline code
(->OutlineSection) but i would like to do the contrary!!!
please help me!
thanx, andreas
|
|
|
|
|
Hi
Can anybody help me solve the following problem I have.
I have the following code in my header file:
class CSQLConnection;
class SQLDocument
{
.....
private:
CSQLConnection* m_DatabaseConnection;
};
in my source file I have the following code:
#include header file
#include "SQLCOnnection.h"
m_DatabaseConnection = new CSQLConnection;
The constructor for the CSQLConnection class has been declared as public and takes no arguments.
However I get the following error message:
Kein geeigneter Standardkonstruktor verfuegbar
which I read as from the help files as saying that the is no available standard constructor for the given class.
Anybody Help!!!
|
|
|
|
|
FranzKlein wrote:
m_DatabaseConnection = new CSQLConnection;
Are you trying to instantiate a private member of SQLDocument outside the class?
That's wrong wrong wrong....
Cut that line and paste it into the SQLDocument constructor.
FranzKlein wrote:
Kein geeigneter Standardkonstruktor verfuegbar
Yes, I like my moms food too!
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
I am instantiating the private member m_DatabaseConnection inside the source file for SQLDocument.
I have also tried copying that line to inside the SQLDocument constructor but I still get the same error message.
|
|
|
|
|
Are you running VC++?
Compile, cut n' paste the error message here in a new message so I know exactly what error it is!
You can try add a constructor yourself if you hasn't.
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
I am using VC6 SP5 Professional Edition (German).
Here is the error message:;P
error C2512: 'CSQLServerConnection' : Kein geeigneter Standardkonstruktor verfuegbar
So basically in CSQLDocument.h I have written
class CSQLServerConnection;
class CSQLDocument
{
....
private:
CSQLServerConnection* m_DatabaseConnection;
};
In CSQLDocument.cpp I have written:
CSQLDocument::CSQLDocument()
{
m_DatabaseConnection = new CSQLServerConnection;
}
In the CSQLServerConnection class file there is a standard constructor.
|
|
|
|
|
FranzKlein wrote:
I am using VC6 SP5 Professional Edition (German).
Here is the error message
I thought the English edition was the only one.
Well my friend, I tried a similar code and I got C2512 too!
I would call it a bug but I'm not a C++ expert!
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
What does the CSQLConnection class look like?
|
|
|
|
|
Here are the contents of the .cpp file for the CSQLServerConnection class
#include "stdafx.h"
#include "SQLServerConnection.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
CSQLServerConnection::CSQLServerConnection()
{
}
CSQLServerConnection::~CSQLServerConnection()
{
}
bool CSQLServerConnection::Connect(string database, string host, string user, string password)
{
server_connection = new Connection(database.c_str(), host.c_str(), user.c_str(), password.c_str());
return true;
}
bool CSQLServerConnection::SQLQuery(string query, string& error_message)
{
try
{
Query thequery = server_connection->query();
thequery << query;
}
catch (BadQuery error)
{
error_message = error.error;
return false;
}
return true;
}
Here are the contents of the .h file for the CSQLServerConnection file:
#if !defined(AFX_SQLSERVERCONNECTION_H__72EDA6F0_B4A2_4B36_8353_222CCFB751AB__INCLUDED_)
#define AFX_SQLSERVERCONNECTION_H__72EDA6F0_B4A2_4B36_8353_222CCFB751AB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <string>
#include <mysql++>
using namespace std;
class CSQLServerConnection
{
public:
CSQLServerConnection();
virtual ~CSQLServerConnection();
bool Connect(string database, string host, string user, string password);
bool SQLQuery(string query, string& error_message);
private:
string database_name;
string user_name;
string query_text;
Connection* server_connection;
Result query_result;
};
#endif // !defined(AFX_SQLSERVERCONNECTION_H__72EDA6F0_B4A2_4B36_8353_222CCFB751AB__INCLUDED_)
|
|
|
|
|
Yes, but what about the CSQLConnection class?
|
|
|
|
|
I renamed the CSQLConnection class to CSQLServerConnection. All other references to CSQLConnection have also been changed to CSQLServerConnection. I think the problem might lie with me using the Halcon Imaging Library (www.mvtec.com).
So in the Document class header file (SQLDocument.h) I have:
class SQLDocument
{
.....
private: CSQLServerConnection* m_DatabaseConnection;
};
and in the implementation file (SQLDocument.cpp) I have:
#include "SQLDocument.h"
#include "SQLServerConnection.h"
<p>
SQLDocument::SQLDOcument()
{
m_DatabaseConnection = new CSQLServerConnection;
}
On my other computer I have swapped the #include statements around in the implementation file:
#include "SQLServerConnection.h"
#include "SQLDocument.h"
Now I don't get any error messages, but then I am not using the Halcon Imaging Library.
|
|
|
|
|
Say we have this Matlab piece of code
nr_of_samples = 10000;
y(1:nr_of_samples) = y_long(1:nr_of_samples);
samplingtime = 1/52e6;
for i=1:nr_of_samples
t(i) = (samplingtime)*i;
end;
I would like to rewrite such a code in VC++. How do I proceed?
Plz do not advise me to use Matlab compiler!
Thx
F.K
|
|
|
|
|
well i could probably help you out a bit but i don't know Matlab. What does this mean in plain english:
flora_k wrote:
y(1:nr_of_samples) = y_long(1:nr_of_samples);
And what is t(i)? Is that some form of plot? If you just want values for a calculation the bulk of the code would look something like:
int nNrOfSamples = 10000;
float fSampling = .00000001923;
float t[ 10000 ];
for( int i = 0; i < nNrOfSamples; i++ )
t[ i ] = fSampling * i;
The above will store your values in an array t. If you are actually looking to plot those values on a graph you have a lot of work ahead of you unless you decide to buy a commerical ( or find a free ) charting package. If you let me know what that one line means i should be able to tell you how to convert it.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Try this:
flora_k wrote:
nr_of_samples = 10000
int nrOfSamples=10000;
flora_k wrote:
y(1:nr_of_samples) = y_long(1:nr_of_samples);
for(int i=0;i<nrOfSamples;i++)
{
y[i]=ylong[i];//you have to declare what type of arrays are y and ylong
}
flora_k wrote:
samplingtime = 1/52e6;
float fSamplingTime = .00000001923;
flora_k wrote:
for i=1:nr_of_samples
t(i) = (samplingtime)*i;//you have to declare the type of array of t
end;
for(i=0;i<nrOfSamples;i++)
{
t[i]=fSamplingTime*i;
}
cheers
Daniel Cespedes Daza
"Santa Cruz de la Sierra Paraiso Terrenal!"
daniel.cespedes@ieee.org
|
|
|
|
|
Hi,
I need to send some data from one application to another(MFC).can anybody tell me what is the best way to do it.I may need to invoke a function of one application from another,or i may use any other method to send a buffer across apllication.
Can anybody help me regarding this.
I badly need it.
|
|
|
|
|
Window messages?
Define your custom message and handle it in your app. Use SendMessage() to send your data!
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|