|
From your question it sounds like you don't have much experience with C++ or MFC.
Perhaps you should gain some more confidence before tackling this job.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Maybe you can use Audio Mixers[^]
FWIW - Definitely the worst API I've ever used....even more fun on Vista
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
i have stored dates in MS ACCESS file
field name is DATE and formate is mm/dd/yyyy
now i want to retirve date from database using vc++
and want to convert date in any other formate
plzzz helppp
|
|
|
|
|
|
i have create connectiong with MS Access database
i know how to retrive/save text vlues from/to table feilds of MS DataBase
but i am unable to get date and convert its formate
for text geting text values from feilds i am using following code:
CDaoDatabase db;
CDaoRecordset recset(&db);
db.Open("patient.mdb");
Sql = "SELECT * FROM patient WHERE (LastName LIKE '"+temp+"*')";
recset.Open(AFX_DAO_USE_DEFAULT_TYPE,Sql,NULL);
while(!recset.IsEOF())
{
recset.GetFieldValue("lastname",var);
Client = (LPCSTR)var.pbstrVal;
b->AddString(Client);
recset.MoveNext();
}
|
|
|
|
|
how can i suspend a thread from some other thread ,i used SuspendThread method but it has no effect .
|
|
|
|
|
Don't use SuspendThread . See here[^] for details.
Steve
|
|
|
|
|
SuspendThread might be failing with an error.
Put this line of code directly after the call to SuspendThread:
DWORD Error = GetLastError();
Then, inspect the Error value to learn what Win32 error occured.
You can look up the error code in the program "errlook" provided with the platform SDK.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
In addition to Stephen's reply, you can read about the same problem here[^].
The only sane place to suspend a thread is from the thread itself.
Use may use an event or a volatile declared boolean, or a user message if it's a UI-thread, to instruct the thread to suspend itself.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
you can use AfxEndThread()
or
KillThread()
or you can send a notification to a thread to exit
|
|
|
|
|
Hi guys
Does anybody know what the equivalent of ldexpl() is in C#.Net?
Any pointers would be appreciated.
Thanks.
|
|
|
|
|
You might try asking in the C# forum.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Hi i have one doubt regarding how to generate XML file output for example;
main()
{
int Array_sample[];
for(int i=0;i<=10;i++)
{
Array_sample[i]=i;
std::cout<<Array_sample[i]<<std::endl;
}
return 0;
}
Thanks and Regards
Nisha
|
|
|
|
|
#include <iostream>
#include <c++/3.4.5/fstream>
using namespace std;
int main()
{
int Array_sample[10];
fstream myOutput;
myOutput.open("test.xml", fstream::out);
myOutput<<"<?xml version=\"1.0\" encoding=\"Windows-1252\"?>"<<endl;
myOutput<<"<numbers>"<<endl;
for(int i=0;i<=10;i++)
{
Array_sample[i]=i;
myOutput<<"\t<item>"<<Array_sample[i]<<"</item>"<<endl;
}
myOutput<<"</numbers>"<<endl;
myOutput.close();
return 0;
}
[EDIT:] screwed-up the quotation marks. They're fixed now.
|
|
|
|
|
you are simply writing in console print XML senerio ...i want to generate one external XML file
|
|
|
|
|
No .. he is actually writing to a "test.xml" file.. not stdout
myOutput.open("test.xml", fstream::out);
regards
Fratelli
|
|
|
|
|
I'd normally be more polite, but you sir nisha0000, are a donkey!
It creates test.xml as it's output. For ****'s sake - try actually compiling it.
|
|
|
|
|
how to check date formate in vc++
how to set date formate in vc++
|
|
|
|
|
ani_ikram wrote: how to check date formate in vc++
GetDateFormat()
ani_ikram wrote: how to set date formate in vc++
Something like this:
CDateTimeCtrl* pCtrl = (CDateTimeCtrl*) GetDlgItem(IDC_DATETIMEPICKER1);
ASSERT(pCtrl != NULL);
pCtrl->SetFormat(_T("MM-dd-yy"));
//Also check COleDateTime::SetFormat
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
i have stored dates in MS ACCESS file
field name is DATE and formate is mm/dd/yyyy
now i want to retirve date from database using vc++
and want to convert date in any other formate
plzzz helppp
|
|
|
|
|
CTime tmObj = pCQScanData->GetTime();
sprintf_s(szTime, "%02d:%02d:%02d",
tmObj.GetHour(), tmObj.GetMinute(), tmObj.GetSecond() );
|
|
|
|
|
See this article. Date fields are extracted from an Access database and then formatted for display.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
why is this voted down?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
just to say thanks to ur respons
but problem is to get date from database (ms access)
i know how to get text data from database using vc++
|
|
|
|
|
And to say thanks you vote down??? (1 is a "bad answer" and 5 a "good one")
Then I don't want to imagine what you will give when you get mad because of an answer like mine now :P
(I am prepared for the worst )
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|