Glaand 3 Posted December 6, 2015 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á:Espero ter ajudado :)Cumpz,Glaand 3 morfo2, Laurindinha and Cσяvσ⋆ reacted to this Share this post Link to post Share on other sites
'PACI 2,317 Posted December 6, 2015 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
Glaand 3 Posted December 6, 2015 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
Marcos Pinheiro 22 Posted September 5, 2016 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