Changing resolution

Hi, I have an OpenGL program that has a menu allowing for changing of resolution. However, I cannot get it to change correctly (it seems to change res but the alignment is off the screen).

I change the .dmPelsWidth and .dmPelsHeight to the new setting then call ChangeDisplaySettings. Do I need to resize the scene and do I have to resize the window? If so, does anyone know how?

Thanks…

Have you tried calling glViewport after the resize?

void glViewport(
GLint x,
GLint y,
GLsizei width,
GLsizei height
);

such as:

void glViewport( 0,0,width,height );