I don't know if I understood your question correctly; but from what I understood, you would like to "swap" some buttons of your mouse.
I have a Logitech G700, and a few weeks after buying it, the middle button (wheel click) stopped working. I have since exchanged a thumb button with the middle click button using the Logitech software (Logitech Gaming Software) if I remember right) available from the Logitech website.
Since then, the mouse has the buttons permanently exchanged in its firmware, so that when I use it on another computer/Operating System, the middle click is still assigned to the thumb button of my choice.
So if you want to swap buttons (if I remember right, it is also possible to "duplicate" buttons, i.e. assign the same event to multiple different buttons), that might just do it.
After understanding the question more clearly, it is about defining new system input events. Since this question is posted in Arqade, I will assume that the Operating System is one of the Windows Family. On other operating systems (such as MacOS or Linux or other UNIXes), the answer would be drastically different.
And as the other answer already indicated, the short answer is "No. You cannot do that.".
The long answer is:
The hardware device defined as "mouse" contains electronics, which register your input into some buffered memory, which is in turn polled by your operating system (if you use USB. If you use PS/2 the behavior is different and will use interrupts (IRQ) instead of polling - but in the scope of this answer, it is mostly irrelevant). Then the operating system interprets the data obtained via polling, and passes in turn to your application (Game, in our case).
Software wise, the chain is as follow: Mouse firmware (in the mouse) → Mouse Driver (in the OS) → Operating System → Application.
As you can see, this chain involves a handful of different components, and all of them are required to understand an event for it to be passed on.
While your firmware needs to know about different buttons to be able to assign different actions to each of them, and while your driver also needs to understand the corresponding messages (so, different ones) to be able to pass them to the Operating System; windows has a predefined list of understood virtual events for both the mouse and the keyboard, and a predefined list of mouse_event flags. While I don't know if/when those
VK_* constants are actually used for the mouse handling (I know they are for the keyboard), it is clear from both lists that only five mouse buttons are supported by windows. This is confirmed here.
So, why did I type all this, if it is indeed impossible to do what you want?
Because the limitation here is Windows, and there is a way (without using a different Operating System) to circumvent that limitation. That way is: to use unassigned but defined key codes. I am not talking about the key codes such as
VK_0 that you might want to use in your game (A is pretty useful in FPSes for strafing left, for example); but key codes such as
VK_F_24 (included) for example, which are not used, because they correspond to obsolete Function keys that aren't present on any modern keyboard (as far as I know).
That would extend the possible number of mouse buttons from five to seventeen. If needed, you might also decide to use a couple of other key codes that aren't used such as
VK_Print, in order to extend the number of available buttons to all the buttons you have.
That would make all your buttons available in any game that uses the Microsoft Windows API to scan for input. So virtually any windows game.
I am not 100% certain that there is no way in Microsoft Windows to actually use more than 5 mouse buttons at a given time (even if the doc says so), but using unused
VK_ constants will work.
As correctly remarked by MSalters in the comments, it is possible for games which are using DirectInput (part of DirectX) to recognize up to 8 buttons. While this is far from sufficient for fully answering the question, it is so far the best alternative. Unfortunately, it requires the game to implement it (which should be fairly common, since it is also used for standard controllers and such).
So far, I have actually no idea how to simulate a
F_24 key as autohotkey does not work with the Logitech Gaming Software. I will post a complete solution here as soon as I find one.