Skip to main content
GameDev.net gamedev.net
🔒 Locked

Editboxs value

Started by Craazer Oct 7, 2002 at 10:32 AM 1 replies 300+ views
Original Post
Craazer
Craazer
Is it possible to but float or double to edit box? i only now these ways to but data to them: SetDlgItemText() SetDlgItemInt()
leblebi
leblebi
    

#include <windows.h>

#include <windowsx.h> // for macro Edit_SetText

#include <stdio.h> // for sprintf

static void show_float ( float x, HWND htext_box )
{
char buff[64];
sprintf ( buff, "%5.2f", x );
Edit_SetText ( htext_box, buff );
}




[edited by - oztanharmanci on October 7, 2002 12:03:30 PM]
Craazer
Craazer
quote:
Original post by oztanharmanci
    

#include <windows.h>

#include <windowsx.h> // for macro Edit_SetText

#include <stdio.h> // for sprintf

static void show_float ( float x, HWND htext_box )
{
char buff[64];
sprintf ( buff, "%5.2f", x );
Edit_SetText ( htext_box, buff );
}






I know that option my self too... but thanks anyway.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.