|
Hi
Formerly i installed VC.Net on my computer and now in debug mode i can't go into MFC source code.When i try to make step inside MFC routine ,notice window is appeared - "There is no source code available on this location".This all happens in ATL project. I try to climb in CDialog::Create(...) function which allocated in afxwin1.inl file.This file hold in properly directory $(VCInstallDir)\atlmfc\include.And this path is seted up in
Tools->Options->Projects->VC++ Directories->Sorce Files.But my stupid studio are looking for it in an other dirctory (this directory even not exist on my mashine).
Where is trouble????
Thanks.
|
|
|
|
|
hi, every body.
I have a problem here.
I want to use the structure "CURSORINFO" and API "GetCursorInfo", but the compiler told me that they are undeclared identifer.
I checked about them in MSDN and also found definitions in winuser.h.
But still, it can not be compiled.
My platform is:
Hardware: P4 1.8GHz 512MB
Software: WINDOWS2000 Professional + SP4 Visual C++ 6.0 + SP5
Can anyone give me some information what should I do to make my code compiled ?
Thanks in advance.
|
|
|
|
|
|
dear sir, thanks for your help.
I read the FAQ 2.2 and realize that "I am using a older version header file", it that right ?
Now, what do I suppose to do is to download and install new version of SDK ?
I am puzzled now that I checked the definition of these function and structure in the "winuser.h" and there they are.
And I try to put "#define WINVER 0x0500" in my code, and it can be compiled now. But still, these function and structure do now work the way they should be.
Are there ways that I can use these function and structure without downloading the SDK ? (because if I use the SDK, other programmer will have to use the SDK too in order to compile my code)
Thanks very much for your help.
|
|
|
|
|
oliverlin wrote:
...if I use the SDK, other programmer will have to use the SDK too in order to compile my code
Nothing wrong with that, unless there is a fundamental reason for not using it.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Yes, out software environment has been fixed.
Since this was a small part of a large project, a large number of SDK upgrade would have to be done.
-----------------
Today, memory either forgets things when you don't want it to, or remembers things long after they're better forgotten.
|
|
|
|
|
hi ..
i am trying to create an ODBC for database from vc++ application where i specify DSN i want and path for MSSQl
server database (data file *.MDF)
but i keep give me the error message the it "Cannot create data source"
this is the code:
=================
CString mdbpath=(CString)m_EFPATH;
char* szDesc;
int mlen;
szDesc=new char[256];
sprintf(szDesc,"DSN=%s: DESCRIPTION=: FIL=SQL Server: DEFAULTDIR=: DBQ=%s\0",m_EDSN,mdbpath);
mlen = strlen(szDesc);
int numPath=0;
for (int i=0; i
|
|
|
|
|
Two lines of code that are suspect:
sprintf(szDesc,"DSN=%s\0DBQ=%s\0", m_EDSN, mdbpath);
...
if (FALSE == SQLConfigDataSource(NULL, ODBC_ADD_DSN, "SQL Server", szDesc))
If SQLConfigDataSource() returns FALSE, what does SQLInstallerError() return?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
|
Odd, as the docs indicate it should be one of eight ODBC_ERROR_xxx error codes.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi!
Is there a command that works like sprintf, but it is like strcat? Because I will catenate (probably wrong spelling) some hex numbers to the same char value.
Have a nice day,
Stefan
|
|
|
|
|
You can just use sprintf like this:
char buffer[1024];
char * tmp;
tmp = buffer;
tmp += sprintf(tmp, "Line %d\r\n", 1);
tmp += sprintf(tmp, "Line %d\r\n", 2);
tmp += sprintf(tmp, "Line %d\r\n", 3);
Another, and better, solution is to use a strstream:
strstream out;
out<<"Line "<<1<<endl;
out<<"Line "<<2<<endl;
out<<"Line "<<3<<endl;
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
If you use fixed number of hex numbers, use:
<br />
sprintf("%c%x%x", 'c', 0x544, 0xbff)<br />
or if you use variable number:
<br />
ostrstream os;<br />
os << 'c' << hex << 0x544 << 0xbff << ....<br />
and the char* string you obtain by os.str()
Robert-Antonio
"I launched Norton Commander and saw, drive C: on the left, drive C: on the right...Damn, why I need two drives C:???So I formatted one..."
|
|
|
|
|
Here's a somewhat cheesy example:
char szBuffer[128];
for (int x = 0, num = 1; x < 10; x += 2)
{
sprintf(&szBuffer[x], "%02x", num);
num *= 2;
}
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
or even another choice:
CString S;
for ( int x = 0, num = 1; x < 10, x += 2 )
{
S.AppendFormat( _T("%02x"), num );
num *= 2;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
hi,
i am using gdi+ in VC++ 6.0. i want to know how can i use Bitmap::FromStream ? it need to pass a Stream pointer. i have a bitmap array already. but, how can i turn it into such a stream?
any help?
thanks!
jim
|
|
|
|
|
|
i want to get jpeg data stream from a valid HBITMAP and transfer it through network. I can do this by first creating a jpg file and then reading the data from the file and at last sending it out,but it is not effective,so is there a more effective solution?(i don't want to get into the complexity of jpeglib)
(English is not my native language,sorry for my bad English)
|
|
|
|
|
Using the Intel Jpeg Library (IJL), you can convert to jpeg directly in-memory, allowing you to convert from DIB to jpeg and write the jpeg out to whatever medium you wish (file, socket, pipe, etc.).
onwards and upwards...
|
|
|
|
|
Thank you
a little problem,it seems that IJL only deals with the 24bit Jpeg files
|
|
|
|
|
Yes, that is correct. You will need to convert to a 24 bit jpeg. There is a really nice class called CDibImage (on CP, I think or available at http://www.naughter.com/[^]) by P.J. Naughter that makes these types of things really easy.
onwards and upwards...
|
|
|
|
|
|
i have a web application which has to go to WEB to update some files peridically
How should i go about it ?
should i use task schduler ?
what if the user stop using task scheduler ?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
How about ur own background application that will do the stuff after certain time. ??? you can make an MFC app a background application or go for ATL Service.
Hope i helped you in same way.
Last time I was sober, man I felt bad
Worst hangover that I ever had
It took six hamburgers and scotch all night
Nicotine for breakfast just to put me right.... Dire Straits
|
|
|
|
|
will ATL service work on 9x ?
background process not sure what you mean ?
suppose updation time is 8 hrs
what will the backgound process do if the user reboots 5 times in 8 hrs how to keep tab of that ?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|