Example #1
0
  const Image::FormatPtr Image::Format::searchFormat(const std::string name){
    std::vector<FormatPtr>::iterator it;

    for (it = formatTable().begin(); it != formatTable().end(); it++){
      if (name.compare((*it)->name) == 0)
	return *it;
    }
    return FormatPtr();
  }
Example #2
0
Rect Ctrl::GetScreenClient(HWND hwnd)
{
	Rect r;
	::GetClientRect(hwnd, r);
	Point tl = r.TopLeft();
	Point br = r.BottomRight();
	::ClientToScreen(hwnd, tl);
	::ClientToScreen(hwnd, br);
	LLOG("Ctrl::GetScreenClient: hwnd = " << FormatPtr(hwnd) << ", client = " << r
	     << ", screen(tl) = " << tl << ", screen(br) = " << br);
	return Rect(tl, br);
}