Recently I started learning C++ and so far I like what I get (always programmed in C before). I have a question concerning classes, though not really a coding problem.
I'm creating a class that'll handle my OpenGL window. My question is: should I be creating functions that simply call a win32 api function with only one extra argument (most of the time the window handle). Here's an example:
One of the member functions is GetHandle(), which returns the window handle. Now for moving the window, I could create my own function:
but instead of using my own SetPos() function, I could also simply do this:Code:
void GLWindow::SetPos(int x, int y)
SetWindowPos(this->handle, HWND_TOP, x, y, 0, 0, SWP_NOSIZE);
So are there advantages if I create my own member function, or is that useless?Code:
SetWindowPos(object.GetHandle(), HWND_TOP, x, y, 0, 0, SWP_NOSIZE);