|
CStdioFile::ReadString() performs reading line-by-line (reading is stopped by the first newline character; the '\n' character is removed from the string). You do not use Seek for text files where information is stored on a line-by-line base.
Some information concerning the unicode staff in your case can be found here, at CP:
http://www.codeproject.com/file/utf16.asp[^]
SkyWalker
-- modified at 15:58 Sunday 20th November, 2005
|
|
|
|
|
I still don't get it - if the file pointer is located at the same point in both instances, why does it matter what order do I use to read?
is there a way to 'bookmark' a location and then read using readstring? is there a way to go back in the file?
|
|
|
|
|
I wanna convert my MFC application to C#. Please help with suggestions and/or tools?
-- modified at 8:47 Monday 21st November, 2005
|
|
|
|
|
thats the tough task... I believe you have to do that manually
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I decided to rewrite the application.
For the UI conversion there is a tool RC Convertor from www.dudelabs.com but I cannot find any other tool which can convert my business logic code from C++ to C#.Will keep you posted with my progress.
|
|
|
|
|
:-DMy operating system is windowXP,and programming language is Vc++6.0.I want to begin to learn to use Directx 9 in my program .Do I need to install Microsoft DirectX 9.0 in my computer?Which Head file do I need to include in my program?
Anyway,How to establish the programming enviroment to begin my DirectX program?
Thank you very much for your answer!
sude
|
|
|
|
|
|
In VS .NET 2003 one used the following:
#import "libid:a155fa04-fade-491b-b007-fb9379ea47db" raw_interfaces_only named_guids
#import "libid:233ADBAD-405A-4249-AA0B-828093D57184" raw_interfaces_only named_guids
#import "libid:238B5186-2429-11D7-8BF6-00B0D03DAA06" raw_interfaces_only named_guids
to make use of the VCCodeModel, VCProjectModel and VCProjectEngine. However when changing to VS 2005 these libids are incorrect and I can't find the corresponding ones for VS2005. Does anybody know where I can find them?
I am the handsome one in the crowd.
|
|
|
|
|
Hello
As i told in earlier post that i am using MFC to read a file from a floppy that is using linux ext2 file system. Mr. Kaken told me that i could use CreateFile(...). Does CreateFile returns an handle to inode of that file?
Thanks.
We Believe in Excellence
-- modified at 3:04 Sunday 20th November, 2005
|
|
|
|
|
Hello again.
CreateFile returns a HANDLE (to the volume in this case). You use that handle to read from and write to the volume.
The HANDLE (AFAIK) doesn't mean anything outside Windows itself, it's just a unique identifier to use for file/stream operations.
When you open a volume, you get all the sectors of that volume as a contigous "file", kind of.
From there, it's up to you how to handle each and every sector. Just remeber, the smallest bit of information you can deal with is one sector.
|
|
|
|
|
Can anybody tell me how can i acces the first bytes at the entrypoint of an exe. I know the PE layout, format, but i don't know how i can translate the entrypoint to fileoffset and how i read those bytes?
-- modified at 2:25 Sunday 20th November, 2005
|
|
|
|
|
i developed one testmfc OCX control with GUI
when i tried to invoke OCX through create intance
hret = test.CreateInstance(__uuidof(TestOCX));
its creating successfully but no GUI parrt is showing.
any kind of help appreciated.
thanx ..
reagrds
Rajesh
|
|
|
|
|
Hi ...
I am new to VC++ though i have written a few C++ programs back in the day when u did not need a PHD in computer science to use a microsoft IDE.
Every .NET FORMS application i create using the wizard, terminates with a runtime error R6029 ... "This applicatoin cannot run using the active version of the .NET Runtime. Please contact the application's support team for more information."
That second sentence is a real laffer.
Even the simplest example in the VC++ 2003 tutorial has the same problem. It compiles and links just fine, but gives that message soon after the F5 key is struck.
I've never been a microsoft fan, and this crap just entrenches that dislike.
Any ideas or suggestions?
Thanks.
|
|
|
|
|
|
Thank you Graham ... it worked.
i had seen this b4 but i did not know how to apply it ... now i do. Besides, I culd not comprehend how THIS could apply to my shiny new VC++2003 system:
"R6027: An application built with /clr and the Visual C++ .NET 2003 (7.1) compiler is being run on a machine that only has version 3705 of the common language runtime, which is the runtime version that shipped with Visual C++ .NET 2002 (7.0)."
WHAT!!!!!
This solution raises lots of questions: Why does VC++2003 ship with the 2002 runtime library and NOT the 2003 version? Why does the 2003 compiler/linker generate code that does not run with the SHIPPED runtime?
Most important ... HOW ON EARTH WOULD ANYONE KNOW THEY SHOULD INCLUDE "/clr:initialAppDomain" TO SOLVE THE PROBLEM? Why didn't the build wizard include it if micro$oft KNEW of this ridiculous situation?
UNBELIEVABLE ... typical micro$oft ... maybe for ANOTHER TEN BILLION ...
GRRRRRRRRRRRR!
Thanks, Graham
|
|
|
|
|
I did a dialog to display the bmp picture. Then i add some coordinates and text using pDC.
But i don't know how to save this bitmap with what i have added as a bmp file?
Does any one can give me some tips?
Thanks!
|
|
|
|
|
Hi,
Capture the client area and save it.
HDC hdc = ::GetDC(hWnd);
CDC dc, memDC;
dc.Attach(hdc);
memDC.CreateCompatibleDC(&dc);
CRect rc;
::GetClientRect(hWnd, &rc);
CSize sz(rc.Width(), rc.Height());
CBitmap bm;
bm.CreateCompatibleBitmap(&dc, sz.cx, sz.cy);
CBitmap *pOldbm = memDC.SelectObject(&bm);
memDC.BitBlt(0, 0, sz.cx, sz.cy, &dc, 0, 0, SRCCOPY);
// now you can do what you need to with bm.m_hObject
memDC.SelectObject(pOldbm);
bm.Detach();
::ReleaseDC(dc.Detach());
Bye
Cool Ju
Dream ur Destiny
|
|
|
|
|
Hello, everyone,
I want to copy a dialog from one program's resource file to
other program's resource file?
I tried , but failed.
Who can tell me the right method to do this, Thanks a lot!
|
|
|
|
|
For a conventional (not .NET) application, that uses .RC files and a resource.h file, the most reliable approach is the following:
1. Open both resource.h files in the source file editor.
2. Use the "Open With" option in the File Open command to open both .RC files in the source file editor.
3. Use copy/paste to copy the dialog from one .RC file to the other.
4. Copy the resource ID's for the dialog and its controls from one resource.h to the other.
5. Note that you may have to manually renumber the ID's for the dialog, if they conflict with other ID's already in use.
Unfortunately, I don't do .NET programming, so I don't know the procedure there.
Software Zen: delete this;
|
|
|
|
|
Hi,all!
When i use the virtualalloc function to assign the memory, sometime the system told me that
'not enough memory,can't handle the command'. I think perhaps somewhere i assign the memory
and don't destroy it,But my memory is large enough-2G,i don't understand!
Who can help me?Thanks a lot!
|
|
|
|
|
Who can help me?Thanks a lot.
|
|
|
|
|
:-DWhere can I find a Directx 9.0 SDK ?In microsoft.com,the website need to verify my operating system,I do not know if my window XP has the certificate or not.If I follow the steps to install the ActivX control ,Will IT destory my system?
Where can I get a trial based DirectX 9.0 SDK withount any worry?
su
|
|
|
|
|
I cant for the life of me figure out how to setup the syntax to get this to work, here is my vector initializations..
typedef vector<int> vInt1D;
typedef vector<vInt1D> vInt2D;
Here is how I have my function definition...
void SetupCoordinates(int, vInt2D &);
the function declaration looks like this:
void Testing::SetupCoordinates(int iUnitLength, vInt2D &Test)
{
//stuff in here
}
The compiler returns:
Error 1 error C2784: 'bool std::operator ==(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'const int' c:\program files\microsoft visual studio 8\vc\include\algorithm 40
Everyone says Vectors are easy to pass to functions, but this is killing me... Thanks!!
"Your KungFu is not strong enough"
-- modified at 18:30 Saturday 19th November, 2005
|
|
|
|
|
Not enough info supplied.
I do not have VC8 so I do not have access to the same version of the algorithm file that you are using. What function is line #40 in? Where in your code are you calling that function? how are you calling it?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I modified the message so that the message board wouldnt parse the < > symbols out of the code, so here is the intended version I wanted to post... It should make more sense now, another note I am not using the algorithm header to do this, only the vector header, also worth mentioning is that passing should not be affected by the version of the header I am using, its a vector so its part of the STL.
"Your KungFu is not strong enough"
|
|
|
|