How to get file path name hBitmap using C++?

Apr 1 2009 6:43 AM

Hello.. I want to ask you how to get file path name hBitmap using C++?? Actually I want to build the robot for my project. I'm using C++ to make it detect 4 pattern and it will stop for a second when it detect any one of that pattern. I had make a code until it can display in GUI but I don't know  how to make it detect an image and it will display a character like "Triangle" and this robot will stop for a second. Can you help me? I also include my code...

void CSample_API_AppDlg::OnGetImage()
{
 SetTimer(ID_CLOCK_TIMER,100,NULL);
}
void CSample_API_AppDlg::OnTimer(UINT nIDEvent)
{
 // TODO: Add your message handler code here and/or call default
 
 switch(nIDEvent)
 {
 case ID_CLOCK_TIMER:
 
 
 int width, height;
 unsigned char *image = (unsigned char *)malloc(320*240*3);

 RR_API rr;

 // open up RoboRealm if it is not already running. Note you may need to change
 // the path on this.
 rr.open("c:\\www\RoboRealm\\bin\\RoboRealm.exe", 6060);

 if (!rr.connect("localhost"))
 {
  printf("RoboRealm does not appear to be running.\nPlease run RoboRealm and try again.");
  exit(0);
 }

 if (hBitmap) DeleteObject(hBitmap);

 hBitmap = rr.getBitmap("processed", image, &width, &height, 320*240*3);

 imageCtl.SetBitmap(hBitmap);
 
 
 
 rr.disconnect();

 free(image);
 break;
 }
 CDialog::OnTimer(nIDEvent);
}

Your kindness are really appreciated...