Exemplo n.º 1
0
// Fill in all the data in the polygon counter dialog.
void
PolygonCounter::DrawBars()
{
    TSTR buf;
    int val;

    GetAppData(thePolyCounter.ip, MAX_POLYS_ID, _T("10000"), buf);
	if (atoi(buf, val))
		thePolyCounter.maxPolys->SetValue(val, FALSE);
    GetAppData(thePolyCounter.ip, MAX_SELECTED_ID, _T("1000"), buf);
	if (atoi(buf, val))
		thePolyCounter.maxSelected->SetValue(val, FALSE);

    HWND hName = GetDlgItem(thePolyCounter.hDlg, IDC_POLY_COUNT);
    TCHAR str[256];
    _stprintf(str, _T("%d"), faceCount);
    Static_SetText(hName, str);
    
    hName = GetDlgItem(thePolyCounter.hDlg, IDC_SEL_COUNT);
    _stprintf(str, _T("%d"), selFaceCount);
    Static_SetText(hName, str);

    HWND hPolyBar = GetDlgItem(hDlg, IDC_POLY_BAR);
    int maxFaces = maxPolys->GetIVal();
    DrawBar(hPolyBar, faceCount, maxFaces);
    HWND hSelBar = GetDlgItem(hDlg, IDC_SELECTED_BAR);
    int maxSel = maxSelected->GetIVal();
    DrawBar(hSelBar,  selFaceCount, maxSel);
}
Exemplo n.º 2
0
LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
	switch (uMsg) {
		case WM_INITDIALOG:
			SetWindowText(hDlg, _("About"));

			Button_SetText(GetDlgItem(hDlg, IDOK), _("OK"));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_TEXT), _("PCSX EMU\n"));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_AUTHORS), _(LabelAuthors));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_GREETS), _(LabelGreets));
			Button_SetText(GetDlgItem(hDlg,IDOK), _("OK"));
			return TRUE;

		case WM_COMMAND:
			switch (wParam) {
				case IDOK:
					EndDialog(hDlg, TRUE);
					return TRUE;
			}
			break;

		case WM_CLOSE:
			EndDialog(hDlg, TRUE);
			return TRUE;
	}
	return FALSE;
}
Exemplo n.º 3
0
BOOL CALLBACK ConnectDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
	char str[256];
	static int waitState;

	switch(uMsg) {
		case WM_INITDIALOG:
			SetWindowText(hW, _("Connecting..."));

			sprintf(str, _("Please wait while connecting... %c\n"), charsTable[waitState]);
			Static_SetText(GetDlgItem(hW, IDC_CONNECTSTR), str);
			SetTimer(hW, 0, 100, NULL);
			return TRUE;

		case WM_TIMER:
			if (++waitState == 4) waitState = 0;
			sprintf(str, _("Please wait while connecting... %c\n"), charsTable[waitState]);
			Static_SetText(GetDlgItem(hW, IDC_CONNECTSTR), str);
			return TRUE;

/*		case WM_COMMAND:
			switch (LOWORD(wParam)) {
       			case IDCANCEL:
					WaitCancel = 1;
					return TRUE;
			}*/
	}

	return FALSE;
}
Exemplo n.º 4
0
LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg)
	{
		case WM_INITDIALOG:
			//hBMP = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(SPLASH_LOGO));
			hSilverBMP = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_PS2SILVER));

			/*hW = CreateWindow("STATIC", "", WS_VISIBLE | WS_CHILD | SS_BITMAP, 
					  230, 10, 211, 110, hDlg, (HMENU)IDC_STATIC, GetModuleHandle(NULL), NULL);
			SendMessage(hW, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hBMP);*/

			SetWindowText(hDlg, _("About PCSX2"));

			Button_SetText(GetDlgItem(hDlg, IDOK), _("OK"));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_AUTHORS), _(LabelAuthors));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_GREETS), _(LabelGreets));
		return TRUE;

		case WM_COMMAND:
			switch(wParam)
			{
				case IDOK:
					EndDialog( hDlg, TRUE );
				return TRUE;
			}
		return FALSE;

		case WM_CLOSE:
			EndDialog( hDlg, TRUE );
		return TRUE;
	}
	return FALSE;
}
Exemplo n.º 5
0
static void DoCalculation (HWND hwnd)
{
	INFOOFFSET infoIdx = GetSelectedStructure(hwnd);
	STRUCTINFO info;
	DWORD dwTotalPages = 0;
	char szNumber[50];

	// Verify all controls are within their limits.

	if (!VerifyAllNumericEditControls(hwnd, TRUE, TRUE))
		return;

	info.nIngresVersion= GetOIVers();

	GetDialogInfo (hwnd, &info);

	switch (infoIdx)
	{
		case STRUCT_HASH:
			dwTotalPages = CalculateHash(hwnd, &info);
			break;

		case STRUCT_ISAM:
			dwTotalPages = CalculateIsam(hwnd, &info);
			break;

		case STRUCT_HEAP:
			dwTotalPages = CalculateHeap(hwnd, &info);
			break;

		case STRUCT_BTREE:
			dwTotalPages = CalculateBtree(hwnd, &info);
			break;

		default:
			ASSERT(NULL);
	}

	if (dwTotalPages != (DWORD)-1)
	{
		// Update the results display

		double dBytes;

		my_dwtoa(dwTotalPages, szNumber, 10);
		Static_SetText(GetDlgItem(hwnd, IDC_INGRESPAGES), szNumber);

		dBytes = (double)dwTotalPages * (double)info.dwPageSize; // PS 
		sprintf (szNumber, "%.0f", dBytes);
		Static_SetText(GetDlgItem(hwnd, IDC_BYTES), szNumber);
	}
	else
	{
		SetCalcError(hwnd);
	}
}
Exemplo n.º 6
0
static void SetCalcError(HWND hwnd)
{
	char szErrNotify[50];

	if (LoadString(hResource, IDS_CALCERRNOTIFY, szErrNotify, sizeof(szErrNotify)) > 0)
	{
		Static_SetText(GetDlgItem(hwnd, IDC_INGRESPAGES), szErrNotify);
		Static_SetText(GetDlgItem(hwnd, IDC_BYTES), szErrNotify);
	}

}
Exemplo n.º 7
0
BOOL On_DlgFormationInitDialog(HWND hdlgP, HWND hwndFocus, LPARAM lParam)
{
	HWND hwndParent = GetParent(hdlgP); 
    DLGHDR *pHdr = (DLGHDR *) GetWindowLong(hwndParent, GWL_USERDATA);
    SetWindowPos(hdlgP, HWND_TOP, pHdr->rcDisplay.left, pHdr->rcDisplay.top, 0, 0, SWP_NOSIZE); 

	Static_SetText(GetDlgItem(hdlgP, IDC_STATIC_CANDIDATE), utf8_2_ansi(_("Candidate")));
	Static_SetText(GetDlgItem(hdlgP, IDC_STATIC_OFFICE), utf8_2_ansi(_("Office")));
	Static_SetText(GetDlgItem(hdlgP, IDC_STATIC_WANDER), utf8_2_ansi(_("Wander")));

	return FALSE;
}
Exemplo n.º 8
0
VOID ViewTriggers_TriggerChanged( HWND hwnd )
{
  INT i;
  CHAR szBuf[128];
  LRESULT lResult;

  lResult = ListBox_GetCurSel( GetDlgItem( hwnd, IDC_TRIGGER_LIST ) );

  if ( lResult >= 0 && lResult < pLevel->nTriggers )
  {
    i = (INT)lResult;

    DoubleToString( szBuf, pLevel->pTriggerData[i].radius, 0 );
    Edit_SetText( GetDlgItem( hwnd, IDC_TRIGGER_RADIUS ), szBuf );

    DoubleToString( szBuf, pLevel->pTriggerData[i].height, 0 );
    Edit_SetText( GetDlgItem( hwnd, IDC_TRIGGER_HEIGHT ), szBuf );

    CheckDlgButton( hwnd,
                    IDC_TRIGGER_PROXIMITY,
                    (pLevel->pTriggerData[i].flags & TF_PROXIMITY_TRIGGER) ? 1 : 0 );

    CheckDlgButton( hwnd,
                    IDC_TRIGGER_USER,
                    (pLevel->pTriggerData[i].flags & TF_USER_TRIGGER) ? 1 : 0 );

    CheckDlgButton( hwnd,
                    IDC_TRIGGER_SOUND,
                    (pLevel->pTriggerData[i].flags & TF_SOUND) ? 1 : 0 );

    CheckDlgButton( hwnd,
                    IDC_TRIGGER_END_LEVEL,
                    (pLevel->pTriggerData[i].flags & TF_END_LEVEL) ? 1 : 0 );

    CheckDlgButton( hwnd,
                    IDC_TRIGGER_END_GAME,
                    (pLevel->pTriggerData[i].flags & TF_END_GAME) ? 1 : 0 );

    if (pLevel->pTriggerData[i].flags & TF_ITEM_REQUIRED)
    {
      Static_SetText( GetDlgItem( hwnd, IDC_TRIGGER_ITEM_REQUIRED ),
                      GetItemTypeString( pLevel->pTriggerData[i].item_type ) );
    }
    else
    {
      Static_SetText( GetDlgItem( hwnd, IDC_TRIGGER_ITEM_REQUIRED ),
                      (LPSTR)"" );
    }
  }

  return;
  
} // ViewTriggers_TriggerChanged
Exemplo n.º 9
0
VOID WINAPI pistaParaAterrarOuDescolar(HWND hControl, INT idLane, HWND hStatic)
{
	Button_GetText(hControl,buffer,MAX_BUFFER);
	if(buffer[0]=='A')
	{
		gestor->SetLanePriorityTo(Plane::LAND,idLane);
		Button_SetText(hControl,_T("Descolar"));
		Static_SetText(hStatic,_T("Dá prioridade a aterragens"));
	}
	else if(buffer[0]=='D')
	{
		gestor->SetLanePriorityTo(Plane::LIFTOFF,idLane);
		Button_SetText(hControl,_T("Aterrar"));
		Static_SetText(hStatic,_T("Dá prioridade a descolagens"));
	}
}
Exemplo n.º 10
0
VOID WINAPI fecharOuAbrirPista(HWND hControl,INT idLane, HWND hStatic)
{
	Button_GetText(hControl,buffer,MAX_BUFFER);
	if(buffer[0]=='A')
	{
		gestor->abrirPista(idLane);
		Button_SetText(hControl,_T("Fechar"));
		Static_SetText(hStatic,_T("Encontra-se aberta"));
	}
	else if(buffer[0]=='F')
	{
		gestor->fecharPista(idLane);
		Button_SetText(hControl,_T("Abrir"));
		Static_SetText(hStatic,_T("Encontra-se fechada"));
	}
}
Exemplo n.º 11
0
BOOL
Cal3DObjPick::Pick(IObjParam *ip, ViewExp *vpt)
{
    if (vpt->HitCount() == 0)
        return FALSE;

    INode *node;
    if ((node = vpt->GetClosestHit()) != NULL)
    {
#if MAX_PRODUCT_VERSION_MAJOR > 8
        RefResult ret = sound->ReplaceReference(1, node);
#else
        RefResult ret = sound->MakeRefByID(FOREVER, 1, node);
#endif

        SetPickMode(NULL);
        // sound->iObjParams->SetCommandMode(sound->previousMode);
        // sound->previousMode = NULL;
        sound->Cal3DPickButton->SetCheck(FALSE);
        HWND hw = sound->hRollup;
        Static_SetText(GetDlgItem(hw, IDC_NAME), sound->audioClip->GetName());
        return FALSE;
    }
    return FALSE;
}
Exemplo n.º 12
0
BOOL CALLBACK ConfigurePluginsDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
	switch(uMsg) {
		case WM_INITDIALOG:
			SetWindowText(hW, _("Configuration"));

			Button_SetText(GetDlgItem(hW, IDOK), _("OK"));
			Button_SetText(GetDlgItem(hW, IDCANCEL), _("Cancel"));
			Static_SetText(GetDlgItem(hW, IDC_BIOS), _("Bios"));			
			return OnConfigurePluginsDialog(hW);

		case WM_COMMAND:
			switch(LOWORD(wParam)) {				
				case IDCANCEL: 
					OnCancel(hW); 
					if (CancelQuit) {
						SysClose(); exit(1);
					}
					return TRUE;
				case IDOK:     
					OnOK(hW);     
					return TRUE;
			}
	}
	return FALSE;
}
Exemplo n.º 13
0
/* Callback for the Audit property sheet */
INT_PTR CALLBACK GameAuditDialogProc(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam)
{
	switch (Msg)
	{
	case WM_INITDIALOG:
		FlushFileCaches();
		hAudit = hDlg;
		Static_SetText(GetDlgItem(hDlg, IDC_PROP_TITLE), GameInfoTitle(rom_index));
		SetTimer(hDlg, 0, 1, NULL);
		return 1;

	case WM_TIMER:
		KillTimer(hDlg, 0);
		{
			int iStatus;
			LPCSTR lpStatus;

			iStatus = Mame32VerifyRomSet(rom_index);
			lpStatus = DriverUsesRoms(rom_index) ? StatusString(iStatus) : "None required";
			SetWindowText(GetDlgItem(hDlg, IDC_PROP_ROMS), lpStatus);

			iStatus = Mame32VerifySampleSet(rom_index);
			lpStatus = DriverUsesSamples(rom_index) ? StatusString(iStatus) : "None required";
			SetWindowText(GetDlgItem(hDlg, IDC_PROP_SAMPLES), lpStatus);
		}
		ShowWindow(hDlg, SW_SHOW);
		break;
	}
	return 0;
}
Exemplo n.º 14
0
BOOL ViewItems_OnInitDialog( HWND hwnd, HWND hwndFocus, LPARAM lParam )
{
  INT i;
  HWND hwndCtrl;

  hwndCtrl = GetDlgItem( hwnd, IDC_ITEM_LIST );

  for( i = 0; i < po->nItems; ++i )
  {
    ListBox_AddString( hwndCtrl, po->pItemData[i].item_name );
  }

  ListBox_SetCurSel( hwndCtrl, 0 );

  hwndCtrl = GetDlgItem( hwnd, IDC_ITEM_TYPE );
  Static_SetText( hwndCtrl, GetItemTypeString( po->pItemData[0].item_type ) );

  hwndCtrl = GetDlgItem( hwnd, IDC_ITEM_PIXEL_SIZE );
  Edit_LimitText( hwndCtrl, 8 );

  ViewItems_ItemChanged( hwnd );

  AllDialogs_OnInitDialog( hwnd, hwndFocus, lParam );

  return TRUE;

} // ViewItems_OnInitDialog
Exemplo n.º 15
0
INT_PTR CDialogInstall::TabContents::OnCommand(WPARAM wParam, LPARAM lParam)
{
	switch (LOWORD(wParam))
	{
	case Id_DestinationBrowseButton:
		{
			WCHAR buffer[MAX_PATH];
			BROWSEINFO bi = {0};
			bi.hwndOwner = c_Dialog->GetWindow();
			bi.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;

			PIDLIST_ABSOLUTE pidl = SHBrowseForFolder(&bi);
			if (pidl && SHGetPathFromIDList(pidl, buffer))
			{
				HWND item = GetControl(Id_DestinationEdit);
				Static_SetText(item, buffer);
				CoTaskMemFree(pidl);
			}
		}
		break;

	default:
		return FALSE;
	}

	return TRUE;
}
Exemplo n.º 16
0
void ConvertFromMcpi(){
  double new_sens = McpiSensToSens(cvar_sens, 0.022, cvar_m_cpi);
  StringCchPrintf(global_temp_string, STRSAFE_MAX_CCH, TEXT("%.4f"), new_sens);
  Static_SetText(sens_box, global_temp_string);

  double new_senscap = McpiSensToSens(cvar_senscap, 0.022, cvar_m_cpi);
  StringCchPrintf(global_temp_string, STRSAFE_MAX_CCH, TEXT("%.4f"), new_senscap);
  Static_SetText(senscap_box, global_temp_string);

  double new_accel = McpiAccelToAccel(cvar_accel, 0.022, cvar_m_cpi);
  StringCchPrintf(global_temp_string, STRSAFE_MAX_CCH, TEXT("%.4f"), new_accel);
  Static_SetText(accel_box, global_temp_string);

  double new_offset = McpiOffsetToOffset(cvar_offset, cvar_m_cpi);
  StringCchPrintf(global_temp_string, STRSAFE_MAX_CCH, TEXT("%.4f"), new_offset);
  Static_SetText(offset_box, global_temp_string);

  double new_y_scale = McpiSensToSens(graph_max_y, 0.022, cvar_m_cpi);
  StringCchPrintf(global_temp_string, STRSAFE_MAX_CCH, TEXT("%.4f"), new_y_scale);
  Static_SetText(y_scale_box, global_temp_string);

  double new_x_scale = McpiSpeedToSpeed(graph_max_x, cvar_m_cpi);
  StringCchPrintf(global_temp_string, STRSAFE_MAX_CCH, TEXT("%.4f"), new_x_scale);
  Static_SetText(x_scale_box, global_temp_string);

  Static_SetText(m_cpi_box, L"0");
}
Exemplo n.º 17
0
LRESULT WINAPI AboutDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg)
	{
		case WM_INITDIALOG:
			hSilverBMP = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_PS2SILVER));

			SetWindowText(hDlg, _("About PCSX2"));

			Button_SetText(GetDlgItem(hDlg, IDOK), _("OK"));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_AUTHORS), _(LabelAuthors));
			Static_SetText(GetDlgItem(hDlg, IDC_PCSX_ABOUT_GREETS), _(LabelGreets));

			ConvertStaticToHyperlink( hDlg, IDC_LINK_GOOGLECODE );
			ConvertStaticToHyperlink( hDlg, IDC_LINK_WEBSITE );

		return TRUE;

		case WM_COMMAND:
			switch(wParam)
			{
				case IDOK:
					EndDialog( hDlg, TRUE );
				return TRUE;

				case IDC_LINK_WEBSITE:
					ShellExecute(hDlg, "open", "http://www.pcsx2.net/",
						NULL, NULL, SW_SHOWNORMAL);
					return TRUE;

				case IDC_LINK_GOOGLECODE:
					ShellExecute(hDlg, "open", "http://code.google.com/p/pcsx2",
						NULL, NULL, SW_SHOWNORMAL);
					return TRUE;
			}
		return FALSE;

		case WM_CLOSE:
			EndDialog( hDlg, TRUE );
		return TRUE;
	}
	return FALSE;
}
Exemplo n.º 18
0
INT_PTR DlgWait::OnInit( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
    Dialog::OnInit( hDlg, message, wParam, lParam );
    std::wstring text = L"Awaiting '" + blackbone::Utils::StripPath( _context.procPath ) + L"' launch...";
    
    Static_SetText( GetDlgItem( hDlg, IDC_WAIT_TEXT ), text.c_str() );
    SendMessage( GetDlgItem( hDlg, IDC_WAIT_BAR ), PBM_SETMARQUEE, (WPARAM)TRUE, (LPARAM)30 );

    return TRUE;
}
Exemplo n.º 19
0
INT_PTR StaticSourcePage::OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	if (uMsg == WM_COMMAND)
	{
		int dlgItem = LOWORD(wParam);

		switch (dlgItem)
		{
			case IDC_EDIT_RATE:
				if (this->m_oldFps != GetValue(IDC_EDIT_RATE))
					SetDirty();
				break;

			case IDC_BUTTON_BROWSE:
			{	
				OPENFILENAME ofn;
				ofn.lStructSize = sizeof(OPENFILENAME);
				ofn.hwndOwner = this->m_Dlg;

				ofn.hInstance = NULL;
				ofn.lpstrFilter = NULL;
				ofn.lpstrCustomFilter = NULL;
				ofn.nMaxCustFilter = NULL;
				ofn.nFilterIndex = NULL;

				wchar_t ext[MAX_PATH];
				wcscpy_s(ext, L"*.bmp");
				ofn.lpstrFile = ext;

				ofn.nMaxFile = MAX_PATH;
				ofn.lpstrFileTitle = NULL;
				ofn.nMaxFileTitle = NULL;
				ofn.lpstrInitialDir = NULL;
				ofn.lpstrTitle = L"Load Bitmap";

				ofn.Flags = NULL;
				ofn.nFileOffset = NULL;
				ofn.nFileExtension = NULL;
				ofn.lpstrDefExt = NULL;
				ofn.lCustData = NULL;
				ofn.lpfnHook = NULL;
				ofn.lpTemplateName = NULL;

				if (GetOpenFileName(&ofn))
				{
					Static_SetText(GetDlgItem(this->m_Dlg, IDC_EDIT_PATH), ofn.lpstrFile);
					SetDirty();
				}
			}
			break;
		}
	}

	return CBasePropertyPage::OnReceiveMessage(hwnd, uMsg, wParam, lParam);   
}
Exemplo n.º 20
0
BOOL On_DlgFormationEditInitDialog(HWND hdlgP, HWND hwndFocus, LPARAM lParam)
{
	editor_config::move_subcfg_right_position(hdlgP, lParam);

	std::stringstream strstr;
	if (ns::action_formation == ma_edit) {
		strstr << _("Edit formaton");
	} else {
		strstr << _("Add formaton");
	}
	SetWindowText(hdlgP, utf8_2_ansi(strstr.str().c_str()));

	Static_SetText(GetDlgItem(hdlgP, IDC_STATIC_LEADER), utf8_2_ansi(_("Leader")));
	Static_SetText(GetDlgItem(hdlgP, IDC_STATIC_CITY), utf8_2_ansi(_("City")));
	
	tformation& f = ns::core.formations_updating_[ns::clicked_formation];
	f.update_to_ui_formation_edit(hdlgP);

	return FALSE;
}
Exemplo n.º 21
0
VOID EditTrigger_InitList( HWND hwnd )
{
  INT i;
  HWND hwndCtrl;

  hwndCtrl = GetDlgItem( hwnd, IDC_EDIT_TRIGGER_LIST );

  ListBox_ResetContent( hwndCtrl );

  if ( nListContent == 0 )
  {
    for( i = 0; i < NUM_ITEM_TYPES; ++i )
    {
      ListBox_AddString( hwndCtrl, GetItemTypeString( i ) );
    }

    ListBox_SetCurSel( hwndCtrl, nNewItemType );

    hwndCtrl = GetDlgItem(hwnd, IDC_EDIT_TRIGGER_LIST_STATIC);
    Static_SetText(hwndCtrl, (LPSTR)"Items:");
  }
  else
  {
    for( i = 0; i < po->nSounds; ++i )
    {
      ListBox_AddString( hwndCtrl, po->pSoundData[i].sound_name );
    }

    ListBox_SetCurSel( hwndCtrl, nNewSoundIndex );

    hwndCtrl = GetDlgItem(hwnd, IDC_EDIT_TRIGGER_LIST_STATIC);
    Static_SetText(hwndCtrl, (LPSTR)"Sounds:");
  }

  return;

} // EditTrigger_InitList
Exemplo n.º 22
0
BOOL CALLBACK AboutDlg::run_dlgProc (UINT message, WPARAM wParam, LPARAM lParam)
{
  switch (message)
  {
  case WM_INITDIALOG:
    {
      TCHAR *Ver = 0;
      GetProductAndVersion (Ver);
      Static_SetText (::GetDlgItem(_hSelf, IDC_VERSION), Ver);
      CLEAN_AND_ZERO_ARR (Ver);
    }
    return TRUE;
  case WM_NOTIFY:
    {
      switch (((LPNMHDR)lParam)->code)
      {
      case NM_CLICK:          // Fall through to the next case.
      case NM_RETURN:
        {
          PNMLINK pNMLink = (PNMLINK)lParam;
          LITEM   item    = pNMLink->item;

          ShellExecute(NULL, _T ("open"), item.szUrl, NULL, NULL, SW_SHOW);

          return TRUE;
        }
      }
      return FALSE;
    }
    break;
  case WM_COMMAND:
    {
      switch (LOWORD (wParam))
      {
      case IDOK:
      case IDCANCEL:
        if (HIWORD (wParam) == BN_CLICKED)
        {
          display (false);
          return TRUE;
        }
      }
    }
    break;
  }
  return FALSE;
}
Exemplo n.º 23
0
HRESULT StaticSourcePage::OnApplyChanges(void)
{
	if (this->m_bDirty && this->m_staticSourceParams != NULL)
	{
		this->m_staticSourceParams->SetFrameRate(GetValue(IDC_EDIT_RATE));
		
		wchar_t path[MAX_PATH];
		Static_GetText(GetDlgItem(this->m_Dlg, IDC_EDIT_PATH), path, MAX_PATH);

		if (SetBitmapFile(path) != S_OK)
			Static_SetText(GetDlgItem(this->m_Dlg, IDC_EDIT_PATH), L"");

		RefreshValues();
	}

	return S_OK;
}
Exemplo n.º 24
0
/*
 * OnInitDialog()
 */
