antiblock
Cyphriun
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
Glaand

[Source - Cliente] Janelas Separadas Na Barra De Tarefas

4 posts in this topic

Neste tópico estará descrito como separar as janelas do cliente na barra de tarefas.
 
Algo muito fácil de fazer e que é muito útil aos jogadores.
 
Segue então abaixo o tutorial:
 

  • Abram o ficheiro UserInterface.cpp que se encontra na pasta UserInterface da Source do Cliente.
  • Definam no topo do ficheiro seguinte código:
typedef HRESULT(__stdcall *SETCURRENTPROCESSEXPLICITAPPUSERMODELIDPROC)(PCWSTR AppID);
  • Procurem seguinte função: "bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)" 
  • Dentro dessa função após "SetLogLevel(1);" introduzam o código seguinte:
        OSVERSIONINFO v;

	v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
	GetVersionEx(&v);

	if (v.dwMajorVersion == 6 && v.dwMinorVersion > 1 || v.dwMajorVersion > 6)
	{
		//on Windows 7 or higher ungroup taskbar for separate process
		DWORD currentProcessId = GetCurrentProcessId();
		WCHAR AppID[100];
		swprintf(AppID, sizeof(AppID) / sizeof(AppID[0]), L"Cyber-Gamers_ID_%u", currentProcessId);
		HMODULE hmodShell32 = LoadLibrary("shell32.dll");
		if (hmodShell32 != NULL)
		{
			// see if the function is exposed by the current OS
			SETCURRENTPROCESSEXPLICITAPPUSERMODELIDPROC pfnSetCurrentProcessExplicitAppUserModelID =
				reinterpret_cast<SETCURRENTPROCESSEXPLICITAPPUSERMODELIDPROC>(GetProcAddress(hmodShell32,
				"SetCurrentProcessExplicitAppUserModelID"));
			if (pfnSetCurrentProcessExplicitAppUserModelID != NULL)
			{
				pfnSetCurrentProcessExplicitAppUserModelID(AppID);
			}

			FreeLibrary(hmodShell32);
		}
	}

 
E voilá:
bsN1h.png

Espero ter ajudado :)

Cumpz,

Glaand

Share this post


Link to post
Share on other sites
antiblock
Elveron

E essa piece de código é tua? Pareceu me ter visto algo semelhante, senão igual há poucos dias.

Boa partilha na mesma, abraço.

Share this post


Link to post
Share on other sites

E essa piece de código é tua? Pareceu me ter visto algo semelhante, senão igual há poucos dias.

Boa partilha na mesma, abraço.

 

Sim. Bem, o iDevil disse-me que seria algo muito útil.

 

Basicamente foi pesquisa de segundos xD mas solução eterna.

 

Mais tópicos irão aparecendo.

Share this post


Link to post
Share on other sites

Boa tarde, segui o tutorial acima e ao compilar o bin me aparece os seguintes erros:

 

2>------ Compilação iniciada: Projeto: UserInterface, Configuração: Distribute Win32 ------
2>  InstanceBase.cpp
2>  UserInterface.cpp
2>..\..\source\UserInterface\UserInterface.cpp(390): error C2065: 'SETCURRENTPROCESSEXPLICITAPPUSERMODELIDPROC' : identificador não declarado
2>..\..\source\UserInterface\UserInterface.cpp(390): error C2065: 'pfnSetCurrentProcessExplicitAppUserModelID' : identificador não declarado
2>..\..\source\UserInterface\UserInterface.cpp(391): error C2061: erro de sintaxe : identificador 'SETCURRENTPROCESSEXPLICITAPPUSERMODELIDPROC'
2>..\..\source\UserInterface\UserInterface.cpp(393): error C2065: 'pfnSetCurrentProcessExplicitAppUserModelID' : identificador não declarado
2>..\..\source\UserInterface\UserInterface.cpp(395): error C3861: 'pfnSetCurrentProcessExplicitAppUserModelID': identificador não encontrado
========== Compilar: 1 com êxito, 1 com falha, 14 atualizados, 0 ignorados ==========
 
Alguém, poderia me ajudar com esse erros, desde já agradeço a todos..
 
Tenham uma boa tarde!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this