void
OutputView::MessageReceived(BMessage *message)
{
	switch (message->what) {
		case kCheckBoxAreaSelectionChanged:
			_UpdatePreview(NULL);
			break;	
		
		case kMsgControllerVideoDepthChanged:
			UpdateSettings();
			break;
			
		case kRebuildCodec:
		case kFileTypeChanged:
			fController->SetMediaFormatFamily(FormatFamily());
			UpdateSettings();
			break;
				
		case kFileNameChanged:
			fController->SetOutputFileName(fFileName->Text());
			break;
		
		case kMinimizeOnRecording:
			Settings().SetMinimizeOnRecording(fMinimizeOnStart->Value() == B_CONTROL_ON);
			break;
		
		case kCodecChanged:
		{
			media_codec_info *info;
			ssize_t size;
			if (message->FindData(kCodecData, B_SIMPLE_DATA,
					(const void **)&info, &size) == B_OK)
				fController->SetMediaCodecInfo(*info);
			break;				
		}
		
		case B_OBSERVER_NOTICE_CHANGE:
		{
			int32 code;
			message->FindInt32("be:observe_change_what", &code);
			switch (code) {
				case kSelectionWindowClosed:
				case kMsgControllerTargetFrameChanged:
				case kClipSizeChanged:
					_UpdatePreview(message);
					break;
				default:
					break;
			}
			break;
		}
					
		default:
			BView::MessageReceived(message);
			break;
	}
}
void CGUIDialogVisualisationSettings::SetupPage()
{
  // cleanup first, if necessary
  FreeControls();
  m_pOriginalSpin = (CGUISpinControlEx*)GetControl(CONTROL_DEFAULT_SPIN);
  m_pOriginalRadioButton = (CGUIRadioButtonControl *)GetControl(CONTROL_DEFAULT_RADIOBUTTON);
  m_pOriginalSettingsButton = (CGUIButtonControl *)GetControl(CONTROL_DEFAULT_BUTTON);
  if (!m_pOriginalSpin || !m_pOriginalRadioButton || !m_pOriginalSettingsButton)
    return;
  m_pOriginalSpin->SetVisible(false);
  m_pOriginalRadioButton->SetVisible(false);
  m_pOriginalSettingsButton->SetVisible(false);

  // update our settings label
  CStdString strSettings;
  strSettings.Format("%s %s", g_infoManager.GetLabel(402).c_str(), g_localizeStrings.Get(5));
  SET_CONTROL_LABEL(CONTROL_SETTINGS_LABEL, strSettings);

  CGUIControlGroupList *group = (CGUIControlGroupList *)GetControl(CONTROL_GROUP_LIST);
#ifdef PRE_SKIN_VERSION_2_1_COMPATIBILITY
  if (!group || group->GetControlType() != CGUIControl::GUICONTROL_GROUPLIST)
  {
    // our controls for layout...
    CGUIControl *pArea = (CGUIControl *)GetControl(CONTROL_AREA);
    const CGUIControl *pGap = GetControl(CONTROL_GAP);
    if (!pArea || !pGap)
      return;
    Remove(CONTROL_AREA);
    group = new CGUIControlGroupList(GetID(), CONTROL_GROUP_LIST, pArea->GetXPosition(), pArea->GetYPosition(),
                                     pArea->GetWidth(), pArea->GetHeight(), pGap->GetHeight() - m_pOriginalSettingsButton->GetHeight(),
                                     0, VERTICAL, false);
    group->SetNavigation(CONTROL_GROUP_LIST, CONTROL_GROUP_LIST, CONTROL_GROUP_LIST, CONTROL_GROUP_LIST);
    Insert(group, pGap);
    pArea->FreeResources();
    delete pArea;
    SET_CONTROL_HIDDEN(CONTROL_PAGE);
  }
#endif
  if (!group)
    return;

  if (!m_pSettings || !m_pSettings->size())
  { // no settings available
    SET_CONTROL_VISIBLE(CONTROL_NONE_AVAILABLE);
    return;
  }
  else
  {
    SET_CONTROL_HIDDEN(CONTROL_NONE_AVAILABLE);
  }


  // run through and create our controls
  for (unsigned int i = 0; i < m_pSettings->size(); i++)
  {
    VisSetting &setting = m_pSettings->at(i);
    AddSetting(setting, group->GetWidth(), CONTROL_START + i);
  }
  UpdateSettings();
}
Beispiel #3
0
bool CSettingsManager::Load(const TiXmlElement *root, bool &updated, bool triggerEvents /* = true */, std::map<std::string, CSetting*> *loadedSettings /* = NULL */)
{
  CSharedLock lock(m_critical);
  CExclusiveLock settingsLock(m_settingsCritical);
  if (m_loaded || root == NULL)
    return false;

  if (triggerEvents && !OnSettingsLoading())
    return false;

  if (!Deserialize(root, loadedSettings))
    return false;

  bool ret = true;
  // load any ISubSettings implementations
  if (triggerEvents)
    ret = Load(root);

  updated = UpdateSettings(root);

  if (triggerEvents)
    OnSettingsLoaded();

  return ret;
}
INT_PTR ConfigPage::DoNotify(HWND hwndDlg, LPARAM lParam)
{
  NMHDR* phdr = (NMHDR*)lParam;

  switch (phdr->code)
  {
  case PSN_APPLY:
    if (UpdateSettings(hwndDlg))
    {
      SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
    }
    else
    {
      SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID);
    }
    return 1;

  case PSN_SETACTIVE:
    SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, 0);
    return 1;

  case PSN_KILLACTIVE:
    SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, FALSE);
    return 1;
  }

  return 0;
}
void
CBEditProjPrefsDialog::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	if (sender == this && message.Is(JXDialogDirector::kDeactivated))
		{
		const JXDialogDirector::Deactivated* info =
			dynamic_cast<const JXDialogDirector::Deactivated*>(&message);
		assert( info != NULL );
		if (info->Successful())
			{
			UpdateSettings();
			}
		}

	else if (sender == itsHelpButton && message.Is(JXButton::kPushed))
		{
		(JXGetHelpManager())->ShowSection(kCBProjectPrefsHelpName);
		}

	else
		{
		JXDialogDirector::Receive(sender, message);
		}
}
Beispiel #6
0
void CHLTVDirector::FrameUpdatePostEntityThink( void )
{
	if ( !m_pHLTVServer )
		return;	// don't do anything

	// This function is called each tick
	UpdateSettings();	// update settings from cvars

	if ( m_nNextAnalyzeTick < gpGlobals->tickcount )
	{
		m_nNextAnalyzeTick = gpGlobals->tickcount + TIME_TO_TICKS( 0.5f );

		AnalyzePlayers();

		AnalyzeCameras();
	}

	if ( m_nBroadcastTick <= 0 )
	{
		// game start is still in delay loop
		StartDelayMessage();
	}
	else if ( m_nNextShotTick <= m_nBroadcastTick )
	{
		// game is being broadcasted, generate camera shots
		StartNewShot();		
	}
}
void
OutputView::_UpdatePreview(BMessage* message)
{
	fSelectArea->SetEnabled(fCustomArea->Value() == B_CONTROL_ON);
	BRect screenFrame = BScreen(Window()).Frame();
	Settings settings;
	//BRect captureArea;
	//settings.GetCaptureArea(captureArea);
	//if (captureArea == screenFrame)
	//	return;
	if (fWholeScreen->Value() == B_CONTROL_ON)
		settings.SetCaptureArea(screenFrame);
	
	//UpdatePreview();
	if (message != NULL) {
		BRect rect;
		message->FindRect("selection", &rect);
		fRectView->SetRect(rect);
		
		BBitmap* bitmap = NULL;
		if (message->FindPointer("bitmap", (void**)&bitmap) == B_OK) {
			fRectView->UpdateBitmap(bitmap);
			delete bitmap;
		}
	} else {
		BRect captureArea;
		settings.GetCaptureArea(captureArea);
		fRectView->SetRect(captureArea);
		fRectView->UpdateBitmap(NULL);
	}
			
	// the size of the destination
	// clip maybe isn't supported by the codec	
	UpdateSettings();
}
Beispiel #8
0
LRESULT CHeaderView::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
  RECT rc;
  GetClientRect(&rc);
  rc.right -= 20;

  const DWORD dwTopicStyle = WS_CHILD | WS_VISIBLE 
                         | ES_CENTER | ES_READONLY | ES_MULTILINE                          
                         | WS_VSCROLL | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
              dwTopicExStyle = 0;

  m_EditCtrl.Create(m_hWnd, &rc, NULL, dwTopicStyle, dwTopicExStyle);
  m_EditCtrl.SetAutoURLDetect(TRUE);
  m_EditCtrl.SetEventMask(ENM_LINK);
  /*
  m_EditCtrl.ReplaceSel("The professional IRC Client | 0.3.100 | www.hydrairc.com | Say hi to new op, `duckman");
  ::SendMessage(m_MessageWindow,WM_HEADERCHANGED,(WPARAM)0,(LPARAM)NULL);
  */
  
  GetClientRect(&rc);

  const DWORD dwButtonStyle = BS_FLAT | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
  rc.left = rc.right - 20;
  m_ButtonCtrl.Create(m_hWnd,&rc,_T("  X  "),dwButtonStyle,0);
  m_ButtonCtrl.SetFont ( AtlGetStockFont ( DEFAULT_GUI_FONT ) );

  UpdateSettings();
  return 0;
}
Beispiel #9
0
void iwDistribution::Msg_ButtonClick(const unsigned ctrl_id)
{
    if(GAMECLIENT.IsReplayModeOn())
        return;
    switch(ctrl_id)
    {
        default: return;

        case 2:
        {
            WINDOWMANAGER.Show(new iwHelp(GUI_ID(CGI_HELP), _(
                "The priority of goods for the individual buildings can be set here. "
                "The higher the value, the quicker the required goods are delivered "
                "to the building concerned.")));

        } break;
            // Default button
        case 10:
        {
            GAMECLIENT.visual_settings.distribution = GAMECLIENT.default_settings.distribution;
            UpdateSettings();
            settings_changed = true;
        } break;
    }
}
Beispiel #10
0
iwMilitary::iwMilitary(const GameWorldViewer& gwv, GameCommandFactory& gcFactory):
    IngameWindow(CGI_MILITARY, IngameWindow::posAtMouse,  168, 330, _("Military"), LOADER.GetImageN("io", 5)),
    gwv(gwv), gcFactory(gcFactory), settings_changed(false)
{
    // Einzelne Balken
    AddProgress(0, 17, 25, 132, 26, TC_GREY, 119, 120, MILITARY_SETTINGS_SCALE[0], "", 4, 4, 0, _("Fewer recruits"), _("More recruits")); /* pitch: 4, 4 */
    AddProgress(1, 17, 57, 132, 26, TC_GREY, 121, 122, MILITARY_SETTINGS_SCALE[1], "", 4, 4, 0, _("Weak defense"), _("Strong defense"));
    AddProgress(2, 17, 89, 132, 26, TC_GREY, 123, 124, MILITARY_SETTINGS_SCALE[2], "", 4, 4, 0, _("Fewer defenders"), _("More defenders"));
    AddProgress(3, 17, 121, 132, 26, TC_GREY, 209, 210, MILITARY_SETTINGS_SCALE[3], "", 4, 4, 0, _("Less attackers"), _("More attackers"));
    AddProgress(4, 17, 153, 132, 26, TC_GREY, 129, 130, MILITARY_SETTINGS_SCALE[4], "", 4, 4, 0, _("Interior"), _("Interior"));
    AddProgress(5, 17, 185, 132, 26, TC_GREY, 127, 128, MILITARY_SETTINGS_SCALE[5], "", 4, 4, 0, _("Center of country"), _("Center of country"));
    AddProgress(6, 17, 217, 132, 26, TC_GREY, 1000, 1001, MILITARY_SETTINGS_SCALE[6], "", 4, 4, 0, _("Near harbor points"), _("Near harbor points"));
    AddProgress(7, 17, 249, 132, 26, TC_GREY, 125, 126, MILITARY_SETTINGS_SCALE[7], "", 4, 4, 0, _("Border areas"), _("Border areas"));

    // unteren 2 Buttons
    AddImageButton(20, 18, 282, 30, 32, TC_GREY, LOADER.GetImageN("io", 225), _("Help"));
    AddImageButton(21, 120, 282, 30, 32, TC_GREY, LOADER.GetImageN("io", 191), _("Default"));

    // Falls Verteidiger ändern verboten ist, einfach die Bar ausblenden
    if (gwv.GetWorld().GetGGS().getSelection(AddonId::DEFENDER_BEHAVIOR) == 1)
    {
        GetCtrl<ctrlProgress>(2)->SetVisible(false);
    }

    // Absendetimer, in 2s-Abschnitten wird jeweils das ganze als Netzwerknachricht ggf. abgeschickt
    AddTimer(22, 2000);
    UpdateSettings();
}
Beispiel #11
0
void iwMilitary::Msg_ButtonClick(const unsigned ctrl_id)
{
    switch(ctrl_id)
    {
        default: return;
            // Default button
        case 20:
        {
            WINDOWMANAGER.Show(new iwHelp(GUI_ID(CGI_HELP), _(
                "This is where you can make adjustments to all military matters. "
                "The upper value corresponds to the recruiting rate of your army. "
                "The higher it is, the more inhabitants are recruited as soldiers. "
                "Below this is the setting to protect your huts. If this value is "
                "set at maximum, your huts are defended by the strongest unit. To "
                "raise the number of attackers leaving your huts per attack, choose "
                "the next setting. The number of defenders who counter the enemy in "
                "the event of an attack is shown by the fourth display. The final "
                "three values correspond to the occupation of your huts in the "
                "interior, in the center of the country and on its borders.")));

        } break;
        case 21:
        {
            GAMECLIENT.visual_settings.military_settings = GAMECLIENT.default_settings.military_settings;
            UpdateSettings();
            settings_changed = true;
        } break;
    }
}
Beispiel #12
0
void PerfMon::initMessages()
{
    if(m_bUseContextMenu)
    {
        connect(contextMenu,SIGNAL(aboutToShow()),this,SLOT(LoadChannelMenu()));
    }
    connect(updateTimer,SIGNAL(timeout()),this,SLOT(UpdateSettings()));
}
Beispiel #13
0
void CTransfersView::OnEvent(int EventID, void *pData)
{
  switch(EventID)
  {
    case EV_PREFSCHANGED:
      UpdateSettings();
      break;
  }
}
Beispiel #14
0
void iwMilitary::Msg_Timer(const unsigned int  /*ctrl_id*/)
{
    if(GAMECLIENT.IsReplayModeOn())
        // Im Replay aktualisieren wir die Werte
        UpdateSettings();
    else
        // Im normalen Spielmodus schicken wir den ganzen Spaß ab
        TransmitSettings();
}
bool AgentSource::Init(Value &data)
{
		Image.SetPath(String(".\\img\\VideoArea.png"));
		Image.Init();
		AgentList.Add(this);
		HLock = OSCreateMutex();
		UpdateSettings(data);
		return true;
}
Beispiel #16
0
void wxOptionsDialog::OnClearButton(wxCommandEvent&)
{
	RULE.Execute(shRuleClearOptions, DataObject());

	UpdateSettings(swEmpty, swEmpty, false);

	spClearButton->Disable();
	spSaveButton->Disable();
}
Beispiel #17
0
void PolyDataObject::CreateSettingsWidgets( QWidget * parent, QVector <QWidget*> *widgets)
{
    PolyDataObjectSettingsDialog * res = new PolyDataObjectSettingsDialog( parent );
    res->setAttribute(Qt::WA_DeleteOnClose);
    res->SetPolyDataObject( this );
    res->setObjectName("Properties");
    connect( this, SIGNAL( ObjectViewChanged() ), res, SLOT(UpdateSettings()) );
    widgets->append(res);
}
TrgbPrimaries::TrgbPrimaries(IffdshowBase *deci):
    deciV(NULL)
{
    deciV = comptrQ<IffdshowDecVideo>(deci);
    if (deciV) {
        UpdateSettings(VIDEO_FULL_RANGE_INVALID, AVCOL_SPC_UNSPECIFIED);
    } else {
        reset();
    }
}
Beispiel #19
0
static void CALLCONV RestorePosition(HWND hWnd)
{
	UpdateSettings(TSF_POSITION,TRUE);
	if(g_rcPos.top != -1)
	{
		if(g_rcPos.right >= GetSystemMetrics(SM_CXSCREEN) ||
			g_rcPos.top >= GetSystemMetrics(SM_CYSCREEN)) return;
		MoveWindow(hWnd,g_rcPos.left,g_rcPos.top,g_rcPos.right-g_rcPos.left,g_rcPos.bottom-g_rcPos.top,TRUE);
	}
}
//------------------------------------------------------------------------------
void EventRecorderWidget::SelectFile()
{
    QSettings settings;
    const QString dir = settings.value( settingsKey_, "" ).toString();
    const QString file = GetSaveFileName( this, "Select output file",
                                          dir.isEmpty() ? QCoreApplication::applicationDirPath() + "/../" : dir );
    if( file.isEmpty() ) return;
    filePath_->setText( file );
    UpdateSettings();
}
Beispiel #21
0
TorrentWrapper::TorrentWrapper():
        ingame(false),
        m_timer_count(0),
        m_started(false)
{
    wxLogMessage(_T("TorrentWrapper::TorrentWrapper()"));
    m_torr = new libtorrent::session( libtorrent::fingerprint("SL", 0, 0, 0, 0), 0 );
    try
    {
        m_torr->add_extension(&libtorrent::create_metadata_plugin);
    }
    catch (std::exception& e)
    {
        wxLogError( TowxString( e.what() ) );
    }
    try
    {
        m_torr->add_extension(&libtorrent::create_ut_pex_plugin);
    }
    catch (std::exception& e)
    {
        wxLogError( TowxString( e.what() ) );
    }
    //these extensions proved o be too problematic on win so i flat out disable them
    #ifndef __WXMSW__
        try
        {
            m_torr->start_upnp();
        }
        catch (std::exception& e)
        {
            wxLogError( TowxString( e.what() ) );
        }
        try
        {
            m_torr->start_natpmp();
        }
        catch (std::exception& e)
        {
            wxLogError( TowxString( e.what() ) );
        }
        try
        {
            m_torr->start_lsd();
        }
        catch (std::exception& e)
        {
            wxLogError( TowxString( e.what() ) );
        }
    #endif
    UpdateSettings();
	m_info_download_thread.Create();
	m_info_download_thread.SetPriority( WXTHREAD_MIN_PRIORITY );
	m_info_download_thread.Run();
}
Beispiel #22
0
    BitmapImageSource(XElement *data)
    {
        this->data = data;
       
        UpdateSettings();

        colorKeyShader      = CreatePixelShaderFromFile(TEXT("shaders\\ColorKey_RGB.pShader"));
        alphaIgnoreShader   = CreatePixelShaderFromFile(TEXT("shaders\\AlphaIgnore.pShader"));
        
        Log(TEXT("Using bitmap image"));
    }
