|
Hello all,
I'm trying to include files to a project on a Windows 2000 system which are located on my Unix account. However, MS VS6 changes the directory names by default to capital letters, and hence Visual C++ cannot find them back anymore, as capital or normal letters are important to UNIX systems. Is there a way to avoid this change to capital letters? I didn't find how to in the Options menu.
I tested if there were access problems, but no, if I create a file and directory with capital letters on my Unix account, I can edit the file. But I would like to avoid this in this project.
Any help would be great, and a huge step forward,
Thanks,
Bart.
|
|
|
|
|
I'm writing a prog that works in the background all the time. So it is loaded on windows startup and unloaded on shutdown. The question is: do I have to perform all the clean up like freeing dynamically allocated memory or uninstalling the hook when windows is being restarted or shut down. If yes then what what message is sent to my application to inform that windows is going to finish it's work? I do not get WM_DESTROY or WM_CLOSE like in the case when I terminate the program myself. Thanks.
|
|
|
|
|
Idealy Yes
WM_ENDSESSION
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi there,
I used Brian Hart's code (Article:Center CMDIChildWnds and Other Tips) to center my windows. No errors were detected in Debug mode and everything worked just fine. But when I switched my active configuration to release mode, it gives me the following error:
error C2065: 'WM_SIZEPARENT' : undeclared identifier
Why is that when this is a MFC message?
Thanks!
|
|
|
|
|
elephantstar wrote:
error C2065: 'WM_SIZEPARENT' : undeclared identifier
Why is that when this is a MFC message?
Probably because afxpriv.h has not been included.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It is included in stdafx.h. I still don't understand why it's giving me the error.
|
|
|
|
|
Size you indicate that it compiles in debug mode but not in release mode, I would suggest looking at the project's .dsp file and noting the differences between the two configurations.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The application now works but some of the data is wrong in Release mode but everthing works fine in Debug. How do I compare the two and see where it went wrong? Thanks!
|
|
|
|
|
elephantstar wrote:
The application now works...
What did you change to correct the behavior?
elephantstar wrote:
How do I compare the two and see where it went wrong?
The two what? Are you talking about the project's .dsp file?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Instead of including <afxpriv.h> within stdafx.h, I included it directly with the class. Previously, my class included stdafx.h which in turn included <afxpriv.h> and it worked just fine.
As for my changes that causes two different outputs in Debug and Release mode, I didn't think to check in Release mode each time I updated my application. I have been using debug mode up until I needed to release it. Only then did I find out too late that it did not produce the correct output.
Is there an easy way to compare the two configurations and see where the problem lies?
Thanks!
|
|
|
|
|
elephantstar wrote:
Is there an easy way to compare the two configurations and see where the problem lies?
Yes. Look at the project's .dsp file. Haven't I mentioned that before?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes you did but I wasn't sure what I was looking at. Am I looking for differences in the two configuration settings? Thanks!
|
|
|
|
|
elephantstar wrote:
Yes you did but I wasn't sure what I was looking at.
The release-specific settings will follow !IF "$(CFG)" == "prjname - Win32 Release" and the debug-specific settings will follow !ELSEIF "$(CFG)" == "prjname - Win32 Debug". Look at the lines in each section and will become apparent what you are supposed to compare.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I remember seeing somewhere there was a way to use AfxBeginThread with a non-static member function. Does anyone out there know anything about this?
[insert witty comment here]
bdiamond
|
|
|
|
|
Is this of academic interest? Otherwise you could just send the this-pointer as pParam in the call, using a static member function as thread func. In that function, just convert the argument and call whatever non-static member you'd like.
|
|
|
|
|
Thanks, actually I just tried that. It works, except for some other problems I'm having.
[insert witty comment here]
bdiamond
|
|
|
|
|
I'm trying to program an application which is supposed to write several strings in .txt files. But no matter what i do, it keeps writing each string over the last one written, so i never have more than 1, and not even properly written if its shorter than the one before
I'm using WriteString(), and before was using Write().
How can i do to write in the same file after closing it without this problem?
Thank you very much.
|
|
|
|
|
Use the CFile::modeNoTruncate flag when opening the file. You'll then need to call CFile:SeekToEnd() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I AM CREATING AN APPLICATION IN WHICH I NEED TO CREATE A DIALOGBOX WHOSE SHAPE IS IN FORM OF A GIVEN PNG IMAGE.FEEL JUST LIKE SKINS PROVIDED IN WINAMP. IF ANY BODY CAN
|
|
|
|
|
Firstly could you please not use all capitals when posting messages.
See The RGN Generator[^] it will give you non-rectangular dialog boxes.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thx for this.The code given in this is not for the application shown.I couldnt get weather this is a animated gif or png.If anybody can provide its code
Thx
|
|
|
|
|
CAN ANY BODY TELL ME THE BEST SITE WHERE I CAN GET BRAINDUMPS FOR VC++ EXAMS.IS THERE ANY EXAM FOR VC++.NET RIGHT NOW WHEN IS IT LAUNCHING
|
|
|
|
|
How about brainbench.com?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi all
I had a problem with MFC CSocket class.I use VisalStudio.Net
and corresponding MFC librarys from one.
My .exe application use an COM server which used this CSocket class.This pseudocode demonstrate what i try to do:
/////////////////Snippet from exe app////////////////
....
///pMySock is COM interface from my MySock.dll library
pMySock->Connect(...)
....
////////////////Snippet from MySock.dll library///////
class ATL_NO_VTABLE CMySock
{
....
CMySock::Connect(...)
{
if (m_sock.m_hSocket == INVALID_SOCKET)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//Just try to create syncronous socket
//but failed here in Win98,see following
m_sock.Create()
....
}
}
CSocket m_sock;
}
Also in InitInstance method i invoke AfxInitSocket()
function and rather use MFC static linkage.
This code work fine in Win2000 system, but then i launch same application in Win98 m_sock.Create() failed.
And i can't catch why it happens.
Please any suggestions
THANK
|
|
|
|
|
This can be down to the following registry being corrupt
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2
See Related article[^]
It explains how to sort this out.
Hope this helps
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|