views:

116

answers:

1

Bit of a dumbass question... I think I left my brain in the car...

I'm trying to call the Win32 version of SetWindowPos from within an ATL class (I need to specify a different first hWnd, which ATL normally handles), but I can't 'break out' of the ATL class and get the following error:

error C2661: 'ATL::CWindow::SetWindowPos' : no overloaded function
takes 7 arguments

How do I tell it I don't want to use the one in my base class?!

+1  A: 

Dumbass answer... suppose someone else might have the same problem.

Prefix :: to access the global namespace. (Courtesy of CodeGuru).

Mat
It is officially known as the Scope Resolution Operator. What you want to say is "I want the version in the global namespace, not this class." So by putting nothing to the left of :: you're saying "global namespace."
jeffamaphone