hi, i have a dialogBox as a main window which i created based on iczelion's tutorial #10. in the resource script i have an edit box with the es_number style but still it will let me introduce any char in it. i tried to force it somehow with getwindowlong, or eax,es_number, setwindowlong, but the only way ive been able to fix it is subclassing the edit control. can anyone tell me why is the editBox ignoring the es_number style? thanks in advance in case it helps i'm running w2k
Posted on 2001-05-24 05:18:00 by lvro
This works for me:

#include "resource.h"

#define IDC_EDIT    101

MainDlg DIALOG 77, 235, 207, 70
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME |
      WS_MINIMIZEBOX | DS_MODALFRAME
CAPTION "Blah"
FONT 8, "MS Sans Serif"
{
CONTROL "", IDC_EDIT, "EDIT", ES_LEFT | ES_NUMBER | \
WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL |    \
WS_TABSTOP, 3, 68, 270, 161
}
I'm also running Win 2k! Mirno (broke up a very long line of code - Ernie) This message was edited by Ernie, on 5/24/2001 7:05:28 AM
Posted on 2001-05-24 05:55:00 by Mirno
it doesn't work for me. i believe it has to do with the way the dialogBox is created (through registerClassEx and createDialogParam). thanks anyway
Posted on 2001-05-24 06:23:00 by lvro