BOOL cd_OnInitDialog(HWND copyInstDlg, HWND focusCtrl, LPARAM lParam)
{
    HWND parentWnd = GetParent(copyInstDlg);
#define TEXT_LEN 80
    _TUCHAR text[TEXT_LEN];

    /*
     * Set up the window.
     */
    Window_Center(copyInstDlg, parentWnd);

    /*
     * Initialize control settings.
     */
    _sntprintf(text, TEXT_LEN, _T("Select the instruments you want to ")
            _T("copy the settings of instrument %d to."), cd_srcInst + 1);
    Static_SetText(GetDlgItem(copyInstDlg, IDC_COPY_INST_LBL), text);
    EnableWindow(GetDlgItem(copyInstDlg, IDC_INST1_CHK + cd_srcInst), FALSE);

    return TRUE;
}
Exemplo n.º 25
0
BOOL
ParentObjPick::Pick(IObjParam *ip,ViewExp *vpt)
{
    if (vpt->HitCount() == 0)
        return FALSE;

    INode *node;
    if ((node = vpt->GetClosestHit()) != NULL &&
        parent->ReplaceReference(1, node) == REF_SUCCEED) {

        SetPickMode(NULL);
     // parent->iObjParams->SetCommandMode(parent->previousMode);
     // parent->previousMode = NULL;
        parent->ParentPickButton->SetCheck(FALSE);
        HWND hw = parent->hRollup;
        Static_SetText(GetDlgItem(hw,IDC_TRIGGER_OBJ),
                       parent->triggerObject->GetName());
        return FALSE;
    }
    return FALSE;
}
Exemplo n.º 26
0
VOID ViewItems_ItemChanged( HWND hwnd )
{
  INT i, j, k, num_elements, num_bitmaps;
  CHAR szBuf[128];
  HWND hwndList;
  LRESULT lResult;

  lResult = ListBox_GetCurSel( GetDlgItem( hwnd, IDC_ITEM_LIST ) );

  if ( lResult >= 0 && lResult < po->nItems )
  {
    i = (INT)lResult;

    hwndList = GetDlgItem( hwnd, IDC_ITEM_RESOURCES );

    ListBox_ResetContent( hwndList );

    num_elements = GetNumItemElements( po->pItemData[i].item_type );
    num_bitmaps = GetNumItemBitmaps( po->pItemData[i].item_type );

    for( j = 0; j < num_elements; ++j )
    {
      k = po->pItemData[i].index[j];

      if ( j < num_bitmaps )
      {
        if ( k >= 0 && k < po->nBitmaps )
        {
          ListBox_AddString( hwndList, po->pBitmapData[k].bitmap_name );
        }
      }
      else
      {
        if ( k >= 0 && k < po->nSounds )
        {
          ListBox_AddString( hwndList, po->pSoundData[k].sound_name );
        }
      }
    }

    ListBox_SetCurSel( hwndList, 0 );

    j = po->pItemData[i].index[0];

    if ( j >= 0 && j < po->nBitmaps && num_bitmaps > 0 )
    {
      PreviewBitmap( hwnd,
                     IDC_ITEM_BITMAP_PREVIEW,
                     IDC_ITEM_BITMAP_SIZE,
                     &po->pBitmapData[j],
                     po->pPalette );
    }
    else
    {
      PreviewBitmap( hwnd,
                     IDC_ITEM_BITMAP_PREVIEW,
                     IDC_ITEM_BITMAP_SIZE,
                     NULL,
                     NULL );
    }

    Static_SetText( GetDlgItem( hwnd, IDC_ITEM_TYPE ),
                    GetItemTypeString( po->pItemData[i].item_type ) );

    DoubleToString( szBuf, po->pItemData[i].pixel_size, 2 );
    Edit_SetText( GetDlgItem( hwnd, IDC_ITEM_PIXEL_SIZE ), szBuf );
  }

  return;
  
} // ViewItems_ItemChanged
Exemplo n.º 27
0
VOID
ProcessCommands(
    HWND hwnd,
    INT  id,
    HWND hwndCtl,
    UINT codeNotify)
{
    DWORD        exitCode;
    CHAR         buffer[20];
    ULONG        tid;
    ULONG        units;

    switch (id) {
        case DRV_BOX:
            if (codeNotify == CBN_KILLFOCUS) {

                //
                // Determine sector size of chosen drive.
                //

                ComboBox_GetText(GetDlgItem(hwnd,DRV_BOX),buffer, 4);
                sprintf(TestDrv,"\\\\.\\");
                strcat(TestDrv,buffer);
                TestDrv[6] = '\0';
                GetSectorSize(&SectorSize,TestDrv);

            }

            break;

        case START_BUTTON:

            if (!TestFileCreated) {

                //
                // Create gauge window.
                //

                units = GetDialogBaseUnits();

                Gauge = CreateWindow("static","",
                                 WS_CHILD | WS_VISIBLE | SS_BLACKFRAME,
                                 (INT)(10 * (units & 0xFFFF) / 4),
                                 (INT)(60 * (units >> 16) / 8),
                                 (INT)(150 *  (units & 0xFFFF) / 4),
                                 (INT)(12 * (units >> 16) / 8),
                                 hwnd,
                                 (HMENU)(26),
                                 HInst,
                                 NULL);

                GaugeId = GetDlgCtrlID(Gauge);

                TestFileParams.TestDrive = TestDrv;
                TestFileParams.TestFile  = TestFile;
                TestFileParams.Window    = hwnd;

                ThrdHandle = CreateThread (NULL,0,(LPTHREAD_START_ROUTINE)CreateTestFile, &TestFileParams,CREATE_SUSPENDED,&tid);

                //
                // Disable controls
                //

                Button_Enable(GetDlgItem(hwnd,STOP_BUTTON), TRUE);
                SetFocus(GetDlgItem(hwnd,STOP_BUTTON));
                Button_Enable(GetDlgItem(hwnd,START_BUTTON), FALSE);

                SetTimer(hwnd,TIMER_ID2,1000,(TIMERPROC)NULL);

                ResumeThread(ThrdHandle);

                sprintf(buffer,"CREATING TEST FILE");
                Static_SetText(GetDlgItem(hwnd,STATUS_TEST), buffer);

                break;
            }

            //
            // Determine the test drive.
            //

            strcpy(TestDrv,"\\\\.\\");
            ComboBox_GetText(GetDlgItem(hwnd,DRV_BOX),buffer, 4);
            strcat (TestDrv,buffer);
            TestDrv[6] = '\0';

            //
            // Determine the test case.
            //

            index = Button_GetCheck(GetDlgItem(hwnd,TEST_RAD_WRITE));
            index <<= 1;
            index |= Button_GetCheck(GetDlgItem(hwnd,VAR_RAD_RAND));

            //
            // Update the status fields
            //

            sprintf(buffer,"%Lu",BufferSize);
            Static_SetText(GetDlgItem(hwnd,STATUS_BUFFER ),buffer);
            sprintf(buffer,"%d",IoCount);
            Static_SetText(GetDlgItem(hwnd,STATUS_IOCOUNT), buffer);

            sprintf(buffer,"%s",(index >> 1) ? "Write" : "Read");
            Static_SetText(GetDlgItem(hwnd,STATUS_CASE), buffer);

            sprintf(buffer,"%s",(index & 0x1) ? "Random" : "Sequential");
            Static_SetText(GetDlgItem(hwnd,STATUS_CASE1), buffer);

            sprintf(buffer,"RUNNING");
            Static_SetText(GetDlgItem(hwnd,STATUS_TEST), buffer);

            ElapsedTime = Seconds = Minutes = Hours = Days = 0;
            SetTimer(hwnd,TIMER_ID,1000,(TIMERPROC)NULL);

            //
            // Gather parameters and launch the test.
            //

            Params.BufferSize = BufferSize;
            Params.TargetFile = TestFile;
            Params.Tcount     = NumberIOs;

            RunTest = TRUE;

            //
            // Launch the thread.
            //

            ThrdHandle = CreateThread (NULL,
                                           0,
                                           TestProc[index],
                                           &Params,
                                           CREATE_SUSPENDED,
                                           &tid
                                           );

            ResumeThread(ThrdHandle);

            //
            // Disable controls
            //

            Button_Enable(GetDlgItem(hwnd,STOP_BUTTON), TRUE);
            SetFocus(GetDlgItem(hwnd,STOP_BUTTON));
            Button_Enable(GetDlgItem(hwnd,START_BUTTON), FALSE);

            break;

        case STOP_BUTTON:

            if (!TestFileCreated) {

                //
                // Kill the test file create thread.
                //

                KillFileCreate = TRUE;

                WaitForSingleObject(ThrdHandle,INFINITE);

                //
                // Redo button enable/disable/focus
                //

                Button_Enable(GetDlgItem(hwnd,START_BUTTON), TRUE);
                Button_Enable(GetDlgItem(hwnd,STOP_BUTTON), FALSE);

                SetFocus(GetDlgItem(hwnd,START_BUTTON));

                KillTimer(hwnd, TIMER_ID2);
                KillFileCreate = FALSE;

                sprintf(buffer,"STOPPED");
                Static_SetText(GetDlgItem(hwnd,STATUS_TEST), buffer);

                DestroyWindow(Gauge);
                UpdateWindow(hwnd);

                break;
            }

            KillTimer(hwnd, TIMER_ID);

            //
            // If the thread is not running disregard it.
            //

            GetExitCodeThread(ThrdHandle,&exitCode);
            if (exitCode == STILL_ACTIVE) {

                //
                // Set flag to kill the threads.
                //

                RunTest = FALSE;

                if ((WaitForSingleObject (ThrdHandle,INFINITE)) == WAIT_FAILED) {

                    //
                    // TODO: Do something drastic.
                    //

                }
            }

            //
            // Re-enable/disable buttons
            //

            Button_Enable(GetDlgItem(hwnd,START_BUTTON), TRUE);
            Button_Enable(GetDlgItem(hwnd,STOP_BUTTON), FALSE);


            SetFocus(GetDlgItem(hwnd,START_BUTTON));

            sprintf(buffer,"STOPPED");
            Static_SetText(GetDlgItem(hwnd,STATUS_TEST), buffer);


            break;

        case QUIT_BUTTON:
        case IDCANCEL:
            EndDialog(hwnd, id);
            break;
    default:
        break;
    }
Exemplo n.º 28
0
BOOL
InitDialog (
    HWND hwnd,
    HWND hwndFocus,
    LPARAM lParam
    )
{
    BOOLEAN Found = FALSE;
    CHAR   buffer[34];
    DWORD  bytes;
    HWND   Drives = GetDlgItem (hwnd,DRV_BOX);
    PCHAR  lp;
    UINT   i = 0,
           NoDrives = 0;

    srand(GetTickCount());
    Button_Enable(GetDlgItem(hwnd,STOP_BUTTON), FALSE);


    //
    // Get attached drives, filter out non-disk drives, and fill drive box.
    //

    bytes = GetLogicalDriveStrings(0,NULL);

    DrvStrHandle = VirtualAlloc(NULL,bytes + 1,
                                MEM_COMMIT | MEM_RESERVE,
                                PAGE_READWRITE);

    GetLogicalDriveStrings( bytes, DrvStrHandle);
    for (lp = DrvStrHandle;*lp; ) {
        if (GetDriveType(lp) == DRIVE_FIXED) {
            ComboBox_AddString(Drives,lp);
            ++NoDrives;
        }
        while(*lp++);
    }

    //
    // Check for cmd line params passed in, and set the test drive to either
    // the specified drive, or to the first in the drive list.
    //

    ComboBox_SetCurSel (Drives,0);
    if (TestDrv[4] != '\0') {
        do {
            ComboBox_GetText(GetDlgItem(hwnd,DRV_BOX),buffer,4);
            if (buffer[0] == TestDrv[4]) {
                Found = TRUE;
            } else {
                if (++i >= NoDrives) {
                    Found = TRUE;
                } else {
                    ComboBox_SetCurSel (Drives,i);
                }
            }
        } while (!Found);
        if (i >= NoDrives) {

            //
            // Couldn't find the drive, exit with a message.
            //

            LogError("Incorrect Drive Letter in command line.",1,0);
            EndDialog(hwnd,0);
            return FALSE;
        }

    } else {
        ComboBox_SetCurSel (Drives,0);
    }

    //
    // Get the sector size for the default selection.
    //
    TestDrv[4] = '\0';
    ComboBox_GetText(GetDlgItem(hwnd,DRV_BOX),buffer, 4);
    strcat (TestDrv,buffer);
    TestDrv[6] = '\0';
    GetSectorSize(&SectorSize,TestDrv);

    //
    // If index is 0, use defaults, otherwise set the test according to
    // the cmdline passes in.
    //

    Button_SetCheck(GetDlgItem(hwnd,TEST_RAD_READ + (index >> 1)), TRUE);
    Button_SetCheck(GetDlgItem(hwnd,VAR_RAD_SEQ + (index & 0x01)),TRUE);

    //
    // Set buffer size.
    //

    if (BufferSize == 0) {

        BufferSize = 65536;
        NumberIOs = FILE_SIZE / BufferSize;

    } else {

        //
        // Verify that buffersize is a multiple of sector size, if not adjust it.
        //

        if (BufferSize % SectorSize) {
            BufferSize &= ~(SectorSize - 1);
        }

        NumberIOs = FILE_SIZE / BufferSize;

        //
        // Cmd line was present and has been used to config. the test. Send a message
        // to the start button to get things rolling.
        //

        SendMessage(hwnd,WM_COMMAND,(BN_CLICKED << 16) | START_BUTTON,(LPARAM)GetDlgItem(hwnd,START_BUTTON));
    }
    _ultoa(BufferSize,buffer,10);
    Static_SetText(GetDlgItem(hwnd,BUFFER_TEXT),buffer);

    return(TRUE);
}
Exemplo n.º 29
0
static INT_PTR CALLBACK NetworkOutputDlgProc(
    _In_ HWND hwndDlg,
    _In_ UINT uMsg,
    _In_ WPARAM wParam,
    _In_ LPARAM lParam
    )
{
    PNETWORK_OUTPUT_CONTEXT context;

    if (uMsg == WM_INITDIALOG)
    {
        context = (PNETWORK_OUTPUT_CONTEXT)lParam;
        SetProp(hwndDlg, L"Context", (HANDLE)context);
    }
    else
    {
        context = (PNETWORK_OUTPUT_CONTEXT)GetProp(hwndDlg, L"Context");

        if (uMsg == WM_DESTROY)
        {
            PhSaveWindowPlacementToSetting(SETTING_NAME_TRACERT_WINDOW_POSITION, SETTING_NAME_TRACERT_WINDOW_SIZE, hwndDlg);
            PhDeleteLayoutManager(&context->LayoutManager);

            if (context->ProcessHandle)
            {
                // Terminate the child process.
                PhTerminateProcess(context->ProcessHandle, STATUS_SUCCESS);

                // Close the child process handle.
                NtClose(context->ProcessHandle);
            }

            // Close the pipe handle.
            if (context->PipeReadHandle)
                NtClose(context->PipeReadHandle);

            RemoveProp(hwndDlg, L"Context");
            PhFree(context);
        }
    }

    if (!context)
        return FALSE;

    switch (uMsg)
    {
    case WM_INITDIALOG:
        {
            PH_RECTANGLE windowRectangle;

            context->WindowHandle = hwndDlg;
            context->OutputHandle = GetDlgItem(hwndDlg, IDC_NETOUTPUTEDIT);

            PhInitializeLayoutManager(&context->LayoutManager, hwndDlg);
            PhAddLayoutItem(&context->LayoutManager, context->OutputHandle, NULL, PH_ANCHOR_ALL);
            PhAddLayoutItem(&context->LayoutManager, GetDlgItem(hwndDlg, IDC_MORE_INFO), NULL, PH_ANCHOR_BOTTOM | PH_ANCHOR_LEFT);
            PhAddLayoutItem(&context->LayoutManager, GetDlgItem(hwndDlg, IDOK), NULL, PH_ANCHOR_BOTTOM | PH_ANCHOR_RIGHT);

            windowRectangle.Position = PhGetIntegerPairSetting(SETTING_NAME_TRACERT_WINDOW_POSITION);
            windowRectangle.Size = PhGetIntegerPairSetting(SETTING_NAME_TRACERT_WINDOW_SIZE);

            if (MinimumSize.left == -1)
            {
                RECT rect;

                rect.left = 0;
                rect.top = 0;
                rect.right = 190;
                rect.bottom = 120;
                MapDialogRect(hwndDlg, &rect);
                MinimumSize = rect;
                MinimumSize.left = 0;
            }

            // Check for first-run default position.
            if (windowRectangle.Position.X == 0 || windowRectangle.Position.Y == 0)
            {
                PhCenterWindow(hwndDlg, GetParent(hwndDlg));
            }
            else
            {
                PhLoadWindowPlacementFromSetting(SETTING_NAME_TRACERT_WINDOW_POSITION, SETTING_NAME_TRACERT_WINDOW_SIZE, hwndDlg);
            }

            if (context->IpAddress.Type == PH_IPV4_NETWORK_TYPE)
            {
                RtlIpv4AddressToString(&context->IpAddress.InAddr, context->IpAddressString);
            }
            else
            {
                RtlIpv6AddressToString(&context->IpAddress.In6Addr, context->IpAddressString);
            }

            switch (context->Action)
            {
            case NETWORK_ACTION_TRACEROUTE:
                {
                    HANDLE dialogThread = INVALID_HANDLE_VALUE;

                    Static_SetText(context->WindowHandle,
                        PhaFormatString(L"Tracing route to %s...", context->IpAddressString)->Buffer
                        );

                    if (dialogThread = PhCreateThread(0, NetworkTracertThreadStart, (PVOID)context))
                        NtClose(dialogThread);
                }
                break;
            case NETWORK_ACTION_WHOIS:
                {
                    HANDLE dialogThread = INVALID_HANDLE_VALUE;

                    Static_SetText(context->WindowHandle,
                        PhaFormatString(L"Whois %s...", context->IpAddressString)->Buffer
                        );

                    ShowWindow(GetDlgItem(hwndDlg, IDC_MORE_INFO), SW_SHOW);

                    if (dialogThread = PhCreateThread(0, NetworkWhoisThreadStart, (PVOID)context))
                        NtClose(dialogThread);
                }
                break;
            }
        }
        break;
    case WM_COMMAND:
        {
            switch (LOWORD(wParam))
            {
            case IDCANCEL:
            case IDOK:
                PostQuitMessage(0);
                break;
            }
        }
        break;
    case WM_SIZE:
        PhLayoutManagerLayout(&context->LayoutManager);
        break;
    case WM_SIZING:
        PhResizingMinimumSize((PRECT)lParam, wParam, MinimumSize.right, MinimumSize.bottom);
        break;
    case WM_CTLCOLORDLG:
    case WM_CTLCOLORSTATIC:
        {
            HDC hDC = (HDC)wParam;
            HWND hwndChild = (HWND)lParam;

            // Check if old graph colors are enabled.
            if (!PhGetIntegerSetting(L"GraphColorMode"))
                break;

            // Set a transparent background for the control backcolor.
            SetBkMode(hDC, TRANSPARENT);

            // Check for our edit control and change the color.
            if (hwndChild == context->OutputHandle)
            {
                // Set text color as the Green PH graph text color.
                SetTextColor(hDC, RGB(124, 252, 0));

                // Set a black control backcolor.
                return (INT_PTR)GetStockBrush(BLACK_BRUSH);
            }
        }
        break;
    case WM_NOTIFY:
        {
            switch (((LPNMHDR)lParam)->code)
            {
            case NM_CLICK:
            case NM_RETURN:
                {
                    PNMLINK syslink = (PNMLINK)lParam;

                    if (syslink->hdr.idFrom == IDC_MORE_INFO)
                    {
                        PhShellExecute(
                            PhMainWndHandle,
                            PhaConcatStrings2(L"http://wq.apnic.net/apnic-bin/whois.pl?searchtext=", context->IpAddressString)->Buffer,
                            NULL
                            );
                    }
                }
                break;
            }
        }
        break;
    case NTM_RECEIVEDTRACE:
        {
            OEM_STRING inputString;
            UNICODE_STRING convertedString;
            PH_STRING_BUILDER receivedString;

            if (wParam != 0)
            {
                inputString.Buffer = (PCHAR)lParam;
                inputString.Length = (USHORT)wParam;

                if (NT_SUCCESS(RtlOemStringToUnicodeString(&convertedString, &inputString, TRUE)))
                {
                    PPH_STRING windowText = NULL;

                    PhInitializeStringBuilder(&receivedString, PAGE_SIZE);

                    // Get the current output text.
                    windowText = PhGetWindowText(context->OutputHandle);

                    // Append the current output text to the New string.
                    if (!PhIsNullOrEmptyString(windowText))
                        PhAppendStringBuilder(&receivedString, &windowText->sr);

                    PhAppendFormatStringBuilder(&receivedString, L"%s", convertedString.Buffer);

                    // Remove leading newlines.
                    if (receivedString.String->Length >= 2 * 2 &&
                        receivedString.String->Buffer[0] == '\r' &&
                        receivedString.String->Buffer[1] == '\n')
                    {
                        PhRemoveStringBuilder(&receivedString, 0, 2);
                    }

                    SetWindowText(context->OutputHandle, receivedString.String->Buffer);
                    SendMessage(
                        context->OutputHandle,
                        EM_SETSEL,
                        receivedString.String->Length / 2 - 1,
                        receivedString.String->Length / 2 - 1
                        );
                    SendMessage(context->OutputHandle, WM_VSCROLL, SB_BOTTOM, 0);

                    PhDereferenceObject(windowText);
                    PhDeleteStringBuilder(&receivedString);
                    RtlFreeUnicodeString(&convertedString);
                }
            }
        }
        break;
    case NTM_RECEIVEDWHOIS:
        {
            OEM_STRING inputString;
            UNICODE_STRING convertedString;
            PH_STRING_BUILDER receivedString;

            if (lParam != 0)
            {
                inputString.Buffer = (PCHAR)lParam;
                inputString.Length = (USHORT)wParam;

                if (NT_SUCCESS(RtlOemStringToUnicodeString(&convertedString, &inputString, TRUE)))
                {
                    USHORT i;

                    PhInitializeStringBuilder(&receivedString, PAGE_SIZE);

                    // Convert carriage returns.
                    for (i = 0; i < convertedString.Length; i++)
                    {
                        if (convertedString.Buffer[i] == '\n')
                        {
                            PhAppendStringBuilder2(&receivedString, L"\r\n");
                        }
                        else
                        {
                            PhAppendCharStringBuilder(&receivedString, convertedString.Buffer[i]);
                        }
                    }

                    // Remove leading newlines.
                    if (receivedString.String->Length >= 2 * 2 &&
                        receivedString.String->Buffer[0] == '\r' &&
                        receivedString.String->Buffer[1] == '\n')
                    {
                        PhRemoveStringBuilder(&receivedString, 0, 2);
                    }

                    SetWindowText(context->OutputHandle, receivedString.String->Buffer);
                    SendMessage(
                        context->OutputHandle,
                        EM_SETSEL,
                        receivedString.String->Length / 2 - 1,
                        receivedString.String->Length / 2 - 1
                        );
                    SendMessage(context->OutputHandle, WM_VSCROLL, SB_TOP, 0);

                    PhDeleteStringBuilder(&receivedString);
                    RtlFreeUnicodeString(&convertedString);
                }

                PhFree((PVOID)lParam);
            }
        }
        break;
    case NTM_RECEIVEDFINISH:
        {
            PPH_STRING windowText = PhGetWindowText(context->WindowHandle);

            if (windowText)
            {
                Static_SetText(
                    context->WindowHandle,
                    PhaFormatString(L"%s Finished.", windowText->Buffer)->Buffer
                    );
                PhDereferenceObject(windowText);
            }
        }
        break;
    }

    return FALSE;
}
Exemplo n.º 30
0
void CALLBACK TimerProc( HWND, UINT, UINT_PTR, DWORD ) 
{	
	Static_SetText( hwTime, ex.get_time_differense().c_str());
}