Click here to Skip to main content
15,913,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: resource error Pin
toxcct17-Feb-05 9:15
toxcct17-Feb-05 9:15 
GeneralRe: resource error Pin
rushing17-Feb-05 14:50
rushing17-Feb-05 14:50 
GeneralRe: resource error Pin
«_Superman_»17-Feb-05 20:26
professional«_Superman_»17-Feb-05 20:26 
GeneralMultilanguage in VS 98. Pin
nguyennp16-Feb-05 23:02
nguyennp16-Feb-05 23:02 
GeneralRe: Multilanguage in VS 98. Pin
Mohammad A Gdeisat16-Feb-05 23:09
Mohammad A Gdeisat16-Feb-05 23:09 
GeneralRe: Multilanguage in VS 98. Pin
Blake Miller17-Feb-05 7:47
Blake Miller17-Feb-05 7:47 
GeneralSending Bmp in peer 2 peer app Pin
Identity Undisclosed16-Feb-05 22:28
Identity Undisclosed16-Feb-05 22:28 
GeneralRe: Sending Bmp in peer 2 peer app Pin
Mohammad A Gdeisat16-Feb-05 23:19
Mohammad A Gdeisat16-Feb-05 23:19 
Hi friend,

I really didn't try to send large amounts of data over a network, so what i write here is just a try to help:

lets assume that both client and server know how much data is to be sent.
Then:

on the sending terminal:
1. Load the Bitmap using LoadImage.
2. Attach it to a CBitmap Object.
3. Allocate memory using GlobalAlloc function, equal to the size of bmp
4. Get Bitmap Data using GetBitmapBits()
5. send these data using send(), with each send() sends about 1KB of data.

On the receiving terminal:
1. Create a compatible CBitmap Object.
2. use recv() to receive the whole image data. (multiple recv() calls may be needed)
3. use setbitmapbits() to set image data, to what was received.
4. now use this object as a CBitmap.

Remember that on the receiving terminal you must first set bitmap info (i.e. bitsperpixel, width ,...) to the same values as the bitmap on the source

And Good Luck

Regards,
Mohammad Gdeisat
now you have


GeneralRe: Sending Bmp in peer 2 peer app Pin
Identity Undisclosed17-Feb-05 2:37
Identity Undisclosed17-Feb-05 2:37 
GeneralRe: Sending Bmp in peer 2 peer app Pin
Identity Undisclosed17-Feb-05 3:08
Identity Undisclosed17-Feb-05 3:08 
GeneralRe: Sending Bmp in peer 2 peer app Pin
ThatsAlok16-Feb-05 23:32
ThatsAlok16-Feb-05 23:32 
GeneralRe: Sending Bmp in peer 2 peer app Pin
Identity Undisclosed17-Feb-05 2:53
Identity Undisclosed17-Feb-05 2:53 
QuestionHow can I hook Joystick? Pin
ekklesia16-Feb-05 22:18
ekklesia16-Feb-05 22:18 
AnswerRe: How can I hook Joystick? Pin
Alexander M.,17-Feb-05 3:54
Alexander M.,17-Feb-05 3:54 
Generalthanks very much Pin
ekklesia18-Feb-05 20:27
ekklesia18-Feb-05 20:27 
Generalcompile error in cdoex Pin
lavanm16-Feb-05 22:03
lavanm16-Feb-05 22:03 
QuestionHow do I add a DOCTYPE declaration in XML using MSXML in Visual C++? Pin
IronMike16-Feb-05 21:35
IronMike16-Feb-05 21:35 
Questionhow works IWebBrowser2.Navigate Pin
ThinkingPrometheus16-Feb-05 20:43
ThinkingPrometheus16-Feb-05 20:43 
AnswerRe: how works IWebBrowser2.Navigate Pin
ThinkingPrometheus16-Feb-05 23:49
ThinkingPrometheus16-Feb-05 23:49 
QuestionHow to get HINSTANCE from a int? Pin
rushing16-Feb-05 20:11
rushing16-Feb-05 20:11 
AnswerRe: How to get HINSTANCE from a int? Pin
ThatsAlok16-Feb-05 22:26
ThatsAlok16-Feb-05 22:26 
Questionhow to integrate my applicaiton with MS Word?? Pin
rjnl16-Feb-05 17:12
rjnl16-Feb-05 17:12 
AnswerRe: how to integrate my applicaiton with MS Word?? Pin
Branislav16-Feb-05 22:53
Branislav16-Feb-05 22:53 
AnswerRe: how to integrate my applicaiton with MS Word?? Pin
ThatsAlok17-Feb-05 1:28
ThatsAlok17-Feb-05 1:28 
GeneralPOP3 + SSL Pin
Trivex16-Feb-05 16:03
Trivex16-Feb-05 16:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.