Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCentralise Database Pin
kubbazoob8-Dec-02 5:41
kubbazoob8-Dec-02 5:41 
GeneralRe: Centralise Database Pin
Michael P Butler8-Dec-02 9:37
Michael P Butler8-Dec-02 9:37 
Generalfindexecutable() Pin
pnpfriend8-Dec-02 5:03
pnpfriend8-Dec-02 5:03 
GeneralRe: findexecutable() Pin
Ted Ferenc8-Dec-02 6:45
Ted Ferenc8-Dec-02 6:45 
GeneralRe: findexecutable() Pin
Michael Dunn8-Dec-02 7:27
sitebuilderMichael Dunn8-Dec-02 7:27 
GeneralThanks Pin
pnpfriend8-Dec-02 8:51
pnpfriend8-Dec-02 8:51 
GeneralSymbol Picker dialog Pin
wolf_paul8-Dec-02 2:54
wolf_paul8-Dec-02 2:54 
QuestionHow to trap tab-messages in an Editcontrol in a dialog? Pin
Martin Haesemeyer8-Dec-02 1:15
Martin Haesemeyer8-Dec-02 1:15 
Hi folks!
I have a really stupid problem (maybe it is totally easy to solve an I just don't get it):
I created a dlg based application with MFC, with some controls in it. One is an edit-control. And now I want that the user can enter text *with tab stops* in the edit control. But naturally the dialog manager interprets all presses of the tab key as the desire to switch focus... Now I'm totally stuck. I ovverode PreTranslateMessage, trapped WM_KEYDOWN, checked wether the editcontrol has focus, checked for VK_TAB and if these conditions were met, I send a WM_CHAR to the edit control instead of calling the base-class (pseudocode):
PreTranslateMessage(message){
  if(message == WM_KEYDOWN)
  if(message.wParam == VK_TAB)
  if(myEdit.HasFocus)
    myEdit.SendMessage(WM_CHAR,'\t');
  else
   CDialog::PreTranslateMessage(message);
}

But the whole effect was generating some strange behaviour...(I also tried sending a WM_KEYDOWN,WM_CHAR,WM_KEYUP but same effect)
Is there some other solution to this problem??

Cheers
TIA
have a nice second advent
Martin

"Situation normal - all fu***d up"
Illuminatus!
GeneralFile properties via C++ Pin
Bats8-Dec-02 0:45
Bats8-Dec-02 0:45 
GeneralRe: File properties via C++ Pin
Michael P Butler8-Dec-02 4:03
Michael P Butler8-Dec-02 4:03 
GeneralRe: File properties via C++ Pin
Joe Woodbury9-Dec-02 19:30
professionalJoe Woodbury9-Dec-02 19:30 
GeneralFTP without Wininet Pin
CaesarCZ8-Dec-02 0:10
CaesarCZ8-Dec-02 0:10 
GeneralRe: FTP without Wininet Pin
User 66588-Dec-02 1:45
User 66588-Dec-02 1:45 
GeneralRe: FTP without Wininet Pin
carrie8-Dec-02 6:10
carrie8-Dec-02 6:10 
GeneralRe: FTP without Wininet Pin
Redeemer-dk8-Dec-02 9:39
Redeemer-dk8-Dec-02 9:39 
GeneralRe: FTP without Wininet Pin
CaesarCZ8-Dec-02 9:54
CaesarCZ8-Dec-02 9:54 
GeneralSimple question about Socket ! Pin
Hadi Rezaee7-Dec-02 23:41
Hadi Rezaee7-Dec-02 23:41 
GeneralRe: Simple question about Socket ! Pin
User 66588-Dec-02 2:14
User 66588-Dec-02 2:14 
GeneralCursor doesn't change Pin
S O S7-Dec-02 23:11
S O S7-Dec-02 23:11 
GeneralRe: Cursor doesn't change Pin
KaЯl8-Dec-02 21:43
KaЯl8-Dec-02 21:43 
GeneralInvalidating() all view Pin
S O S7-Dec-02 23:09
S O S7-Dec-02 23:09 
GeneralRe: Invalidating() all view Pin
Roman Fadeyev8-Dec-02 0:51
Roman Fadeyev8-Dec-02 0:51 
GeneralRe: Invalidating() all view Pin
S O S8-Dec-02 1:26
S O S8-Dec-02 1:26 
GeneralRe: Invalidating() all view Pin
S O S8-Dec-02 1:49
S O S8-Dec-02 1:49 
GeneralRe: Invalidating() all view Pin
Jim A. Johnson8-Dec-02 7:26
Jim A. Johnson8-Dec-02 7:26 

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.