|
SYSTEMTIME st;
GetSystemTime(&st);
- Anders
|
|
|
|
|
I had a problem with the GetSystemTime() function. When it is 4:00 pm the date changes to the next day. So i was curious if this only happens for me.
Thanks
|
|
|
|
|
I have never seen that problem...
- Anders
|
|
|
|
|
Not sure that this applies, but it may shed some light on the matter.
GetSystemTime - returns Coordinated Universal Time.
GetLocalTime - returns the local time.
Chris
|
|
|
|
|
I have two program which access the same database file. Both program are always running. When one program makes a change to one or more of the records, the other program does not know and will access information that is not there.
|
|
|
|
|
Did you find the way to solve your problem i'm with the same problem in CRecordset and i can't find the way .... if you know how to solve this i would apritiate some help in it !
by the way : how do you show all record in a list and access the record on a double click (for instance) ?
|
|
|
|
|
did you find the answer for this ??? I'm trying to get to the same result and seems that i can't do it !
I would apritiate your help if you can,
Ariel.
|
|
|
|
|
Pardon me in advance if this turns out to be a dumb question.
When and how does an entry for a doc template resource id get created?
I assume for a single document in an MDI that it was built through the info given to AppWizard when gen'ing the initial file set. But specifically, I am puzzled by the VIEWEX sample's IDR_SPLIT3TYPE. How, where and when did its string get generated and its table entry made?
DUH in advance,
Tom
|
|
|
|
|
Hi:
I have loaded and displayed an image(in bitmap format)in a dialog box, how can I print the image,(it may be a general question if you think it takes a long answer please give a reference because all I found was printing Documents, ...
thank-you
|
|
|
|
|
There is an article on doing this at www.codeguru.com, that provides a framework for printing images from a non doc/view situation.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I started writting a sequencer-demo. And there is one thing I have to ask :
Does anybody know which timer is the better selection for exact timing ?
Is it SetTimer() in combination with WM_TIMER or is it timeSetEvent() in combination with a callback function ?
Or is there even a better way that I do not know yet ?
Thanks for answers and help ... Mario ///
P.S.: I do not use MFC !
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
SetTimer and WM_TIMER are very low resolution timers. They're never any faster than 55 milliseconds and can be as much as several hundred milliseconds.
timeSetEvent is a multimedia timer, and has much much better resolution, however you are still limited by a number of factors which make reliability of timers very poor in Windows.
|
|
|
|
|
Now I found another way to implement a timer by using this functions
CreateWaitableTimer()
OpenWaitableTimer()
SetWaitableTimer()
and so on ...
I read the resolution is about 100ns. Is that true ?
In a demo-app for this kind of timer they used a while(true) loop to await a timer-message. Is this the only way to handle this timer ? And what about deadlocks ?
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Hi,
I use Visual C++ 6.0 and i need help for the following problem.
In my App, i have two command button. The first button send some instructions
like this :
bool NoData=false;
while(1)
{
.....
OpenPort(PortId); // Open a port com ( for exemple com2)
WriteFile(.......); // Write to port com
.....
if(NoData)
{
ClosePort(PortId); //Close port com
break;
}
}
While my Button 1 send theses commands, i want to use button 2 to stop
this operation before Variable NoData is true.
To do this i try to close directly port com :
ClosePort(PortId); //Close port com
But it don't work, because i can press button 2 during this operation.
Is anybody can help me How can i use two threads to do this
Thanks in advance
|
|
|
|
|
Create and Initialize cretical section,create a bool bIsCanceled= FALSE
then Create a thread function .e.g. MyTHreadCheck() (use begin thread it does not leak memory like CreatThread()).
In the cancel button clicked function
Enter Cretical section and change the the bIsCanceled flag.
in MyTHreadCheck () loop for ever , inside this loop enter cretical section and check if bIsCanceled is TRUE , if so then close the port, exit cretical section and break Loop.
Hope that will help
Like some code ??
Regards
G. Alfadhly
<marquee>
Elementary my dear Watson! elementary!
|
|
|
|
|
good morning,
i have a problem: i have written a programm which manages MS ACCESS databases. on my computer i am the administator and all is working fine. but by autheor peoples where the administrator doesnt have rights to read and write we have problems. now we think we create there a new user an give them the rights to read and write.
now i would like to know how can i set a new user in MY MFC program ( the smae we will create on the computer form the other people) which isnt equal to administartor. that means i would like to set a different user from administrator in my MFC programm to read and write from MS ACCESS databaeses. i am working with DAO and under WIN NT
thank you
greetings
|
|
|
|
|
I'm using a Singleton class for some debugging work, and I have a few DLL's supporting my application. My problem is that I have a separate instance of the Singleton for each DLL and the Application. I would like them to all use the same instance of this variable.
Is there some shared memory trick or something that I can implement to get around this?
Thanks,
Jason
|
|
|
|
|
There is an article that will provide you with a work around for your problem.
hope it will help you
"HOWTO: Alternative Implementation of ATL Singleton"
The singleton implementation in this article works around this problem by returning a marshaled pointer in IClassFactory::CreateInstance().
Famous Last Words:
"TRUCK!!!"
|
|
|
|
|
I'm using a CDaoRecordset derived class to read a DAO Access database. The problem I have is reading Access2000 databases. VC6 does not seem to like Access2000 DAO databases. In order for it to read correctly I have to save the database as a "previous version" (Access97?). Any idea how I can read a DAO Access2000 database with VC6 please?
Thanks
|
|
|
|
|
|
Thanks. I've downloaded it, and will test it soon.
|
|
|
|
|
I've downloaded the MDAC stuff and I started by trying to open my Access2000 database. Simple I thought! All I want to do is open an .mdb file! The problem is I can't seem to work out what the correct connection string is. Microsoft's example is
_bstr_t strCnn("Provider=sqloledb;Data Source=MyServer;"
"Initial Catalog=pubs;User Id=sa;Password=;");
pConnection->Open(strCnn,"","",adConnectUnspecified);
I assume my data source is "MS Access Database". What does initial catalog mean? Some other examples show a server being specified. Well I just want the open the file! It might not be on a server...
Thanks for any help at all.
|
|
|
|
|
Try this one:
"DBQ=F:\dbpath\test.mdb;DefaultDir=F:\dbpath\;Driver={Microsoft Access Driver (*.mdb)};DriverId=281;FIL=MS Access;;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;;"
it should work.
- Anders
|
|
|
|
|
Fantastic, thanks, it works!!!!!!!!!!!
|
|
|
|
|
Oops, I forgot... "initial catalog" is a database on a SQL Server...
- Anders
|
|
|
|