|
Well I use Access 2000 to create mdb files for my database programs.
The best and fastest way is to write a base code for it and than use it in all of your new databse programs!
You may also use access 2000 to create access 97 files by converting it!
Well... I am a beginner ...
|
|
|
|
|
Creating ".mdb" files is not the problem (well, that's not 100% true, because it does contribute to the problem, be it a small part). The problem lies in creating an application using AppWizard, if the application you're about to create will be using database, and that database turns out to be Access 2000. That's the problem!!
Microsoft put the brakes on people from using AppWizard in creating database application who will be using Access 2K. This they did by NOT updating the Wizard to the new Jet Engine that Access 2K requires. If you're using Access 97, you're safe; the wizard will support that with the old version of the Jet Engine.
The reason behind this? Microsoft wants ADO to be the new way to go (either that or OLE DB) for those who want to stick with Access.
William
Fortes in fide et opere!
|
|
|
|
|
Perhaps I don't understand your problem, but the only thing I had to do when changing to Access2k with my database (DAO) application was to call
AfxGetModuleState()->m_dwVersion = 0x0601;
before calling
AfxDaoInit().
That works fine if you have MFC a as shared dll. If you want to link MFC statically you have to change some lines in some MFC file (i think daocore.cpp) and recompile it, but it's described somewhere in MSDN.
Binding an Access2k table to a CDaoRecordset class does not work with the class wizard, thats right. But I use Access97 tables for binding the first time and further changes can be done manually.
MS
|
|
|
|
|
All that you've said is true (and I fully agree with them all), from the use of calling AfxGetModuleState() to the use of Access97 for binding the first time.
The situations I'm facing are:
1) I don't have Access97 to use for that first time binding. (I have Access 2K.)
2) I am trying to create an MDI application and I don't have an old MDI DAO program which I can cannibalize to obtain the sort of binding I would be needing.
========================
So far, after a lot of trials and errors (plural), the nearest I've come to AppWizard delivering something closest to what I'm looking for, is to specify to it that I'll be using CFormView as the base class for my view. NO LUCK when it came to have it provide a CDaoDatabase class, or anything close to it from which I could derive my database. Document class I got, but nothing else. (I even tried inserting my own database class and derived it from CDaoDatabase, but that didn't work either. It seemed it needed that early binding when the program was created for it to interface with the database.)
The frustrating thing about all these exercises (meaning, the trials and errors), is that you waste more time trying to get to the point of finding something from which you can begin doing your REAL work. As it is, I haven't reached that point yet, so in a true sense, I haven't started any programming activities.
William
Fortes in fide et opere!
|
|
|
|
|
Hi! I have a single document interface program and I want to disable alt+tab and other buttons to not to let the user get out of the program... Is it possible?
Thank you for your future answers!
Well... I am a beginner ...
|
|
|
|
|
It might be possible, however handling Ctrl+Alt+Delete is not (easily) possible. So whatever key or key combination you may handle, the user will be able to get out from or close your program using the Task Manager, so maybe you will have to think of another solution. On the other side, locking completely an application must break at least the 9/10 of the UI design laws , so ...
~RaGE();
|
|
|
|
|
Well I am making a Library application for a highschool and they dont want students to use the computer for anything else than the search engine!
Will it work if I point a function to the alt+tab keys in WM_COMMAND???
Do you know any online document for ctrl+alt+delete?
Thanks a lot!
Well... I am a beginner ...
|
|
|
|
|
I wouldn't necessarily try to prevent Alt+Tab or Ctrl+Alt+Delete in your program. They should do that on the PC (using system policies to prevent task manager, and setting the shell to your program instead of explorer.exe). To prevent Alt+F4, handle WM_SYSKEYDOWN.
Just a hint, I usually put in a shortcut key (such as Ctrl+Alt+Shift+F12 or something equally obscure) that closes the application but is not documented so that when you need to close it to do upgrades, it's easier . You can password-protect it if you really want to.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
Hi,
I wrote a program (the same program as in my other question in the messageboard), and Vstudio .NET wants to include some DLL's in the exe file --> these will be copied into the application directory (the dir where I installed my software). This works OK, but I need to get rid of those dll's --> they need to be included in the EXE or something like that, because I don't want any dll's on my disk.
Can somebody tell me how to intgrate those dll (all just standard MS dll's) in my exe file?
Thank you in advance,
Boudewijn Ector
|
|
|
|
|
Which DLLs?
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
Depends on what DLLs.
If these DLLs are just standard MS DLLs, perhaps the setup program can manage it to install/update/check them properly into the Windows system directory?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
There are a couple ways. First of all, if you can, try to link statically. If any of the DLLs are MFC42.dll (or whatever), or MSVCRT.DLL, you can easily link them statically. In fact this would be your only course of action aside from installing them or assuming they are already on the system (both options are dangerous.)
If you link your DLLs implicitly (e.g., using a .lib file), you are screwed. You'll have no choice but to copy the DLL at install time. The only way around tihs is if the provider of the DLL also gave you source code or a library you can statically link. Then you can do that and not need the DLL at all.
If you have a DLL that you call explicitly (e.g., via LoadLibrary ), it is convoluted, but possible, to do what you want. I cannot remember the exact code, but the idea is this:
1. Before compiling, in your resouce file, insert the DLL as a resource (make it a custom type, or "FILE" or something.)
2. In your code, Using resource functions, extract that resouce and save it into a temp directory (e.g., call ::GetTempDirectory and save it there.)
3. In your LoadLibrary call, use the path that you extracted it to (temp dir + DLL name.)
Sorry I can't provide the exact code, but it is on my work computer, and I am not about to go into work on a holiday.
"When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
|
|
|
|
|
Hi,
I'm using VStudio .NET 2003 Enterprise Architect, and I've build a program to convert some files (I did this in managed C++). But I've got a problem:
I need to install my program on network HD (probably on a server), and my collegaes don't want to have to install the software on each of their computers. They just want to be able to run it, or my program. I can install it on the network, so they can just use the .exe.
I don't use register or config files, all the files needed for IO (some input and some output files) are already available on their pc's, and those fiels will be selected using a dialog.
Can you help me making sure nobody needs to install the software (except for me)?
Thank you in advance,
Boudewijn Ector
|
|
|
|
|
while (WaitForSingleObject(m_hFunThread,0)==WAIT_OBJECT_0)
{
Some operarions;
}
Can someone tell me the actions of the above sentences?
Thank you!
|
|
|
|
|
It will execute 'Some operations' if m_hFunThread is signaled. If m_hFunThread is not signaled, then WaitForSingleObject will return WAIT_TIMEOUT and the program will continue after the while block.
This seems like an ..unusual thing to do.
Ryan
|
|
|
|
|
From your last question, I think you want to do
while(WaitForSingleObject(m_hFunThread, 0) != WAIT_OBJECT_0)
{
} What operations do you need to do while you're waiting? If you're just waiting and don't actually need to do anything while you wait, then use
WaitForSingleObject(m_hFunThread, INFINITE); to wait until the object is signalled.
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
My project is a sub-project. The main project controls my project.
It will call a function(OnClose())When requiring to stop my project.
Herein there exists a problem.
If the main project breaks down my project.
Something wrong will happen considering to one of my functions being running.
So I want to pop up a dialog to warn the user.
If the user still want to stop the project no matter whatever will happen, I will stop my running function,
else I will keep my function going on and let the following block not to be executed until that function has been run out.
|
|
|
|
|
OK. In that case, my first suggestion should work
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
But my entire programme was stopped.
Maybe the first parameter is wrong.
Can you tell me what kind of parameter can be used as the first?
My main dialog in my project call the riskful operation, which is a memeber function of my self-defined class.
"m_hFunThread" is one memeber of my main dialog's base class, and it should be a single thread, so my entire programme stopped.
But,every main function in my project is called by using multiple-thread way
What should I do?
|
|
|
|
|
Aleon666 wrote:
But my entire programme was stopped.
What did the WaitForSingleObject() function return? Did it return WAIT_TIMEOUT? You might want to change it from != WAIT_OBJECT_0 to == WAIT_TIMEOUT .
Aleon666 wrote:
what kind of parameter can be used as the first one?
Look at the docs for WaitForSingleObject() . There are quite a few types that can be used. I assume hFunThread is the handle to your thread. The function will return WAIT_SIGNAL_0 when the thread completes, and WAIT_TIMEOUT otherwise, unless there is an error, where WAIT_FAILED will be called.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
The main project has a release executable programme, I want to step-debug the errors, but I don't know how to DEBUG from the main project to my sub-project.
And so I don't know the returned value.
Do you know the ways?
After I displaced "!= WAIT_OBJECT_0" with "== WAIT_TIMEOUT" the programme had the same result.
As to "docs", your maening is to read some contents in MSDN, isn't it?
|
|
|
|
|
Aleon666 wrote:
Do you know the ways?
Set a breakpoint at that line and just run the entire program in the debugger. It will stop when it gets to that line.
Aleon666 wrote:
After I displaced "!= WAIT_OBJECT_0" with "== WAIT_TIMEOUT" the programme had the same result.
It stopped working at all? Hmmm. Sorry, but I think I've used up all my knowledge on multithreading I haven't done much.
Aleon666 wrote:
As to "docs", your maening is to read some contents in MSDN, isn't it?
Yeah, the information on WaitForSingleObject() . It list the handle types that support waiting for.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
The main project has nothing but an exe file and my sub-project.
I must run from the exe file.
When I run the entire program in the debugger, there is a dialog popped up, saying that "..\main.exe" does not contain debugging infomation.
Thank you very much!
|
|
|
|
|
I think out a way.
I add to a varible to control the "close" function
When the requirement is verified to stop my funtion, I stop the function directly,
else I close the dlg after my function is finished by calling "OnClose" according to the varible "m_bStopRequire".
|
|
|
|
|
I'm glad you've sorted it out
Sorry I couldn't be of more help
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"
|
|
|
|