void PointCloudObjectSettingsDialog::SetPointCloudObject( PointCloudObject * object )
{
    if( object == m_object )
    {
        return;
    }
    
    if( m_object )
    {
        disconnect( m_object, SIGNAL(ObjectModified()), this, SLOT(UpdateSettings()) );
    }
    
    m_object = object;
    
    if( m_object )
    {
        connect( m_object, SIGNAL(ObjectModified()), this, SLOT(UpdateSettings()) );
    }
    
    this->UpdateUI();
}
Beispiel #24
0
void USBCamera::GetImage(Image* image) {
    std::lock_guard<priority_recursive_mutex> lock(m_mutex);
    if (m_needSettingsUpdate || m_useJpeg) {
        m_needSettingsUpdate = false;
        m_useJpeg = false;
        UpdateSettings();
    }
    // BufNum is not actually used for anything at our level, since we are
    // waiting until the next image is ready anyway
    uInt32 bufNum;
    SAFE_IMAQ_CALL(IMAQdxGrab, m_id, image, 1, &bufNum);
}
Beispiel #25
0
static int Set(ffmpeg_video* p, int No, const void* Data, int Size)
{
	int Result = CodecSet(&p->Codec,No,Data,Size);
	switch (No)
	{
	case NODE_SETTINGSCHANGED: 
		if (p->Context)
			UpdateSettings(p);
		break;
	}
	return Result;
}
	virtual TSharedRef<SWidget> CreateEditor( const TSharedRef<ISettingsEditorModel>& Model ) override
	{
		UpdateSettings(true);

		TSharedRef<SWidget> Editor = SNew(SSettingsEditor, Model)
			.OnApplicationRestartRequired(FSimpleDelegate::CreateRaw(this, &FSettingsEditorModule::OnApplicationRestartRequired));

		ClearStaleEditorWidgets();
		EditorWidgets.Add(Editor);

		return Editor;
	}
