|
hi! how can i realize a file transfere via winsock with tcp/ip protocoll??
please help me!!
cu
|
|
|
|
|
It has been a while. What do you mean? You open a file read it into a buffer or part of it and send it. If you are using winsock and understand it enough to make a connection, then sending anything should be easy (sort of like writing to a file).
A little more explination is required.
INTP
|
|
|
|
|
should i encrypt the data stream when i send the file or a chat message with winsock? how does icq manage this?
cu
|
|
|
|
|
When printing shapes filled with bitmap textures, the data sent to the Printer is very large, ~58 MB for a single page. It seems that the bitmap texture is being send to the printer each time the texture is tiled.
I there any way to improve on the performance when printing shapes filled with bitmap textures?
this is what I am doing:
OnDraw(CDC* pDC)
{
CBitmap bmpTexture;
CBrush brushFill;
bmpTexture.LoadBitmap(IDB_BITMAP_TEXTURE_6);
brushFill.CreatePatternBrush(&bmpTexture);
CBrush* pOldBrush = pDC->SelectObject(&brushFill);
//Use the texture brush to fill shapes
pDC->Ellipse(...);
pDC->Rectangle(...);
//etc.. More fill shapes
...
}
|
|
|
|
|
I am not sure what the printing problem is. But it seems to me you should first create a memory DC and do all your drawing there, then print it.
INTP
|
|
|
|
|
Hai,
I am doing drawtext() in vc++ win32. But I am seeing a white background behind the text.I want in the background of the window.Is there any way I can do it?
Thanks a lot.
|
|
|
|
|
Use SetBkColor() to set the background colour.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
hai ,
Thanks for replying. Actually I cannot do that because my window background has mulitple colors . Is there any way to set the background as transparent?
Thanks again.
|
|
|
|
|
Use the following before DrawText();
pDC->SetBkMode(TRANSPARENT); // Default is set to OPAQUE
Hope that helps
|
|
|
|
|
|
Hello,
I Need some help if there is anyone that now this stuff please help me. I Need to disable the keybord and or the mouse to. Is there anyone that now how to do this?.
Please help me.
|
|
|
|
|
Hello,
I need to disable keybord and or mouse is there anyone yhay can help me. I Need help fast.
Please help me..
|
|
|
|
|
I typed in "disable keyboard" at CP and received multiple hits! The first of which should answer your question.
INTP
|
|
|
|
|
Where?
Can you send a link to me?.
|
|
|
|
|
Hi I'm new so forgive me for asking a question like this but upon examining some code that im trying to understand I found a line where it declares a pointer of a struct and allocates memory for it in the declaration for it as well. The next part is what confuses me, the next line proceeds to zeromemory the entire thing.. would that not erase the struct at that memory location and create a void/null area of memory?
|
|
|
|
|
Yes. The purpose of ZeroMemory() is to initialize a structure with known data (i.e. all zeroes), before passing it to an API that will populate some or all of its fields.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Yes it does. That is exactly it's purpose. If you don't do that the structure would contain unknown data that was previously assigned to the memory address for an unknown purpose. Experience shows that not initializing variables to a known value, zero in this case, is a bad mistake that will almost always come back to haunt you.
Does that help?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Thanks to both of you, I understand now.
|
|
|
|
|
You're correct. ZeroMemory will zero out the length of memory that you point it to.
It sounds like they're using it to ensure the structures memory is zero to initialize it. Tough to say without seeing the actual code and structre definition.
Mike Ellertson
|
|
|
|
|
Does anyone have any suggestions on retrieving a recordset dynamically (this fields will be based on what the user chooses)? I tried using CRecordset, but it won't let me because the fields aren't bound. I've used ODBC before, but that seems kinda messy. In vb it's easy to use the connection's execute method of an ado connection that'll return a read-only recordset, but I'm trying to see if there's a similar method in C++. Any help would be greatly appreciated. Thanks in advance
If it's broken, I probably did it
bdiamond
|
|
|
|
|
bdiamond wrote:
I'm trying to see if there's a similar method in C++.
No, there is nothing similar in C++. There is however the exact same thing , ADO.
I recommend using the ATL libraries and the #import technique for working with COM interfaces in C++.
But, that's just my opinion... I could be wrong.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Sorry, after I went back home and looked through one of my books I found exactly what you were talking about! Thanks for your help
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hello,
Inspired by Ivo Ivanov's article on process creation notification, I wrote a kernel-mode driver that notifies a user-mode application when a process is created. The driver itself works fine. However, when the driver is running, EnumProcessModules fails with the following error message:
"Only part of a ReadProcessMemory or WriteProcessMemory request was completed"
Here is more information on what I'm doing:
- When a new process is created, the driver passes the process Id to the user-mode application.
- Using the process Id, the user-mode application calls OpenProcess to obtain a handle to the process.
- The user-mode application then calls EnumProcessModules, which fails.
Two notes:
1) EnumProcessModules doesn't fail when the driver is not running.
2) EnumProcessModules doesn't fail when I'm debugging my user-mode application.
Jean Salvati
|
|
|
|
|
Anyone have any clues or code samples for pulling SCSI Controller BIOS information like the FirmWare Version that is not WMI? I'm looking at some Compaq SmartArray Controllers and need the FirmWare (Hardware Version (ROM)) Version which is blank using WMI.
|
|
|
|
|
Hi,
I've been using the CAviFile class to open an avi file in an MFC app in order to grab the first frame - this works for an avi where the codec is CRAM (Microsoft Video 1) - (bitmap header biCompression = CRAM). But when I try to grab a frame from an avi from a Fuji digital camera (biCompression = MJPG) it can't do. I suspect this is because Visual Studio can't find the
codec. I thought the required codec might be in the
quartz.dll but this is already in the VC98/Lib - ie its available to the app.
Has anyone got any ideas?
Paul
|
|
|
|