|
homework ?!
do it your self !!!
we are here to help, no to do your job...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
You are allowed to define additional helper functions, member functions or otherwise ;);P
|
|
|
|
|
I'm using _spawnl to launch an external application. This works very well. But when I call _spawnl from within a thread created with AfxBeginThread, the program crashes.
What's the catch here?
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Use CreateProcess() or ShellExecute() in Win32.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
can you paste the line which uses _spawnl(), over here.
suhredayan There is no spoon.
|
|
|
|
|
Currently I have a dialog based application that closes automatically if the user hits the "return" key. How do i disable this?
|
|
|
|
|
|
If I disable the OnOK and OnCancel, how can I close the app when a user clicks on the "x" from the system menu or selects the File Ext command?
|
|
|
|
|
JKallen wrote:
If I disable the OnOK and OnCancel, how can I close the app when a user clicks on the "x" from the system menu or selects the File Ext command?
http://blog.voidnish.com/index.php?p=31[^]
|
|
|
|
|
Hey all,
I have been trying to get this to work for a solid week now and I cannot seem to do it. I've used CSpreadsheet from here, but it doesn't work right, so I decided to do my own CDatabase attempt at it in order to debug.
I am doing
strConnection.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s","Microsoft Excel Driver (*.xls)", "c:\\test.xls", "c:\\test.xls");
then...
myDB.OpenEx(strConnection,CDatabase::noOdbcDialog);
sqlString.Format("SELECT * FROM [Sheet1$]");
while (!recset.IsEOF()) {
recset.GetFieldValue(6,sValue);
MessageBox(sValue);
recset.MoveNext();
}
What is happening is that it is returning all of the values, except straight number/currency fields in that row. (If I designate the row as "Text" and put 1000 in there, it will not show it in the msgbox (its blank). If I put D1000 (a letter in there), it shows D1000 in the msgbox.)
The CSpreadsheet class that is posted on this website does the same thing. For some reason the Microsoft Excel Driver / SQL statement is not getting number values and I cannot for the life of me figure out why. I've been reading for 3 hours straight and am so burnt out and would appreciate it if someone could shed some light on this
THX!
|
|
|
|
|
This code snippet worked for me:
CString strConnection,
strSQL,
strTemp;
CDatabase myDB;
CRecordset recset(&myDB);
CDBVariant sValue;
strConnection.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s",
"Microsoft Excel Driver (*.xls)",
"c:\\Book1.xls",
"c:\\Book1.xls");
myDB.OpenEx(strConnection,CDatabase::noOdbcDialog);
strSQL.Format("SELECT * FROM [Sheet1$]");
recset.Open(CRecordset::forwardOnly, strSQL, CRecordset::readOnly);
while (! recset.IsEOF())
{
recset.GetFieldValue((short) 0, sValue);
strTemp.Format("%f", sValue.m_dblVal);
AfxMessageBox(strTemp);
recset.MoveNext();
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have a pull-down list that opens up each child window using the CMultiDocTemplate::OpenDocumentFile() function. Some windows become hidden when another is active so I'd like to bring the window to the top when the user selects it from the pull-down list. Here's some of the code I have:
void Fruits::OnSelchange()
{
switch (m_fruits.GetCurSel())
{
case 0 : //apple
if (!pAppleTemplate)
{
pAppleTemplatee = new CMultiDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMPSDoc),
RUNTIME_CLASS(CMDIChildWnd),
RUNTIME_CLASS(CApple));
pAppleTemplate->OpenDocumentFile(NULL);
}
else //if already open, make active
<-----code to activate window----->
break;
case 1 :
if (!pBananaTemplate)
{
pBananaTemplate= new CMultiDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMPSDoc),
RUNTIME_CLASS(CMDIChildWnd),
RUNTIME_CLASS(CBanana));
pBananaTemplate->OpenDocumentFile(NULL);
}
else
<----code to activate window---->
break;
}
Any help would be much appreciated. Thanks!
|
|
|
|
|
Currently I am using the DAO SetFieldValue()/GetFieldValue using COleVariant in my MFC OCX to set fields in an access table that accept data types such as string, numbers, currency, etc. How do I set or embbed a field with its data type defined as "OLE object" such as a word docuument or an excel worksheet in an access table design view? Any help would be appreciated.
|
|
|
|
|
I'm building a normal set of .h and .cpp code files using VAC++ 6.0 with all the latest fix packs installed.
I've run into a real progress stumper. The code compiles fine but when I try to run a test the items declared in the .h file are not found in the .cpp file. I've compared the settings to many other projects that work fine and I've never seen this type of problem before. Suggestions?
class CSapRfc // .h file down to minimum
{
public:...
private:...
bool bSapFunctionsAdded; // Easy enough to declare
};
bool CSapRfc::OnLogon() // .cpp file down to minimum
{
bSapFunctionsAdded = false; // this statement blows up!
}
Ken
|
|
|
|
|
What's the error message you are getting about that line?
|
|
|
|
|
Thank you for the response and question. However, I resolved it this morning by changeing from CSapRfc mSapRfc; to CSapRfc * new = CSapRfc; and associated changes. I suppose that is what I get from trying to work with a recent brain injury. Makes things much more difficult to see side issues.
ken
|
|
|
|
|
I was wondering if there was a way to scan for active IPs on a network. Thanks.
|
|
|
|
|
check NetServerEnum(), It can give the list of all workstations, if that is wot you are looking for.
suhredayan There is no spoon.
|
|
|
|
|
why don't you try in destructor of CPropertySheet
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Thanks, I figured out my own way to scan. It is not the best, but it works for me.
|
|
|
|
|
I begun programming...
And now should create somekind of addressbook...
I made some databases for it...
And now should get databases on grid...
But when I try to add "Microsoft FlexGrid..."
It gives some error about "...it requires design-license"
Someone help me!
:: Studing C++ ::
|
|
|
|
|
I'm looking for a few good web sites or books to teach me Straight C. Also I'm looking for a C compiler. I know VC++ can compile C with the /Za option, and Dev-C++ can too, but they all see to be missing headers like <sys/sockets.h> and functions like getwd in <unistd.h>.
Thank you in advance.
|
|
|
|
|
What do you mean by "Straight C?" Perhaps this book or this Web site would be helpful.
KingKruncher wrote:
...but they all see to be missing headers like <sys/sockets.h> and functions like getwd...
ANSI C knows nothing of sockets or file I/O.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
Hi don't know is here proper place for this kinde of question.But any
help please.I want to write in cell of excel file this string "000001"
exactly as shown with all precided zeros, but when i use method
Excel::Range::PutValue(VARIANT val) - one automatically reduced prefixes zeros
and finaly i had in cell only "1".How can i avoid this.
Help please.
|
|
|
|