|
|
Can anyone suggest a way to update an Edit box at run time while in a loop. I've tried using a declared CString variable and updatedata as well as directly updating the control with SetDlgItemText, but neither one update in real time, until the loop finishes execution.
Thanks
TDM
|
|
|
|
|
Painting is a deferred operation in Windows; WM_PAINT messages are only generated for your windows when the message queue is otherwise idle.
To force a repaint of a window immediately, call UpdateWindow .
|
|
|
|
|
Have you tried creating a thread, and passing the address of your variable control to it? If the contents of your edit box need to be changed as a result of something in your loop, you might be able to use CSemaphores to lock the thread until it needs to update the control, and unlock it from your loop. Just a thought, good luck.
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
After a few hours of frustrated searching, I have YET to discover whether or not or where Windows stores it's most recent boot time!! I am assuming it must be stored SOMEWHERE in the registry, but I haven't been able to find it thus far. Anyone know where I could find this information, assuming it exists?
|
|
|
|
|
GetTickCount() / 1000 = seconds since system boot
Don't try it, just do it!
|
|
|
|
|
Great suggestion!! Thanks a lot.
|
|
|
|
|
From the documentation for GetTickCount :
To obtain the time elapsed since the computer was started, retrieve the System Up Time counter in the performance data in the registry key HKEY_PERFORMANCE_DATA . The value returned is an 8-byte value. For more information, see Performance Monitoring[^].
|
|
|
|
|
HKEY_PERFORMANCE_DATA does only exist under windows Nt/2k/xp and this way is much more complicated!
Don't try it, just do it!
|
|
|
|
|
Yes, but it doesn't wrap around after 49 days.
|
|
|
|
|
Thanks, I've seen some of the documentation for Performance Monitoring, but true to Microsoft form, there isn't a simple way to do what I want that is OBVIOUS to find (hello, MS documentors, you reading this? Probably not....)
Between the two suggestions, I've got enough to work on.
Thanks.
J
|
|
|
|
|
I have been trying to create the world's simplest ODBC database application accessing to an Oracle database. I am using VC++.Net. The problem occurred when I clicked at the Finish button. Options selected: SDI, Database view without file support, no compound document support. And at Database Support, I leave bind all columns checked.
Here is the error message:
Microsoft Development Environment
Error occurred while converting the wizard's text to the code page of the existing text in the file: C:\Excercise\db4\db4Set.h
Please help. I can not go any further until this is resolved.
Eilzabeth
|
|
|
|
|
1 point for repeating a post!
Don't try it, just do it!
|
|
|
|
|
I have been waiting for someone to respond. It seems to be a common problem that I can not even create a simple application from the wizard.
Eilzabeth
|
|
|
|
|
"code page of the existing text "
Not sure of this. But is it the language setting problem? I see this code page setting in *.rc. When having the VC 6.0 project to be run on different language version OS. This problem oftenly occurs. The VC IDE will automatically convert your project setting to different language pack based on your OS.
Hope this helps.
|
|
|
|
|
I have Windows XP. The application I was trying to create was a brand new simple MFC ODBC application using VC++.NET to display some fields in an Oracle database. I accepted all the default from the wizard.
You mentioned about Languge setting. Before a project is even built, how can I get to the Language setting page?
Eilzabeth
|
|
|
|
|
Okay, below are some of my suggest inspections.
1. Check your Window XP language setting.Go to your control panel - Regional Options. Check your present OS locale (in the combo box) I do not have Win XP installed in my office. I am using Win 2k but I think should be more or less the same.
2. Check your MFC resource setting.
-Start your new MFC ODBC project using VC.NET. Check your Resource language in your Application Type.
Actually, you do not need to start up an entirely new project for this. When you have your project started, you can check your resource language in configuration pages - Resources - General - Culture.
3. Check your Oracle Server Language Setting. You can check it in your Oracle DBA Studio.
Hope this helps.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I have English (United States) on both my Windows XP desktop and the MFC resource setting Resources - General Culture. I did not check the Oracle server. However, I created an exact application in Visual Studio VC++ and did not receive any problem. In fact, there has not been any database application problem with the Visual Studio version.
Eilzabeth
|
|
|
|
|
There is one more thing I want to share with you. db4Set.h file is empty.
Eilzabeth
|
|
|
|
|
Okay. I had not tried it out myself but I suspect it could be VC.NET wizard's bug. You could try to post your problem to Ms and wait for their reply but probably take some time. Do you know that Visual C++.Net will no longer supporting MFC in the future?
my suggestion to your problem.
1. The Visual C++ 6.0 project is compatible to Visual C++.Net with it IJW.
So, I suggest you to create your project in Visual C++ 6.0 and use Visual C++.Net to convert it into VC.Net project (Don't worry, everything is automatic here). This should work. There are some dedicated articles for IJW by Nishant if you like to check it out.
2. Why not to use ADO.Net in Managed C++?
http://www.codeproject.com/managedcpp/adonet_mcpp.asp[^]
Afterall, Visual C++.Net is meant for Managed World.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I will post one up in the Microsoft website (will have to find out how).
I can create one in VC and convert it to VC.NET, but I will not able to add CRecordSet classes from VC.NET. I can get the same error message.
I have learned that ADO.NET is a better solution, but I do not get it still. I have been enjoying using MFC ODBC. It is simple and easy in doing data mapping.
By the way, you said VC.NET will no longer supporting MFC in the future? Why not? It has been a great tool for me. I have not tried anything else.
Eilzabeth
|
|
|
|
|
I can create one in VC and convert it to VC.NET, but I will not able to add CRecordSet classes from VC.NET. I can get the same error message.
I think you need to write the CRecordset codes yourself. It is not that difficult actually.
I have learned that ADO.NET is a better solution, but I do not get it still. I have been enjoying using MFC ODBC. It is simple and easy in doing data mapping.
I guess this is your own choice for you to decide. To be frank. VC++.Net do not have that much of facilities in writing codes if were to compare to C# or VB.Net in Visual Studio .NET.
By the way, you said VC.NET will no longer supporting MFC in the future? Why not? It has been a great tool for me. I have not tried anything else
Part of Ms strategy. They are pushing .NET. Of course not immediate having to know there are still many MFC developers out there but will be soon (don't ask me when. Ask Ms).
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Thank you very much for sharing your experience with me. For my own benefits as a programmer, I should start writing my own code instead of depending on a an application wizard.
Eilzabeth
|
|
|
|
|
I need to extract multiple items from a CComboBox and stick them in an array. How do I do the extraction? I believe that by pressing down the ctrl key will select the items, but how to I implement the extraction? Thx,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
GetLBText method retrieves the string chosen by the combobox!
Don't try it, just do it!
|
|
|
|