|
Is it simply that the current directory is not where "C:MYFILE.txt" is located??
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Unfortunately not! I can read it if I skip the first reding operation.
There has to be something stupid under it or something else more complicated!
Anyway I sent the code to your email address so as you can examine it if you want. THANKS
|
|
|
|
|
In the second Open add shareDenyNone. ie. CFile::modeRead | CFile::shareDenyNone Also check the CFileException.m_cause and see what it complains about.
FYI I didn't receive any email from you.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
OK, you solution of adding the flag CFile::shareDenyNone works!
Thanks for your advice which was really useful.
|
|
|
|
|
I'm trying to use common control in a simple program, but it seems like the linker did not recognize the INITCOMMONCONTROLSEX. I've included "commctrl.h" and comctl32.lib. I've also checked the path to my library directories and include directories, they all look fine.
Can anybody help please?
FYI: I'm using Visual Studio .NET.
Thanks a lot.
|
|
|
|
|
Hi
You probably did this already but I was getting the same linker error until I right clicked on the project under solution explorer, went to configuration properties, then to the Linker folder, then to Input, and under the additional dependencies, I typed in comctl32.lib. That seemed to solve the problem. I also had a problem when I included the header file twice in two different files of my program.
HTH
Nitin
|
|
|
|
|
hello,
i'm still making a server/client program, the database will be located on the server. Now i've come this far that i know that wenn i use Microsoft ActiveX Data Objects (ADO) i can make multible connections to the database, and it's also much faster.
But can i relay on (for example)record-locking with Microsoft ActiveX Data Objects (ADO) so the data can't be alterd while it's in use by someone else? Or do i have to make myself an class between server and database that manages these things?
Greetz,
Willem
[]D [] []D []
|
|
|
|
|
How can I temporary disable the minimize button in my MFC dialog application?
|
|
|
|
|
Try
ModifyStyle(WS_MINIMIZEBOX, 0);
RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE
| RDW_UPDATENOW | RDW_ERASE);
rechi
|
|
|
|
|
Thanks, it works great, but is there a way just to disable the minimize button, not to hide it?
|
|
|
|
|
Yes, it's possible but not so easy. You have to intercept WM_NCPAINT and use DrawFrameControl to show the minimize picture as you wish.
rechi
|
|
|
|
|
Hello,
I have an application which have a file format use for its files.
In the explorer, then I display the "Properties" of a file of my application, I didn't see any information of my file. I want to put some informations in my file (version, user, description, bitmap, etc) which can be view in the explorer when the user display the properties of my files.
How I can do ? I have search in the msdn without success...
And, if someone know, how I can associate a bitmap to a file (like bmp, jpg, MAX file, etc...)
|
|
|
|
|
A good start for your problem could be reading Michael Dunn's shell extensions tutorials here on CP.
Tutorials index[^]
|
|
|
|
|
If you're talking about the extra pages that Microsoft Office files show in the Explorer properties window (e.g. the Summary Page), that is achieved using a Property Set in an OLE Structured Storage file (otherwise known as a compound storage file) - it's a fairly complicated topic, so I suggest you read the following articles:
OLE Property Sets Exposed (MSDN)[^] to find out what Property Sets are...
And The Summary Information Property Set (MSDN)[^] to find out about the property set responsible for storing summary information.
Hope that helps.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Hello everyone,
I was wondering if there was any way to create a program that can send e-mails straight to the outlook inbox residing on the same computer... that is send it directly there and not pass GO, where GO means no STMP protocol (since i just want to create an e-mail object and somehow save it into the local inbox). I haven't been able to find any documentation on weather this is even achievable... Any input would be appreciated. Thanks everyone!
Tom
|
|
|
|
|
I think it should be possible with the help of Office Automation. The input folder is nothing else than an ordinary folder, so it should be possible to place anything in it you want. But I'm not really sure. So you should search for Office Automation on MSDN or here on CP. When having some knowledge about that and having the class information of all interfaces supported by Outlook (you get that when creating classes based on libraries, there choosing msoutl.lib or similar -> described on MSDN), you'll be able to find all information you need.
|
|
|
|
|
can I add Buttons to a Window? it seems like i cant? I've been reading some msdn docs on gui, and it seems like I can only add buttons to a dialog? Must a dialog has a window parent? I couldn't create a dialog with NULL as the handle to its window parent. So I want to create a gui with bunch of buttons on it, I have to make an invisibile window, then initate a visible dialog? it seems a bit twisted. what's wrong? can someone elaborate?
thanks
-J
|
|
|
|
|
just create a "dialog app" from VC's App Wizard.
-c
Be very, very careful what you put into that head, because you will never, ever get it out. --Thomas Cardinal Wolsey
|
|
|
|
|
Hi,
I'm trying to figure out how to access my document from my main app?
Suppose I have my CMyDocument doc and I have a member varible m_MyDocVar
and let say I want to check the value of this m_MyDocVar from my main app,
how would I get a pointer to the doc and access my variable?
Anyhelp would be greatly appriciated.
|
|
|
|
|
CMainFrame *pMF = (CMainFrame *)AfxGetMainWnd();
CMyDOcType *pDoc = (CMyDOcType *)pMF->GetActiveDocument();
Be very, very careful what you put into that head, because you will never, ever get it out. --Thomas Cardinal Wolsey
|
|
|
|
|
Works! Thank you!
|
|
|
|
|
hi,
i made a .chm help file.. i've create a command for it in the menu already.. i was wondering how do i load it? do i use shellexecute or is there another command in vc++ 7 that's create for loading .chm file? also, will this .chm file work in win95/98/nt/2000?
thanx in advance.
|
|
|
|
|
The fucntion
HWND HtmlHelp(
HWND hwndCaller,
LPCSTR pszFile,
UINT uCommand,
DWORD dwData) ;
can be used to display .chm files. It's declared in htmlhlp.h. I think it should work on all OS you mentioned (even if I don't really know if you need a IE > 4.0 or anything further)
|
|
|
|
|
hi,
i delcared htmlhelp.h and attempt to run HtmlHelp off one of the event handler, but i kept on getting error message saying that HtmlHelpA doesn't take 4 argument.. i've checked out the documentation on HtmlHelp, but it's not very helpful.. not much information given.. do you know where that i can find a example on hooking up .chm using HtmlHelp function? thx.
|
|
|
|
|
The problem is that both CWinApp and CWnd delcare a HtmlHelp function, too. And this function takes only 2 parameters. So I think you've to call the function as a global one, thus calling ::HtmlHelp.
If you need more information you should have a look at MSDN. There're many examples dealing with this topic.
|
|
|
|