|
It used to work for me as well, with no problem. Check documentaion again (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/prothred_9dpv.asp) and possibly try to use lpApplicationName only to specify path and parameters.
|
|
|
|
|
It does open up Windiff correctly but the problem is that why i send in the files to compare "C:\My Documents\test.h C:\My Documents\test2.h" it tells me that it can not open the file "C:\My"
It works if the directories don't have spaces in them.
Scott
|
|
|
|
|
I am sorry, I understood you wrong. You can convert path with spaces into its short version with this function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/filesio_0cyt.asp
|
|
|
|
|
thanks, that's what i needed
Scott
|
|
|
|
|
I think it's better to just quote ("") the two paths than to re-introduce the horrible 8.3 limits again.
|
|
|
|
|
Hello CP,
I'm working on an embedded PC, and the user doesn't have luxury of a keyboard or mouse (only a touchscreen). I have to create a dialog that will allow the user to set the time and date. What is the API call that I can do to take care of this?
TIA!
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Forget it. I found it.
SetSystemTime()
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Hi all, I have another b*****d problem with unresolved externals, this one is very strange. OK, I have the following code:
#include fstream.h (in arrow brackets)
bool blah::blah(LPSTR filename)
{
ifstream fin(filename);
return true;
}
This generates the following error:
nafxcwd.lib(thrdcore.obj): error LNK2001: unresolved external symbol _endthreadex
nafxcwd.lib(thrdcore.obj): error LNK2001: unresolved external symbol _beginthreadex
blah...2 unresolved externals.
I've had a look around the website but can't find the answer. I get an error when including the msvcrt.lib or some other lib that was mentioned on the site. WTF is going on? I'd be greatful if someone could save my PC's from destruction, cos thats what they're heading for!
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
"Linking code compiled with /MT with the library LIBC.LIB causes LNK2001 on _beginthread, _beginthreadex, _endthread, and _endthreadex" - MSDN
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
Thanks for the response. I did notice the line you pointed out in MSDN, but I haven't included LIBC.lib in my build nor with \MT option. Its strange but I've noticed that when I create a simple win32 application if I add the code given in my first question straight away, it works!!!! chuck it in my win32 simple app that I built up and it fails!!! why? I've checked the include libraries in Project > Settings > Link and they are exactly the same. I scoured the project options for \MT and can't find it (found \ML though). I haven't changed a sodding thing except to add the appropriate files (dxguid.lib and ddraw.lib) for my DirectX SDK. Apart from that I haven't touched it. Could it be the order I'm #including stuff? What is the missing link .
Many Thanks,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Actually There is some probelm with your Project settings .
Just Change the project settings as follows.
Go to Project->Settings->C/C++. Then Chose Category as Code Generation then select the use run-time library as multithreaded DLL . Hope Your Probelm will be solved.
Samir Sood
|
|
|
|
|
Thankyou, thankyou, thankyou. It worked at last! I did hit one further snag, a warning came up about MSVCRT.lib conflicting with some other lib every time I compiled, so I took out the _MBCS part of the Settings > C++ > Preprocessor definitions and it removed the error and everything compiled. I'm not sure if this is the best way to go about it though, what do you reckon? Also how come it works when you enter this code in a simple win32 app just after creation? I didn't have to change the code generation stuff at all then? seems a bit strange to me. Anyway, I thankyou for the time and effort you spent replying to my problem, much appreciated.
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
First, when you post code you click the little checkbox at the bottom that says "Display this message as-is (no HTML)" to get your brackets to appear (though your signature will now look weird). Alternatively, you can simply use the HTML equivelents "& lt;" and "& gt;" (without spaces) for less than and greater than.
Second, you probably don't want to be using fstream.h, these are the old deprecrated iostream libraries. The new libraries are simply:
#include <fstream> // Note: no .h
Third, some functions have dependancy on the multithreaded library, and as such require a multithreaded version of it. You're linking with the single threaded version. Change that in your project settings on the C++ tab.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
Thankyou, thankyou and more thankyou's. Absolutely correct. Would you mind reading my reply above, cos i hit one further snag which i'm not sure I've handled "properly" according to convention. Anyway, thanks for your time replying to my problem, I am extremely pleased to have got over this horrible link error. I must admit I find it strange because if you put that code in straight from scratch on a simple win32 project it works! without having to change the code generation to multi threaded? Oh btw, thanks for you advice on the < fstream > < fstream.h > issue , I was going to use fstream but I think out of boredom and complete frustration I was trying anything to get the bugger to work .
Many Thanks for you time and help
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
I want to draw the caption area by myself,but the system will draw it when needed.How can I do?
thank you!
Don't look at me in that way!
|
|
|
|
|
http://www.codeproject.com/gdi/customcaption.asp
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
thanks!
but can you give me easy way to stop windows draw the titlebar.
the code of customcaption is so long!
Don't look at me in that way!
|
|
|
|
|
Do I have always to call the CException::Delete method to make sure that it is always deleted?
Best regards,
Alexandru Savescu
|
|
|
|
|
If you get a reference to an CException object you should call Delete() to prevent memory loss.
Vezi ca e important cum construiesti obiectul ala
CException( BOOL b_AutoDelete );
... asa pe romaneste
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
I think we should post in English only.
I catch a pointer to a CDBException that I didn't create myself, it was thrown by MFC like this:
try
{
}
catch (CDBException* e)
{
}
Best regards,
Alexandru Savescu
|
|
|
|
|
You have to always delete exception, when you catch it as pointer to it.
|
|
|
|
|
Martin Ziacek wrote:
You have to always delete exception, when you catch it as pointer to it.
I thought so. Thanks!
Best regards,
Alexandru Savescu
|
|
|
|
|
1.I want to create two menus in the menubar,and which have different handles.
2.Can i prevent redrawing menubar?I don't want it redraw so much often.
|
|
|
|
|
Hi,
I would like dynamically change a caption in my SDI application (CFrame). I'm trying this (in OnInitialUpdate):
m_pMainFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;
m_pMainFrame->SetWindowText("Some caption");
But it still go bad.
Can anybody tell me something about this?
Thanks
defox
|
|
|
|
|
You can put this your CMainframe class in your OnCreate .
SetWindowText("some caption");
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|