Even though I am 8 :), I WANT to make an OS. Something to be proud of.
I normaly use VB but I am now starting a bit of C++ programming.

Thanks ,
Campbell

Recommended Answers

All 5 Replies

8? Are you serious? Wtf, Get your ass away from the computer and work on school, football and other stuff >:[.
And FYI, OS's take dedicated teams months or even years to make. Come back to C++ when you're at least a teenager.

Oh, and to give you an example of one of the simplest things you are looking for, heres the C++ code for a blank Window, kind of like Internet Explorer but with nothing but the blue title bar and borders.

#include <windows.h>

const char g_szClassName[] = "myWindowClass";

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch(msg)
    {
        case WM_CLOSE:
            DestroyWindow(hwnd);
        break;
        case WM_DESTROY:
            PostQuitMessage(0);
        break;
        default:
            return DefWindowProc(hwnd, msg, wParam, lParam);
    }
    return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    WNDCLASSEX wc;
    HWND hwnd;
    MSG Msg;

    //Step 1: Registering the Window Class
    wc.cbSize        = sizeof(WNDCLASSEX);
    wc.style         = 0;
    wc.lpfnWndProc   = WndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = 0;
    wc.hInstance     = hInstance;
    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    wc.lpszMenuName  = NULL;
    wc.lpszClassName = g_szClassName;
    wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

    if(!RegisterClassEx(&wc))
    {
        MessageBox(NULL, "Window Registration Failed!", "Error!",
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }

    hwnd = CreateWindowEx(
        WS_EX_CLIENTEDGE,
        g_szClassName,
        "The title of my window",
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
        NULL, NULL, hInstance, NULL);

    if(hwnd == NULL)
    {
        MessageBox(NULL, "Window Creation Failed!", "Error!",
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }

    ShowWindow(hwnd, nCmdShow);
    UpdateWindow(hwnd);

    while(GetMessage(&Msg, NULL, 0, 0) > 0)
    {
        TranslateMessage(&Msg);
        DispatchMessage(&Msg);
    }
    return Msg.wParam;
}

Tl;dr: Programming is not for under-14's at all. It usually requires mathematical abilities too. It is appreciative that you have a lust for it, but let it wait :) .

>Even though I am 8
If you're 8 years old then you are in violation of Daniweb's policies (members must be at least 13 years of age). Therefore, I'll report this thread so that you can be properly banned for the next five years.

commented: Haha :) +10
commented: pwnt :D +1

You have to admit, for an 8 year old that's a pretty well presented post compared to some people on here who are in Uni.
Stick to something easier for a while, believe me you're not ready for C++ yet, maybe in 3/4 years, in the meanwhile stick to VB or Flash, you know... the sort of things a normal 8 year old would do ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.