Beispiel #27
0
IVACloud::IVACloud(XElement *data)
{
    this->data = data;

    GetVideoSize();
    UpdateSettings();

    m_nSourceID = g_pCloudData->NewSourceID();

    SendMessage(g_pCloudData->m_hwdIVACloud, WM_NEWIVACLOUD, m_nIndex, m_nSourceID);

    //AppWarning(TEXT("Enable IVA image %d"), API->GetTotalStreamTime());
}
Beispiel #28
0
unsigned int USBCamera::GetImageData(void* buffer, unsigned int bufferSize) {
    std::lock_guard<priority_recursive_mutex> lock(m_mutex);
    if (m_needSettingsUpdate || !m_useJpeg) {
        m_needSettingsUpdate = false;
        m_useJpeg = true;
        UpdateSettings();
    }
    // BufNum is not actually used for anything at our level
    uInt32 bufNum;
    SAFE_IMAQ_CALL(IMAQdxGetImageData, m_id, buffer, bufferSize,
                   IMAQdxBufferNumberModeLast, 0, &bufNum);
    return GetJpegSize(buffer, bufferSize);
}
Beispiel #29
0
INT_PTR CALLBACK AdvancedPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
  if (msg == WM_INITDIALOG) {
    wchar_t txt[10];
    GetPrivateProfileString(L"Advanced", L"HookWindows", L"0", txt, ARRAY_SIZE(txt), inipath);
    Button_SetCheck(GetDlgItem(hwnd,IDC_HOOKWINDOWS), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);
    GetPrivateProfileString(L"Update", L"CheckOnStartup", L"0", txt, ARRAY_SIZE(txt), inipath);
    Button_SetCheck(GetDlgItem(hwnd,IDC_CHECKONSTARTUP), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);
    GetPrivateProfileString(L"Update", L"Beta", L"0", txt, ARRAY_SIZE(txt), inipath);
    Button_SetCheck(GetDlgItem(hwnd,IDC_BETA), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);
  }
  else if (msg == WM_COMMAND) {
    if (wParam == IDC_OPENINI) {
      ShellExecute(NULL, L"open", inipath, NULL, NULL, SW_SHOWNORMAL);
    }
    else {
      wchar_t txt[10];
      int val = Button_GetCheck(GetDlgItem(hwnd,wParam));
      if (wParam == IDC_HOOKWINDOWS) {
        if (val && MessageBox(NULL, l10n->advanced_hookwindows_warn, APP_NAME, MB_ICONINFORMATION|MB_YESNO|MB_TASKMODAL) == IDNO) {
          Button_SetCheck(GetDlgItem(hwnd,IDC_HOOKWINDOWS), BST_UNCHECKED);
          return;
        }
        WritePrivateProfileString(L"Advanced", L"HookWindows", _itow(val,txt,10), inipath);
        UpdateSettings();
      }
      else if (wParam == IDC_CHECKONSTARTUP) {
        WritePrivateProfileString(L"Update", L"CheckOnStartup", _itow(val,txt,10), inipath);
      }
      else if (wParam == IDC_BETA) {
        WritePrivateProfileString(L"Update", L"Beta", _itow(val,txt,10), inipath);
      }
      else if (wParam == IDC_CHECKNOW) {
        CheckForUpdate(1);
      }
    }
  }
  else if (msg == WM_NOTIFY) {
    LPNMHDR pnmh = (LPNMHDR)lParam;
    if (pnmh->code == PSN_SETACTIVE) {
      // Update text
      SetDlgItemText(hwnd, IDC_ADVANCED_BOX,    l10n->advanced_box);
      SetDlgItemText(hwnd, IDC_HOOKWINDOWS,     l10n->advanced_hookwindows);
      SetDlgItemText(hwnd, IDC_CHECKONSTARTUP,  l10n->advanced_checkonstartup);
      SetDlgItemText(hwnd, IDC_BETA,            l10n->advanced_beta);
      SetDlgItemText(hwnd, IDC_CHECKNOW,        l10n->advanced_checknow);
      SetDlgItemText(hwnd, IDC_INI,             l10n->advanced_ini);
      SetDlgItemText(hwnd, IDC_OPENINI,         l10n->advanced_openini);
    }
  }
  return FALSE;
}
void bbTooltip::Start(HINSTANCE h_host_instance, HWND h_host, bbTooltipInfo *p_info)
{
    WNDCLASS wc;
    m_bInitial = true;
    m_WindowName = "_bbTooltip";
    m_hCore = GetBBWnd();

    ZeroMemory((void*)&m_TipList, sizeof(m_TipList));

    m_hostInstance = h_host_instance;
    m_hHost = h_host;
    m_pInfo = p_info;

    ZeroMemory(&wc,sizeof(wc));
    wc.lpfnWndProc = _WndProc;
    wc.hInstance = m_hostInstance;
    wc.lpszClassName = m_WindowName;
    //wc.style = CS_SAVEBITS;
    RegisterClass(&wc);

    m_TipHwnd = CreateWindowEx(
        WS_EX_TOOLWINDOW,
        m_WindowName,
        NULL,
        WS_POPUP,
        0,
        0,
        0,
        0,
        NULL,
        NULL,
        m_hostInstance,
        NULL);

    SetWindowLongPtr(m_TipHwnd, GWLP_USERDATA, (LONG_PTR)this);

    m_hSecondaryBuf = CreateCompatibleDC(NULL);
    m_hBitmapNull = (HBITMAP)SelectObject(m_hSecondaryBuf, CreateCompatibleBitmap(m_hSecondaryBuf, 2, 2));
    m_hFontNull = (HFONT)SelectObject(m_hSecondaryBuf, CreateStyleFont(m_pInfo->pStyle));
    SetBkMode(m_hSecondaryBuf, TRANSPARENT);

    ZeroMemory(&m_bmpInfo, sizeof(m_bmpInfo));
    m_bmpInfo.biSize = sizeof(m_bmpInfo);
    m_bmpInfo.biPlanes = 1;
    m_bmpInfo.biCompression = BI_RGB;
    m_bmpInfo.biWidth = _MAX_WIDTH;
    m_bmpInfo.biHeight = _MAX_HEIGHT;

    UpdateSettings();
}