Well, I decided to make a base converter for practice... since im fairly new to win32. It works perfectly, I also wanted to put restrictions on my edit boxes, So I put ES_READONLY on them (I would rather of been able to bin edit box handle 1 or 0's, and hex 1-f but I dont know how , so tell me this to if you can =P), but I want a scroll bar on my binary edit box because it can long easily. I did so, but everytime I scroll over, it jumps back to the start... so I can't see whats past it the end of my edit box...

my code:

Code:
#include <windows.h>
#define ID_HWND_DEC 10010
#define ID_HWND_OCT 10011
#define ID_HWND_HEX 10012
#define ID_HWND_BIN 10013
#define ID_HWND_BUTTON 20000

const char g_ClassName[]="hwnd window class name";

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;
        
        case WM_COMMAND:
             {
                switch(HIWORD(wParam))
                {
                    case BN_CLICKED:
                         int x;
                         char hex[MAX_PATH];
                         char oct[MAX_PATH];
                         char bin[MAX_PATH];
                         
                         x = GetDlgItemInt(hwnd,ID_HWND_DEC,NULL,true);
                         
                         SetDlgItemText(hwnd,ID_HWND_HEX,itoa(x,hex,16));
                         SetDlgItemText(hwnd,ID_HWND_OCT,itoa(x,oct,8));
                         SetDlgItemText(hwnd,ID_HWND_BIN,itoa(x,bin,2));
                    break;
                }
             }
        break;
        
        case WM_CREATE:
             {
             HWND hEdit_Bin;
             HWND hEdit_Oct;
             HWND hEdit_Hex;
             HWND hEdit_Dec;
             static HWND hButton;
             HFONT hfDefault = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
             
             hEdit_Dec = CreateWindowEx(WS_EX_CLIENTEDGE,
                                        "EDIT",
                                        "",
                                        WS_CHILD|WS_VISIBLE|ES_NUMBER,
                                        30,30,
                                        100,20,
                                        hwnd,
                                        (HMENU)ID_HWND_DEC,
                                        GetModuleHandle(NULL),
                                        NULL);
             
             hEdit_Oct = CreateWindowEx(WS_EX_CLIENTEDGE,
                                        "EDIT",
                                        "",
                                        WS_CHILD|WS_VISIBLE|ES_READONLY,
                                        30,90,
                                        100,20,
                                        hwnd,
                                        (HMENU)ID_HWND_OCT,
                                        GetModuleHandle(NULL),
                                        NULL);
             
             
             hEdit_Hex = CreateWindowEx(WS_EX_CLIENTEDGE,
                                        "EDIT",
                                        "",
                                        WS_CHILD|WS_VISIBLE|ES_READONLY,
                                        160,90,
                                        100,20,
                                        hwnd,
                                        (HMENU)ID_HWND_HEX,
                                        GetModuleHandle(NULL),
                                        NULL);
                                        
             hEdit_Bin = CreateWindowEx(WS_EX_CLIENTEDGE,
                                        "EDIT",
                                        "",
                                        WS_CHILD|WS_VISIBLE|ES_READONLY|WS_HSCROLL,
                                        160,30,
                                        100,40,
                                        hwnd,
                                        (HMENU)ID_HWND_BIN,
                                        GetModuleHandle(NULL),
                                        NULL);
             
             SendMessage(GetDlgItem(hwnd,ID_HWND_HEX),WM_SETFONT,(WPARAM)hfDefault,MAKELPARAM(false,0));
             SendMessage(GetDlgItem(hwnd,ID_HWND_DEC),WM_SETFONT,(WPARAM)hfDefault,MAKELPARAM(false,0));
             SendMessage(GetDlgItem(hwnd,ID_HWND_OCT),WM_SETFONT,(WPARAM)hfDefault,MAKELPARAM(false,0));
             SendMessage(GetDlgItem(hwnd,ID_HWND_BIN),WM_SETFONT,(WPARAM)hfDefault,MAKELPARAM(false,0));
             
             hButton = CreateWindowEx(0,
                                      "BUTTON",
                                      "Convert",
                                      WS_CHILD|WS_VISIBLE|BS_DEFPUSHBUTTON,
                                      95,130,
                                      100,20,
                                      hwnd,
                                      (HMENU)ID_HWND_BUTTON,
                                      GetModuleHandle(NULL),
                                      NULL);
             
             SendMessage(GetDlgItem(hwnd,ID_HWND_BUTTON),WM_SETFONT,(WPARAM)hfDefault,MAKELPARAM(false,0));
             }
        break;
        
        default:
             return DefWindowProc(hwnd,msg,wParam,lParam);
    }
}

int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPSTR nCmdLine,
                   int nCmdShow)
{
    HWND hwnd;
    WNDCLASSEX wc;
    MSG Message;
    
    wc.cbSize = sizeof(WNDCLASSEX);
    wc.cbWndExtra = 0;
    wc.cbClsExtra = 0;
    wc.hbrBackground = CreateSolidBrush(RGB(0,0,100));
    wc.hCursor = LoadCursor(NULL,IDC_ARROW);
    wc.hIcon = LoadIcon(NULL,IDI_APPLICATION);
    wc.hIconSm = LoadIcon(NULL,IDI_APPLICATION);
    wc.lpszClassName = g_ClassName;
    wc.lpszMenuName = NULL;
    wc.lpfnWndProc = WndProc;
    wc.hInstance = hInstance;
    wc.style = CS_DBLCLKS;
    
    RegisterClassEx(&wc);
    
    hwnd = CreateWindowEx(WS_EX_TOOLWINDOW,
                          g_ClassName,
                          "Base Converter",
                          WS_SYSMENU,
                          CW_USEDEFAULT,CW_USEDEFAULT,
                          300,200,
                          HWND_DESKTOP,
                          NULL,
                          hInstance,
                          NULL);
                          
    ShowWindow(hwnd,nCmdShow);
    UpdateWindow(hwnd);
    
    while(GetMessage(&Message,NULL,0,0)>0)
    {
        TranslateMessage(&Message);
        DispatchMessage (&Message);
    }
    
    return Message.wParam;
}