According to this page (and several others) you need to create a dummy window, then a dummy legacy context, then use wglCreateContextAttribsARB to create a modern context.
However I tried using the old way with wglCreateContext and loading functions manually:
glCreateShader = wglGetProcAddress("glCreateShader");
glShaderSource = wglGetProcAddress("glShaderSource");
glCompileShader = wglGetProcAddress("glCompileShader");
...etc for all other functions that I need
Then I checked the context version:
int minor;
int major;
glGetIntegerv(GL_MAJOR_VERSION, &major);
glGetIntegerv(GL_MINOR_VERSION, &minor);
printf("%d.%d\n", major, minor);
And I got "4.6". Why isn't the version something like 2.0 and why is the fake context thing needed?