// Create the main window
const TCHAR* name = _T("RfbPlayer");
mainHwnd = CreateWindow((const TCHAR*)baseClass.classAtom, name, WS_OVERLAPPEDWINDOW,
- 0, 0, 10, 10, 0, 0, baseClass.instance, this);
+ 0, 0, 640, 480, 0, 0, baseClass.instance, this);
if (!mainHwnd) {
throw rdr::SystemException("unable to create WMNotifier window instance", GetLastError());
}
// Create the backing buffer
buffer = new win32::DIBSectionBuffer(getFrameHandle());
+ setVisible(true);
}
RfbPlayer::~RfbPlayer() {
// Set the window title and show it
setTitle(cp.name());
- setVisible(true);
// Set the player's param
applyOptions();
try {
player = new RfbPlayer(fileName, initTime, playbackSpeed, autoplay,
showControls, acceptBell);
- player->start();
+ if (autoplay) player->start();
} catch (rdr::Exception e) {
MessageBox(NULL, e.str(), e.type(), MB_OK | MB_ICONERROR);
delete player;