Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: InstallShield Pin
rrrado25-Jun-02 23:27
rrrado25-Jun-02 23:27 
Generaldiameter sign in chinese windows 98 Pin
Martin Perktold25-Jun-02 22:39
Martin Perktold25-Jun-02 22:39 
QuestionPlease hlep: how to create a Help file in VB/VC++ project? Pin
DengJW25-Jun-02 22:25
DengJW25-Jun-02 22:25 
AnswerRe: Please hlep: how to create a Help file in VB/VC++ project? Pin
Nish Nishant25-Jun-02 22:42
sitebuilderNish Nishant25-Jun-02 22:42 
GeneralRe: Please hlep: how to create a Help file in VB/VC++ project? Pin
DengJW25-Jun-02 22:58
DengJW25-Jun-02 22:58 
GeneralRe: Please hlep: how to create a Help file in VB/VC++ project? Pin
Nish Nishant25-Jun-02 23:02
sitebuilderNish Nishant25-Jun-02 23:02 
GeneralGot it. Thanks Pin
DengJW25-Jun-02 23:13
DengJW25-Jun-02 23:13 
GeneralDataValidation of text box placed in flexgrid Pin
mageshswami25-Jun-02 21:46
mageshswami25-Jun-02 21:46 
hi
i have wrote a function in vc++ not to allow any special characters in flex grid except alphabets &"_".

but if the shift key is pressed and the other keys are pressed it is allowing the special characters.(foe eg '@','#','$')

can u please suggest what is wrong with this code and clear my doubt.

yours friendly
magesh.s


BOOL CCharacterEdit::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->hwnd != NULL && pMsg->message == WM_KEYDOWN)
{
WORD ch =0;
ch = LOWORD(pMsg->wParam);
EnableEditOptions(this,pMsg);
if( !(GetStyle() & ES_NUMBER))
{
CString sEdText;
GetWindowText(sEdText);
if ( ( ( ch >= 48 ) && ( ch <= 57 ) ) ||
( ( ch >= 65 ) && ( ch <= 90 ) ) || // ascii code To allow only alphabets & '_'
( ( ch >= 97 ) && ( ch <= 122) ) ||
( ch == 45 )
);
else if( (ch >= VK_LEFT && ch <= VK_DOWN) || (ch == VK_BACK || ch == VK_DELETE|| ch==VK_TAB))
return FALSE; // allow arrow keys and backspace.
else
{
pMsg->wParam = MAKEWPARAM(0,HIWORD(pMsg->wParam));//make the char value as 0
TRACE("\n After changing char = %d ",pMsg->wParam);
}
}
}
return GetParent()->PreTranslateMessage(pMsg);
}Confused | :confused: Confused | :confused:

magesh.s
GeneralDetermining paper tray alignment (non-MFC) Pin
25-Jun-02 20:50
suss25-Jun-02 20:50 
GeneralAutomation of legacy Applications Pin
vikramlinux25-Jun-02 19:37
vikramlinux25-Jun-02 19:37 
GeneralProblem in handling Esc key while editing treeitem label Pin
vasu25-Jun-02 18:23
vasu25-Jun-02 18:23 
GeneralRe: Problem in handling Esc key while editing treeitem label Pin
Rage25-Jun-02 22:14
professionalRage25-Jun-02 22:14 
QuestionHow to get the printer's information Pin
blongtq25-Jun-02 18:21
blongtq25-Jun-02 18:21 
AnswerRe: How to get the printer's information Pin
Joel Lucsy26-Jun-02 5:51
Joel Lucsy26-Jun-02 5:51 
GeneralRe: How to get the printer's information Pin
blongtq26-Jun-02 17:45
blongtq26-Jun-02 17:45 
Generallistview & Win98 Pin
Maurizio Pisano25-Jun-02 18:13
Maurizio Pisano25-Jun-02 18:13 
GeneralRe: listview & Win98 Pin
Nish Nishant25-Jun-02 19:27
sitebuilderNish Nishant25-Jun-02 19:27 
GeneralRe: listview & Win98 Pin
Maurizio Pisano25-Jun-02 19:43
Maurizio Pisano25-Jun-02 19:43 
GeneralRe: listview & Win98 Pin
Maurizio Pisano26-Jun-02 1:01
Maurizio Pisano26-Jun-02 1:01 
GeneralSetClipboardViewer Pin
adara25-Jun-02 18:07
adara25-Jun-02 18:07 
GeneralRe: SetClipboardViewer Pin
Rage25-Jun-02 22:09
professionalRage25-Jun-02 22:09 
GeneralWin32 Tree Question Pin
NullStream25-Jun-02 17:47
NullStream25-Jun-02 17:47 
GeneralRe: Win32 Tree Question Pin
Michael Dunn25-Jun-02 17:51
sitebuilderMichael Dunn25-Jun-02 17:51 
GeneralRe: Win32 Tree Question Pin
NullStream25-Jun-02 19:01
NullStream25-Jun-02 19:01 
GeneralRe: Win32 Tree Question Pin
Rage25-Jun-02 22:39
professionalRage25-Jun-02 22:39 

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.