|
Works for both ansi, unicode.
CString s = _T("Hello");
int bytes = (s.GetLength() + 1) * sizeof(TCHAR);
|
|
|
|
|
|
iam making a program like Norton ghost
i want to save the files and their paths on another partition as a backup
do you have any better idea to make a program like Norton Ghost?
do know any function that copy a complete partition into backup disk?
|
|
|
|
|
For your purpose, the others said it already, it's (s.GetLength()+1)*sizeof(TCHAR) .
(however, you cannot simply pass the address of CString itself to a binary reader/writer)
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|
|
is there any way or functions that can copy data as a low level binary from the drive to another location or drive (Norton Ghost like) .
ex: copy files and directories with out getting the path of each file and copy it to the new location i mean to get binary data from the drive direct and copy it
|
|
|
|
|
Under WinNT+, you can use CreateFile("\\\\.\\C:") to open read-only access to any disk drive (hdd or fdd), and if you know the FAT/other file system format, you can easily read data using ReadFile().
On Win9x, you can read floppies using VxD services (it's there in MSDN as an example, but i dont remember where). For reading HDD's you need to either use 16-bit code (to call BIOS functions), or write a VxD.
Bikram Singh
|
|
|
|
|
I think what you want to know is how to calculate the size in pixels the string is going to occupy on the screen
to do this just find the font's width ( i think there is a function like GetFont you could use to find it ) then multiply the font width by the number of characters in the string
|
|
|
|
|
I am working on an OSD for Girder[^]. I want my application to have some fancy 3D accelerated graphics. Is it possible in windowed mode to have per pixel alpha blending with the windows underneath in real time?
Joel Holdsworth
|
|
|
|
|
The DirectX C++ Documentation doesn't speak for or against this subject.
Apparently the only reasonable way to know for sure is to test. The Direct3D scenes are drawn in the backbuffer and then blitted to the target area. As the backbuffer can be initialized so that it's handled like a full-screen scene (although only a part of it can be blitted), then I believe all Direct3D effects are available in windowed mode as well.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
i m writting a C++ Win32 DLL which is called by a C# application.
i want the DLL can trigger an event to the Calling C# app after some operations which might like the Win MSG mechanism: The DLL send a message to the C# app and the C# app handle the msg.
the C# use the EventHandle/EventArgs on this issue.
But can i trigger an event to C# app in a C++ Win32 DLL ?
please help me.
|
|
|
|
|
could i grab textout api when it want to draw a text on the screen ,in this way i can buufer alll messages are printed on the screen.
|
|
|
|
|
i think you need hooks.
read some Windows Hook artical at Codeproject or
in MSDN
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Possible. No easy way though. Google for APISpy32 and "Matt Pietrek".
Bikram Singh
|
|
|
|
|
By defining your own window class you get to have a HWND and HINSTANCE vars to use later. Any ideea how to get them in a dialog-based app ?
|
|
|
|
|
Hi all,
I am new to MFC.
I would like to know that how can I make Edit Box in MFC Read Only and Background of Box should be white?
Any help be appreciated .
Best Regards
Rajesh
rajesh
|
|
|
|
|
Rajesh_K_Sharma wrote:
how can I make Edit Box in MFC Read Only
editbox->SetReadOnly();
Rajesh_K_Sharma wrote:
Background of Box should be white
for changing bg color, intercept the WM_CTLCOLOREDIT message and set the HDC's(in the wParam), brush to a white brush..
Bikram Singh
|
|
|
|
|
Is there any message generated when a laptop lid is closed, as I would like to run a function when the lid has just been shut?
Thanks
|
|
|
|
|
Maybe ACPI/OnNow has something of interest?
Check it out on google..
Bikram Singh
|
|
|
|
|
CString m_sname ;
Rsc->PutCollect("s_name",_variant_t(m_sname));
the question is
when m_sname's value is 6B 62 7A FA 1B D4 A2 7C,
6B is 'k',62 is 'b',7A is 'z',D4 A2 is '寓'(chinese word),7C is '|',but 7A FA has no corresponding character .so 7A FA has
been changed to 3F('?') and stored .I want to know if some methods can solve it .Thank you !
|
|
|
|
|
Please pay attention on replies to your questions.
You have asked this twice.. the first time I have answered:
"use nvarchar datatype in the SQL Server column"
Cheers
Jaime
|
|
|
|
|
Thank you.
Sorry ,I cann't find the first subject that I had send,so I think it may be not submitted successfully.
I had used nvarchar datatype ,but the question is same.I also used ODBC
and it worked well .I think it is a bug of VC and I have installed the new patch but it no use. Would you help me? thanks!
|
|
|
|
|
He Guys,
I have a problem on VC ++ pipes.
In case of a pipe there are two handles, one is the read handle and a write handle. When I create a pipe I send this read handle to the component which wants to read from my pipe. And on the opposite end I write to the Pipe which will be read by the read handle.
And the communication that happens over this pipe of mine will be to write the data in the pipe when ever the read guys asks for data. What is happening now is whether or not that guy is reading Iam just writing to the pipe, I want to figure out a way in which I know when the pipe wants data so that I can write back to the pipe.
This problem can be phrased to something like a DOS console. In this case the console does not take input from the keyboard until the application does not call a scanf.
I cannot change the pipe to make it a named pipe and use the client server way of communication...that could had been easier. Since the other component which uses my read handle is not mine belongs to a different group.
Please let me know if there is a way to figure out if my read handle of the piep is getting utilized or not
Thanks
|
|
|
|
|
This is what MSDN says in the documentation for CreatePIpe() :
"When a process uses WriteFile to write to an anonymous pipe, the write operation is not completed until all bytes are written. If the pipe buffer is full before all bytes are written, WriteFile does not return until another process or thread uses ReadFile to make more buffer space available."
So, you can't indefinitely go on writing to your pipe because the WriteFile() function wont return until someone at the other end uses ReadFile() to read the data out...
Bikram Singh
|
|
|
|
|
Hey, everyone, I have a problem with overloading operator+, here is the code:
CStr operator+ (const char* val)<br />
{<br />
CStr temp;<br />
char *pBuf=new char[strlen(val)+strlen(buffer)+1];<br />
strcpy(pBuf,buffer);<br />
strcat(pBuf,val);<br />
temp.buffer=pBuf;<br />
return temp;<br />
}
Here buffer is a member-variable which holds string data. I don't understand why, but this method never returns concatenated strings, it returns some garbage instead. Any ideas ?
|
|
|
|
|
Does CStr have a correct copy constructor?
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen
|
|
|
|