Jump to content

Recommended Posts

  • Honorable Member

Hello everyone.

 

If you play or played on gameforge servers you should to know that what is this.

When you are opening more than one clients the icon of the applications (on the windows taskbar) are groupped like 

Spoiler

22222510437e6a16.jpg.98c6885f4e30f36b3b9

With this little modification you can do like this(as on gameforge clients work):

Spoiler

222225043d75ec60.jpg.6c3e3b53a128595b9d1

 

 

Open the EterLib\MSWindow.cpp and paste this under the #include <windowsx.h> line:

#define DISABLE_TASKBAR_GROUPING
#ifdef DISABLE_TASKBAR_GROUPING
#include <Shobjidl.h>
#endif

Then scroll down to the CMSWindow::Create function and search this code:

	if (!m_hWnd)
		return false;

Paste the following code below of that:

#ifdef DISABLE_TASKBAR_GROUPING
	OSVERSIONINFO v;
	v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
	GetVersionEx(&v);
	if (v.dwMajorVersion == 6 && v.dwMinorVersion >= 1 || v.dwMajorVersion > 6)
	{
		WCHAR myAppID[128];
		swprintf(myAppID, sizeof(myAppID) / sizeof(myAppID[0]), L"MyMetin2AppID%u", GetCurrentProcessId());
		HRESULT hr = SetCurrentProcessExplicitAppUserModelID(myAppID);
		if (!SUCCEEDED(hr))
			return false;
	}
#endif

 

The if-statement checks your windows version and if passed, the ungrouping will run. (6.1 is Win7SP1)

P3NG3R

  • Metin2 Dev 1
  • Love 1
  • Love 19
Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • Active+ Member

Good job but have a little problem about "SetCurrentProcessExplicitAppUserModelID" usage API works on Win7 or later, You already do requirement with GetVersionEx but it is not enough because you are already used "SetCurrentProcessExplicitAppUserModelID" in your client and builded IAT with this API so when XP or Vista users try run your client he will get this error.

Spoiler

sdds.png

You need call as dynamic, like this;

    OSVERSIONINFO v;
    v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
    GetVersionEx(&v);
    
    if (v.dwMajorVersion >= 6 && v.dwMinorVersion >= 1)
    {
        WCHAR myAppID[128];
        swprintf(myAppID, sizeof(myAppID) / sizeof(myAppID[0]), L"MyMetin2AppID%u", GetCurrentProcessId());
        
        typedef HRESULT(WINAPI* SetCurrentProcessExplicitAppUserModelIDptr)(_In_ PCWSTR AppID);
        SetCurrentProcessExplicitAppUserModelIDptr SetCurrentProcessExplicitAppUserModelIDo = (SetCurrentProcessExplicitAppUserModelIDptr)GetProcAddress(LoadLibraryA("shell32.dll"), "SetCurrentProcessExplicitAppUserModelID");
        if (SetCurrentProcessExplicitAppUserModelIDo)

        {
            HRESULT hr = SetCurrentProcessExplicitAppUserModelIDo(myAppID);
            if (!SUCCEEDED(hr))
                return false;
        }
    }

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 3
Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/#findComment-77241
Share on other sites

  • Premium

Oh my holy FORTRAN lord. :'(

2016 and You sayin' XP users.

Vista? Normal people NEVER use the "vista" the vista is the Satan's work.

Sorry but your comment a little bit bullshit.

And sorry for my english.

Kind regards, best regards, fuckin' yolo regards and etc.

 

  • Love 2
Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/#findComment-77267
Share on other sites

  • Honorable Member

My friend, Void tried to say that, the prior operationg systems are out of date to use in this decade, and don't need solution to work on those systems, I think.

ofc yr code isn't bad, but nowaday who want to use XP or S: vista :S damn oh god pls :ph34r:

Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/#findComment-77281
Share on other sites

  • Honorable Member
14 minutes ago, xP3NG3Rx said:

nowaday who want to use XP or S: vista :S damn oh god pls :ph34r:

Only a relevant % of turkish people use XP nowadays. (so, in that case, it's crucial)

Vista users can't even boot windows without getting 2-3 BSOD, so they are not a problem.

  • Lmao 1
Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/#findComment-77282
Share on other sites

  • Active+ Member
18 minutes ago, martysama0134 said:

Only a relevant % of turkish people use XP nowadays. (so, in that case, it's crucial)

Yes, that's a good point, Still a million guys uses Core 2 Duo and windows XP and we're talking about Metin2 so is not a AAA game.

Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/#findComment-77285
Share on other sites

güzel mevzuyu anlamayan arkadaşlar şöyle anlatabilirim.

araç çubuğunuzda minimize yani küçült(aşağı al) butonuna aldığınızdada

aynı oyundan iki tane client çalışıyorsa ayrı ayrı gösteriyor zaten gereksiz

You Lose :)

4b70c3f52b944d528ef99711959f653c.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/13055-ungroup-client-on-taskbar/#findComment-77294
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.