You have to hide all the details of a platform and, since you will not to use different platforms at the same time, you can use different settings for your project:
if you want to compile for Linux you'll use:
IPlatform.h
PlatformLinux.h (derived from IPlatform)
PlatformLinux.cpp
if you want to compile for Windows you'll use:
IPlatform.h
PlatformWindows.h (derived from IPlatform)
PlatformWindows.cpp
You'd better don't use ID at all (in this solution you don't need them).
To take advantage of something platform specific you have to hide the concept that varies in another class.
For example if Linux refers to a window using "void *" instead Windows uses "HANDLE", you'll solve your problem using IWindow and deriving form it IWindowForLinux, IWindowForWindows. When you have to move a window you'll have:
class IWindow{ virtual void MoveTo(int x, int y) { // pPlatform point to the current platform (maybe a singleton) pPlatform->MoveTo(x,y,this); }}class IWindowForLinux : public IWindow{ void * m_pWnd;}class IWindowForWindow : IWindow{ HANDLE m_hWnd;}[in platformwindows.cpp]void IPlatformWindow::MoveTo(IWindow * pWnd, int x, int y){ IWindowForWindows * p=(IWindowsForWindows*)pWnd; SetWindowPos(p->m_hWnd, x, y, ...other arguments...);}[in platformlinux.cpp]void IPlatformLinux::MoveTo(IWindow * pWnd, int x, int y) IWindowForLinux * p = (IWindowForLinux*)pWnd; XWindowSetPos(x,y,p->m_pWnd, ... other arguments...); // <- invented }char * title="My window";IWindow * pWindow=pPlatform->CreateNewWindow(title);pWindow->MoveTo(x,y);
As you can see there is no "void *" neither "HANDLE": they're hidden by child classes.
Hope that helps.