|
Hi,
I´m taking a look at CComControlBase::IDataObject_GetData
and... it uses the old Metafile 16 Bits !, it doesn´t use Enhanced Metafiles ( the standard for Win 9x, NT, 200, XP...).
Why ?????, legacy sh*t ? for what ?
|
|
|
|
|
i would like to know if there is any help in the remote desktop sharing in visual c++ .
Work Hard and Test your Luck
|
|
|
|
|
i want to my server application in background without concering who is logon to machine. how can i make it
Work Hard and Test your Luck
|
|
|
|
|
If you are using an OS that's based on NT you can make it a service and install it ... on an Win9x system you can make the an aplication that have no visible window ( the WS_SHOW style of the main window is not set ) and put that aplication in 'StartUp'
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
|
Hi,
In a nutshell: If i kill an MFC+DAO based server application while it is updating records using ctrl-c, the application exits and the database shows 0 records even though, 2 seconds ago, DaoRecordset::RecordCount() was returning 1000.
It listens for messages on a socket and updates a RecordSet in table "CallLog".
During update, I can see that RecordSet_for_CallLog.GetRecordCount() returns 10, 11 & 12 etc. records as messages are received over the socket, parsed and updated in the dbase.
The problem occurs when I close the application midway while it is updating the Recordset. I can see that previous calls to GetRecordCount() were returning 10, 11, 12 etc. but when I open the database file in MS Access, there are no records in the table CallLog.
If I open the file in Notepad, I can see the Record data in a jumbled form somewhere. So I guess, for some reason, MS Access garbles up the file while exiting, can someone tell me why? I need to handle this to avoid accidental failure.
The main class is not derived from CWinApp. I call the constructor and methods directly in _tmain(). I made the application using the "Win32 Console Application" option in the New project Wizard and later checked the option for MFC support.
|
|
|
|
|
Not sure if you know this already or not, so please forgive me if it is obvious. Try calling the CDaoWorkspace::RepairDatabase function. Set up a CDaoWorkspace with your database, then call the function. I believe this will fix your problem. The other way I can think of is it to make a copy of the database (use the compactdatabase function of CDaoWorkspace), set a flag, then if the update is successful reset the flag. If the machine crashes, it will check that flag, and if set will erase the old database and replace it with the new. These only work with Jet databases, but you mentioned access so I assume they are always Jet databases
|
|
|
|
|
Hello, thanx for the info.
I tried repairing the database thru the API as well the Tools->Database Utilities->Compact & Repair, neither is any good.
Thanx for Tip 2, but that is good for checking AFTER the program, i need to make sure the data is not corrupted before this happens.
This only happens when I close the application while it is listening to msgs over a TCP socket AND updating the database. If i close the sender first and close this receiver application everything is fine, otherwise, the table is empty.
there was an exception in CDAOCore.cpp earlier at Line 39, but that was supposed to be a bug in MFC and I fixed it by compiling the code with MFC statically.
i have been programming for a long time but this has really got me in a fix, i cannot see a pattern here at all.
|
|
|
|
|
The update occurs in a transaction. If the transaction is interupted before completion, it is rollbacked.
Signature space for rent. Apply Within.
|
|
|
|
|
Hi there, i'm new at programming. here what i'm trying to do is make a list of object and their color and i would have a dialog box or something ? and you just have to enter a word (object name) and its property (color) would come up.
just like an address book. but the thing i have no idea how to do that or where to start? is it with dialog box and list box? or with MDI ?
any help would be appreciate. or example would be great.
thank you
|
|
|
|
|
You probably want a dialog box with a listbox in it. searching a listbox is not so easy, although I think CP has a listbox that provides iterators, which means you can use std algorithms on it.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
look at articles that describe mfc applications ( dialog based ).
Aizik Yair
Software Engineer
|
|
|
|
|
I create word.application object and create a document. add content to the docuemtn and save the document. All this is done in the VC++ application. And the doc is opened with the word application. now if my main VC++ app is exited...it looks like it's exited but the exe is still running in the task manager.
I create tables in the word docuement.
Any ideas why it's happening.
muddu
|
|
|
|
|
Hey I have noticed a similar problem.
Anyway I double checked if I released all the
references and then MS Word appeared to exit
properly.
|
|
|
|
|
could you give me an example?
|
|
|
|
|
My doing job is to receive mail from a remote exchange server with multi users account. I have these users' name and password, but I don't know how can I get their letters through simple MAPI.
My OS is win2000 professional. I have an exchange server in the network. And I logged into win2000 with my own account. I don't know if I had to log into my OS with some special account.
Could anyone help me? Whoever you are, Thanks a lot.
|
|
|
|
|
If it's a POP server, you can POP their mails out. There are some POP3 implementation classes here on CP
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I've seen that article, but some matters puzzled me.
1. I'd like to get multi users' letters. What I've know is: their account name, their password, the exchange server name. But In the article, he tolds me to use profile to logon. I've seen MSDN for help, but till now I couldn't generate a profile by the information I've got.
2. I'd like to have the same performance just like the OUTLOOK. Hum... I mean, my boss asked me to do so. He want me to receive and send letters with my application and have the same effect as OUTLOOK. And my changes through my application could be seen while using OUTLOOK.
Can some one refer some way or some books to me?
Thanks.
|
|
|
|
|
How can I show a modeless dialog in a separate thread ?
Ex: I wrote a app as dialog, let's call it CMyProgDlg
I have a button, whenever I press at that button, it calls a function( let's call it
static void Thread(LPVOID lParam)
This function shows a modeless dialog. This modeless dialog run in a thread. I tried AfxBeginThread(Thread, this) in CMyProgDlg, but it failed.
Anyway ?
Thanks
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
You don't really need to create a modeless dialog using a separate thread because the parent dialog or window is still accesible and can process messages.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
You've got it backwards. Assuming you really do need a thread -- have the modeless dialog create, control, and abide by the thread, instead of the other way around.
Regards, Larry Antram
Stardust Software
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones."
-- Albert Einstein
|
|
|
|
|
I'm trying to read the contents of a text file, then put it in an Edit control using SetDlgItemText(). I'm using CStdioFile::ReadString(CString), but that only reads the first string of the file. I'm kind of new to Win32 and MFC, so I'm not sure how to read the entire contents. Any help would be appreciated.
Thanks, Emearg.
|
|
|
|
|
Did you try calling ReadString until it returns NULL? It doesn't actually say to do this in the documentation, but it will probably work. Otherwise look at CFile.
Like it or not, I'm right.
|
|
|
|
|
Alright...
I declared a bool variable called 'done', and tried to use it in a loop like this:
while(!done)
{
if(File.ReadString(LogString) == FALSE)
done = true;
}
I did false because CStdioFile::ReadString returns BOOL types.
That should work, but it doesn't. When I click the button that calls the function that snippet is in it doesn't do anything. If I put just a simple call to the ReadSting() function then it reads the first string.. but that loops makes it read nothing... I dunno what's wrong. =/
thanks, emearg
|
|
|
|