Click here to Skip to main content
15,923,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do i detect user inactivity ? Pin
Rick York22-Apr-04 10:12
mveRick York22-Apr-04 10:12 
GeneralShell question (I Guess) Pin
Deian22-Apr-04 0:47
Deian22-Apr-04 0:47 
GeneralRe: Shell question (I Guess) Pin
_Magnus_22-Apr-04 1:00
_Magnus_22-Apr-04 1:00 
GeneralRe: Shell question (I Guess) Pin
Deian27-Apr-04 4:07
Deian27-Apr-04 4:07 
GeneralBizzare problem reading large number of files Pin
Raul00722-Apr-04 0:34
Raul00722-Apr-04 0:34 
GeneralRe: Bizzare problem reading large number of files Pin
jmkhael22-Apr-04 0:38
jmkhael22-Apr-04 0:38 
GeneralRe: Bizzare problem reading large number of files Pin
Raul00722-Apr-04 18:17
Raul00722-Apr-04 18:17 
GeneralClicking in Edit Box Creates Error.. Pin
AbinThomas22-Apr-04 0:22
AbinThomas22-Apr-04 0:22 
hi,
i created a simple editbox derived from CEdit class. its working , but clicking in the edit box sets out the devil.
The program shuts down after showing the message 'Debug Assertion Failed " Abort-Retry-Ignore.
Another problem is that i can't type characters more than the length of the editbox.
I wrote a message to handle the keypress event, using ON_EN_CHANGE(IDC_ED,OnEditKeyDown). but am not getting the 'enter' key.
the edit box is deleted in the killfocus event..
CAN ANYBODY HELP PLEASE ?

thanks in advance..
---------------- here goes the code-----------

-----edit box creation on pressing F4 key-----
case VK_F4:
{
CMainFrame* pMainWnd = (CMainFrame*) AfxGetMainWnd();
pEdit = new CEdit;

pEdit->Create(ES_AUTOVSCROLL | ES_WANTRETURN | WS_CHILD | WS_VISIBLE |WS_TABSTOP | WS_BORDER, CRect(0,col+(m_nCurSel*2),75,col+(m_nCurSel*2)+17), this,
IDC_ED);

pEdit->SetLimitText(50);
pEdit->SetFocus();
}
------ function that receives keypress---
void CMarketWatchView::OnEditKeyDown(UINT nChar)
{
static const MSG* pMsg = GetCurrentMessage();
if(pMsg->wParam==0x0D) //checkfor enter key
{
AfxMessageBox("Enter key");
- other code here-
}
pEdit->SetFocus();
}
---------lost focus function for the edit box ----
void CMarketWatchView::OnEditKillFocus()
{
char buf[50];
pEdit->GetWindowText(buf,49);

--other code here--
Invalidate(FALSE); //redraw
delete pEdit;
}



GeneralRe: Clicking in Edit Box Creates Error.. Pin
wb22-Apr-04 0:57
wb22-Apr-04 0:57 
GeneralRe: Clicking in Edit Box Creates Error.. Pin
AbinThomas22-Apr-04 1:57
AbinThomas22-Apr-04 1:57 
Generalthis is the code Pin
AbinThomas22-Apr-04 1:47
AbinThomas22-Apr-04 1:47 
GeneralRe: this is the code Pin
jmkhael22-Apr-04 1:50
jmkhael22-Apr-04 1:50 
GeneralRe: this is the code Pin
Steve S22-Apr-04 1:58
Steve S22-Apr-04 1:58 
GeneralRe: this is the code Pin
jmkhael22-Apr-04 2:00
jmkhael22-Apr-04 2:00 
GeneralRe: this is the code Pin
Steve S22-Apr-04 21:43
Steve S22-Apr-04 21:43 
GeneralactiveX Placement/Resizing Pin
Abhi Lahare22-Apr-04 0:06
Abhi Lahare22-Apr-04 0:06 
Questioniostream.h/fstream.h??? Pin
roadragedave22-Apr-04 0:01
roadragedave22-Apr-04 0:01 
AnswerRe: iostream.h/fstream.h??? Pin
toxcct22-Apr-04 0:19
toxcct22-Apr-04 0:19 
AnswerRe: iostream.h/fstream.h??? Pin
Paul Ranson22-Apr-04 0:22
Paul Ranson22-Apr-04 0:22 
QuestionCleanest way to convert a two character string like "4D" to it's hex-equivalent-number ? Pin
ohadp21-Apr-04 23:57
ohadp21-Apr-04 23:57 
AnswerRe: Cleanest way to convert a two character string like "4D" to it's hex-equivalent-number ? Pin
toxcct22-Apr-04 0:13
toxcct22-Apr-04 0:13 
AnswerRe: Cleanest way to convert a two character string like "4D" to it's hex-equivalent-number ? Pin
jmkhael22-Apr-04 0:30
jmkhael22-Apr-04 0:30 
GeneralRe: Cleanest way to convert a two character string like "4D" to it's hex-equivalent-number ? Pin
ohadp22-Apr-04 0:42
ohadp22-Apr-04 0:42 
GeneralRe: Cleanest way to convert a two character string like "4D" to it's hex-equivalent-number ? Pin
toxcct22-Apr-04 1:02
toxcct22-Apr-04 1:02 
GeneralRe: Cleanest way to convert a two character string like "4D" to it's hex-equivalent-number ? Pin
Prakash Nadar22-Apr-04 1:05
Prakash Nadar22-Apr-04 1:05 

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.