I have a problem with the following code:
class MainWindow
{
...
private:
bool CreateWindow(std::string, int, int, int, bool);
...
}
and
bool MainWindow::CreateWindow(std::string title, int width, int height,
int bits, bool fullscreen)
{
...
Visual Studio highlights the method definition with the following error:
int reateWindow(std::string title, int width, int height, int bits, bool fullscreen)
Error: class "MainWindow" has no member called "CreateWindowExW"
and the compiler outputs the following:
warning C4003: not enough actual parameters for macro 'CreateWindowW'
error C2039: 'CreateWindowExW' : is not a member of 'MainWindow'
I noticed that if I change the method name to something else, that does not begin with a capital C, the error goes away. I'm new to Windows development. What gives?
It is simply because CreateWindow
is a macro created by Microsoft...
It is defined in WinUser.h
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With