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

C / C++ / MFC

 
AnswerRe: tcp & sockets with C++ Pin
Mark Salsbery2-Apr-07 6:06
Mark Salsbery2-Apr-07 6:06 
QuestionMOVE BITMAP IN VC++ 6.0 Pin
quocviet_dhspkt1-Apr-07 16:18
quocviet_dhspkt1-Apr-07 16:18 
AnswerRe: MOVE BITMAP IN VC++ 6.0 Pin
vinhie471-Apr-07 18:02
vinhie471-Apr-07 18:02 
GeneralRe: MOVE BITMAP IN VC++ 6.0 Pin
Parthi_Appu1-Apr-07 18:35
Parthi_Appu1-Apr-07 18:35 
GeneralRe: MOVE BITMAP IN VC++ 6.0 Pin
vinhie471-Apr-07 19:56
vinhie471-Apr-07 19:56 
GeneralRe: MOVE BITMAP IN VC++ 6.0 Pin
Parthi_Appu1-Apr-07 20:08
Parthi_Appu1-Apr-07 20:08 
GeneralRe: MOVE BITMAP IN VC++ 6.0 Pin
quocviet_dhspkt5-Apr-07 15:17
quocviet_dhspkt5-Apr-07 15:17 
GeneralRe: MOVE BITMAP IN VC++ 6.0 Pin
quocviet_dhspkt5-Apr-07 16:21
quocviet_dhspkt5-Apr-07 16:21 
My project comment such as:
* A class CBall: to load,clear a bitmap picture of ball.
//Pixel: to get pixel color of range of rectangle of bitmap.
//nWidth,nHeight: width and height of bitmap.
void CBall::Pixel(HDC hdc)
{
int i,j;
for(i=0;i<this->nWidth;i++)
for(j=0;j<this->nHeight;j++)
this->pixelColor[i][j]=GetPixel(hdc,this->nXDest+i,this->nYDest+j);
}
//Draw: Load bitmap
//nXdest,nYDest: co-ordinate upper-left of bitmap
void CBall::Draw(HDC hdc,HDC hdcMem)
{
SelectObject(hdcMem,this->hBitmap);
BitBlt(hdc,this->nXDest,
this->nYDest,this>nWidth,this->nHeight,hdcMem,0,0,SRCCOPY);
}
//Clear: to clear bitmap
//By uses SetPixel() function to set pixel color which get before
void CBall::Clear(HDC hdc)
{
int i,j;
for(i=0;i<this->nWidth;i++)
for(j=0;j<this->nHeight;j++)
SetPixel(hdc,this->nXDest+i,this->nYDest+j,this->pixelColor[i][j]);
}
//Move: to move bitmap
void CBall:Move()
//In main file of project:
*WM_PAINT:
//Call function
ball.Pixel(hdc);
ball.Draw(hdc,hdcMem);
*WM_TIMER:
//Call function
ball.Clear();
ball.Move();
ball.Pixel();
ball.Draw();
//But after clear bitmap, bitmap isn't re-drawn.
//I can't understand. Help me!
//I will send my project for all you if I know your email address. Thanks!
AnswerRe: MOVE BITMAP IN VC++ 6.0 Pin
Hamid_RT1-Apr-07 18:11
Hamid_RT1-Apr-07 18:11 
QuestionBrowsing to a mobile device using open file dialog on pc Pin
listechtony1-Apr-07 14:50
listechtony1-Apr-07 14:50 
QuestionTCP/IP connection not possible throught internet to other computer Pin
arr.cpp1-Apr-07 13:21
arr.cpp1-Apr-07 13:21 
AnswerRe: TCP/IP connection not possible throught internet to other computer Pin
mmavipc1-Apr-07 17:18
mmavipc1-Apr-07 17:18 
GeneralRe: TCP/IP connection not possible throught internet to other computer Pin
arr.cpp2-Apr-07 0:53
arr.cpp2-Apr-07 0:53 
GeneralRe: TCP/IP connection not possible throught internet to other computer Pin
Mark Salsbery2-Apr-07 6:16
Mark Salsbery2-Apr-07 6:16 
GeneralRe: TCP/IP connection not possible throught internet to other computer Pin
arr.cpp3-Apr-07 4:33
arr.cpp3-Apr-07 4:33 
AnswerRe: TCP/IP connection not possible throught internet to other computer Pin
arr.cpp3-Apr-07 5:32
arr.cpp3-Apr-07 5:32 
GeneralRe: TCP/IP connection not possible throught internet to other computer Pin
Mark Salsbery3-Apr-07 7:10
Mark Salsbery3-Apr-07 7:10 
Questionhow to use an Array of a class? Pin
MohammadAmiry1-Apr-07 11:03
MohammadAmiry1-Apr-07 11:03 
AnswerRe: how to use an Array of a class? Pin
PJ Arends1-Apr-07 11:06
professionalPJ Arends1-Apr-07 11:06 
GeneralRe: how to use an Array of a class? Pin
arr.cpp1-Apr-07 13:25
arr.cpp1-Apr-07 13:25 
JokeRe: how to use an Array of a class? Pin
Parthi_Appu1-Apr-07 18:26
Parthi_Appu1-Apr-07 18:26 
Questiongenetic algorithms examples codes using borland C++ Pin
oz-gur1-Apr-07 10:58
oz-gur1-Apr-07 10:58 
AnswerRe: genetic algorithms examples codes using borland C++ Pin
PJ Arends1-Apr-07 11:08
professionalPJ Arends1-Apr-07 11:08 
AnswerRe: genetic algorithms examples codes using borland C++ Pin
Ravi Bhavnani1-Apr-07 12:03
professionalRavi Bhavnani1-Apr-07 12:03 
AnswerRe: genetic algorithms examples codes using borland C++ Pin
oz-gur1-Apr-07 22:08
oz-gur1-Apr-07 22:08 

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.