Click here to Skip to main content
15,925,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WTL User Interface in MFC application Pin
Mircea Grelus14-Oct-05 4:47
Mircea Grelus14-Oct-05 4:47 
QuestiontmapsEnumurate Folder Pin
Saber00112-Oct-05 21:54
Saber00112-Oct-05 21:54 
Questionedit box that accepts only 0-9 and "ABCDCDEF" Pin
kerby_arion12-Oct-05 21:53
kerby_arion12-Oct-05 21:53 
AnswerRe: edit box that accepts only 0-9 and "ABCDCDEF" Pin
toxcct12-Oct-05 22:03
toxcct12-Oct-05 22:03 
AnswerRe: edit box that accepts only 0-9 and "ABCDCDEF" Pin
ddmcr12-Oct-05 22:31
ddmcr12-Oct-05 22:31 
GeneralRe: edit box that accepts only 0-9 and "ABCDCDEF" Pin
Trollslayer13-Oct-05 1:20
mentorTrollslayer13-Oct-05 1:20 
GeneralRe: edit box that accepts only 0-9 and "ABCDCDEF" Pin
kerby_arion13-Oct-05 15:41
kerby_arion13-Oct-05 15:41 
GeneralRe: edit box that accepts only 0-9 and "ABCDCDEF" Pin
ThatsAlok13-Oct-05 18:54
ThatsAlok13-Oct-05 18:54 
In Continuation With Giorgi (Very Nice answer)..

kerby_arion wrote:
do you know how to resolve this?
Modify Giorgi function this way:-

const short g_arrAllowed[]={1,2,3,4,5,6,7,8,9,0,'a','b','c','d','e','A','B','C','D','E',VK_BACK,VK_DELETE};
 
void CMyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
        
        for(int i=0;i<sizeof(arrAllowed)/sizeof(short);i++)
        {
          if(nChar==arrAllowed[i])
          {
	 //call base class OnChar() function
         CEdit::OnChar(nChar, nRepCnt, nFlags);
         return;
          }
 }
	
}


"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
GeneralRe: edit box that accepts only 0-9 and &quot;ABCDCDEF&quot; Pin
ddmcr13-Oct-05 22:26
ddmcr13-Oct-05 22:26 
GeneralRe: edit box that accepts only 0-9 and &quot;ABCDCDEF&quot; Pin
kerby_arion14-Oct-05 1:41
kerby_arion14-Oct-05 1:41 
Questionsetting a max char length of combo box or and edit control? Pin
kerby_arion12-Oct-05 20:30
kerby_arion12-Oct-05 20:30 
AnswerRe: setting a max char length of combo box or and edit control? Pin
The NULL Developer12-Oct-05 20:48
professionalThe NULL Developer12-Oct-05 20:48 
GeneralRe: setting a max char length of combo box or and edit control? Pin
kerby_arion12-Oct-05 21:32
kerby_arion12-Oct-05 21:32 
GeneralRe: setting a max char length of combo box or and edit control? Pin
kerby_arion12-Oct-05 21:50
kerby_arion12-Oct-05 21:50 
AnswerRe: setting a max char length of combo box or and edit control? Pin
toxcct12-Oct-05 21:27
toxcct12-Oct-05 21:27 
GeneralRe: setting a max char length of combo box or and edit control? Pin
kerby_arion14-Oct-05 1:50
kerby_arion14-Oct-05 1:50 
GeneralRe: setting a max char length of combo box or and edit control? Pin
kerby_arion14-Oct-05 1:52
kerby_arion14-Oct-05 1:52 
Questionini to xml conversion Pin
swaapu12-Oct-05 20:21
swaapu12-Oct-05 20:21 
QuestionUSB drive letter Pin
LiYS12-Oct-05 20:14
LiYS12-Oct-05 20:14 
Questionoleacc.dll &amp; WinNT problem Pin
Mohammad Tarik12-Oct-05 19:33
Mohammad Tarik12-Oct-05 19:33 
Questioninvoking CWnd::SetWindowPos () in COleControl sub-class meber-function takes no effect! Pin
suchuhui12-Oct-05 19:08
suchuhui12-Oct-05 19:08 
Questionhelp me plz????????????????????////// Pin
knowledgelover12-Oct-05 16:10
knowledgelover12-Oct-05 16:10 
AnswerRe: help me plz????????????????????////// Pin
vikas amin12-Oct-05 20:21
vikas amin12-Oct-05 20:21 
AnswerRe: help me plz????????????????????////// Pin
toxcct12-Oct-05 21:16
toxcct12-Oct-05 21:16 
Questionhow dose this happen? need your help Pin
ewighell12-Oct-05 16:01
ewighell12-Oct-05 16:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.