Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:48:02+00:00 2026-05-25T09:48:02+00:00

I’m making a simple GUI library, and I’ve gotten to the first test. The

  • 0

I’m making a simple GUI library, and I’ve gotten to the first test. The weird thing is, none of the windows macros seem to be defined. I’m getting errors like “‘NULL’ was not declared in scope” and “‘HANDLE’ was not declared in scope.” I’m thinking it might be the way I organized the code because the stuff in the entry file easywin.hpp isn’t defined either, but it SEEMS like it should work. Here’s (most) of easywin.hpp:

#ifndef EASYWIN_BASE_HPP
#define EASYWIN_BASE_HPP

#include <string>
#include <map>

//Strings are used everywhere, so might as well use them globally
using std::string;

/**
 * A namespace to encapsulate WinAPI and prevent name clashing.
**/

namespace WinAPI{
    #include <windows.h>
    #include <commctrl.h>
}

//header includes (ordered according to inheritance)
#include "Application.hpp"
#include "Object.hpp"
    #include "Widget.hpp"
        #include "Container.hpp"
            #include "Window.hpp"
                #include "Dialog.hpp"
                    //not implemented yet, so don't include
                    //#include "Light.hpp"
                    #include "Heavy.hpp"
            // there are more container types
        #include "Control.hpp"
            #include "Textbox.hpp"
        #include "Tooltip.hpp"

//source includes
//needed to simplify class dependencies
#include "Application.cpp"
#include "Object.cpp"
    #include "Widget.cpp"
        #include "Container.cpp"
            #include "Window.cpp"
                #include "Dialog.cpp"
                    //not implemented yet, so don't include
                    //#include "Light.cpp"
                    #include "Heavy.cpp"
            // there are more container types
        #include "Control.cpp"
            #include "Textbox.cpp"
        #include "Tooltip.cpp"

#endif

I just don’t get it. If I’m including everything in this file, those files SHOULD get what’s defined in this file. What did I do wrong?

EDIT: To encourage better answers, I’ll post the git repository:

https://github.com/PiMaster/Easywin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:48:03+00:00Added an answer on May 25, 2026 at 9:48 am

    This should be a comment on IronMensan’s answer because it’s entirely correct but I can’t fit in there…

    The windows’s API has functions that take parameters of type “HANDLE” in the global namespace, in other words “::HANDLE”. The windows libraries are already compiled to do this and the compiled code exists in such libraries as user32.lib/dll.

    The purpose of windows.h is to define the types and functions that already exist in the library so you can call them. What you have done is define some unrelated types for example WinAPI::HANDLE which is fine, but in no way alters the fact that library contains functions which need a ::HANDLE as a parameter.

    I understand what you are trying to do, and it’s a good aim. However there is no way that it can possibly work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
Seemingly simple, but I cannot find anything relevant on the web. What is the
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.