|
Seems ok to me. As I said, its not an error but a informational condition. Setting SERVICE_START_PENDING might well set Window's last error to 997. Its not far off the normal windows logic
Take it as just another way to inform processes of this condition.
I keep submitting “VB” as a Priority-1 bug, but apparently no one here knows how to fix it. Nick Hodapp, Semicolon
|
|
|
|
|
Thanks a lot. Going to continue the work
#ifndef
#define __ARMEN_H__
#endif
|
|
|
|
|
I have been struggling with several things in Visual Studio .Net
when I upgraded from version 6.0
One thing I have had lots of problems with is the elimination of
support for DaoRecordsets.
I have an Access database that I want to access, and I am struggling
to do it through ODBC. However, one problem I have had that I cannot
seem to get past is trying to get the value of a primary auto number
key out of a newly added record.
With DAO there were a couple of ways to do it:
rs.SetBookmark(rs.GetLastModifiedBookmark());
updates the appropriate field in the recordset.
Or alternatively, using GetFieldValue which forced the field to
be read from the database.
CRecordset does not have a GetLastModifiedBookmark function, and
when I call GetFieldValue it throws an exception.
I've tried various other strategies, but can't seem to find anything
that works. Any help would be much appreciated.
|
|
|
|
|
|
In this:
CFileDialog fileDlg1(FALSE, ".mdb", NULL, OFN_OVERWRITEPROMPT, "Database Files(*.mdb)|*.mdb||",NULL);
the OVERWRITEPROMPT shows up with the dlg box. How do we process its return value? WHat I mean is we have IDOK and IDCANCEL for the CFileDialog itself. Additionally we have this OK or NO for the message box as well. SO it looks like we have to handle the CFileDialog return values and also the returns of the messagebox. Its not automatic that the overwrite will take place right? We have to code that part in, is that correct?
A little
Appreciate your help,
ns
|
|
|
|
|
If you say 'No' to the 'overwrite prompt' message box, your CFileDialog stays open and doesn't return from DoModal.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
you don't have to (and cna't, i think) handle the return from the overwrite prompt.
-c
Alcohol is the anesthesia by which we endure the operation of life.
-- George Bernard Shaw
|
|
|
|
|
I want to see if a file exists. GetStatus is a bool. FRom MSDN (says use the static version to check existence) its not clear to me what part of:
CFile::GetStatus( pFileName, status )
is telling me whether it exists or not. Returns true if it could get status info. So a False return value can be considered proof that the file doesnt exist?? Is that a valid assumption? If not, how do I use this static version of GetStatus to find out if the file exists?
Appreciate your help,
ns
|
|
|
|
|
That's what I'm using:
bool FileExists(const char *szFilename)
{
WIN32_FIND_DATA findFileData;
HANDLE hFind = FindFirstFile(szFilename, &findFileData);
if (hFind == INVALID_HANDLE_VALUE)
{
return false;
}
VERIFY(FindClose(hFind));
return true;
}
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
Can I use this in MFC? Thanks
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
Can I use this in MFC?
Yes.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
what about _access function, you only need to check if returns 0, or -1...
Cheers....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Do it the easy way:
use PathFileExists().
|
|
|
|
|
Lots of options to choose from now. Many thanks for all the responses!
Appreciate your help,
ns
|
|
|
|
|
Jim A. Johnson wrote:
use PathFileExists().
Doesn't work on ancient systems without IE4 or later.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
The linker had a problem, I did include Shlwapi.h.
rain1View.obj : error LNK2001: unresolved external symbol __imp__PathFileExistsA@4
Appreciate your help,
ns
|
|
|
|
|
Link with Shlwapi.lib . I really must post that FileSystem code...
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Okay. I used the other resolution posted by Tomasz - works great!.
How do you link ? Never done that. I went to the link tab in Project settimgs but that didnt look like a place where I could put that .libs name..
Appreciate your help,
ns
|
|
|
|
|
In the Object/Library modules field.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
hello,
does anyone know how to get rid of the request timeout message using the
OpenUrl function of the internet transfer control object in Visual C++?
Or is there a sample out there on how to use the Execute function of the
same object. Is there a different component that I can use instead that would transfer an html document into a string and viceversa.
thanks,
herbert
|
|
|
|
|
hi
we are doing a project creating a graphics package. At that time they will take multiple doucment interface and commented the CView class. now i am doing printing. in printing i have to print particular area. without CView i can't do this. so now i want to create a CView for temporary at the time of printing. how can i do this. please help me
thank you
from
venu
|
|
|
|
|
In my program I need to give the user an option of printing many different kinds of files by loading the default application associated with a file type (as VC++ would load when you double click on a .cpp file) and passing "/p < filename >" as a parameter to print.
Is there some kind of shell function that I can use to retrieve the application path associated with a file type?
Thanks for any help you guys can give!
- Houdini
|
|
|
|
|
But not all applications will print a document by passing it "/p filename" arguments.
Signature space for rent. Apply by email to....
|
|
|
|
|
Most application should support this. "app /p filename" is a standard Windows parameter to print a document, just as "app filename" is a standard Windows parameter to load a file when the app starts.
Any application written in MFC/VB supports this automatically as it's built into those libraries. Don't know about other libraries, but I would think they would considering /p is a stardard windows param.
In any case, most will support it, and the ones that don't should at least load the application with the file so the user could just hit file/print in the application.
|
|
|
|
|
I'd use ShellExecute with 'print' verb.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|