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

C / C++ / MFC

 
GeneralMaximum number of threads.. Pin
Laing,James3-Jul-04 6:57
Laing,James3-Jul-04 6:57 
GeneralRe: Maximum number of threads.. Pin
Graham Bradshaw3-Jul-04 12:52
Graham Bradshaw3-Jul-04 12:52 
GeneralRe: Maximum number of threads.. Pin
Laing,James4-Jul-04 0:13
Laing,James4-Jul-04 0:13 
GeneralRe: Maximum number of threads.. Pin
Graham Bradshaw4-Jul-04 0:48
Graham Bradshaw4-Jul-04 0:48 
GeneralRe: Maximum number of threads.. Pin
Laing,James4-Jul-04 1:08
Laing,James4-Jul-04 1:08 
QuestionHow to Capture Screen with DirectX 8 or 9 ? >"< Pin
cher88230333-Jul-04 6:42
cher88230333-Jul-04 6:42 
GeneralCustom Controls in/within MFC Pin
0v3rloader3-Jul-04 4:33
0v3rloader3-Jul-04 4:33 
GeneralRe: Custom Controls in/within MFC Pin
Johan Rosengren3-Jul-04 6:01
Johan Rosengren3-Jul-04 6:01 
dNimrod#X wrote:
Obviously enough the Control must have keyboard input but...

Second time this has come up during the last days. Handle WM_GETDLGCODE, returning DLGC_WANTALLKEYS.


dNimrod#X wrote:
Also, the only way I can get access to the keyboard...

It might very well be. You haven't stated what type of control you derive from. WM_CHAR is sent as a result of a WM_KEYDOWN in the message loop TranslateMessage. Seeing that you would like to get the actual key pressed, the OnKeyDown-handler is more "low-level" than OnChar, so this should not pose any problem for you? As for the physical key, you don't want it. The VK_-codes will among other things guarantee that some other input-device emulating a keyboard can "fake" keys, which is a Good Thing. You have 8 bits (if memory serves) of "OEM scan code" in the input param flag, which ought to indicate the physical key, if you must have it. There is also GetAsyncKeyState if you want to check the state of other keys. Beware, this function will have to be called twice, the first time to clear some state (you might want to search MSDN for GetAsyncKeyState for more info on this).


dNimrod#X wrote:
Finally, whenever the control receives the focus,

Never shown? There are a lot of restrictions governing a caret, it has to be shown the same amount of time it has been hidden, the position has to be set etc. etc. etc. Have you tried the caret with a normal CEdit to begin with?

While you are to be commended on this brave endeavor, be prepared that it is not easy if you want to add stuff such as selection, copy and cut etc. Personally, I would have used a normal CEdit embedded in a larger CWnd-derived control.
GeneralRe: Custom Controls in/within MFC Pin
0v3rloader3-Jul-04 6:59
0v3rloader3-Jul-04 6:59 
QuestionSave a CString ??? Pin
Larsson3-Jul-04 3:47
Larsson3-Jul-04 3:47 
AnswerRe: Save a CString ??? Pin
Ken Mazaika3-Jul-04 4:40
Ken Mazaika3-Jul-04 4:40 
GeneralRe: Save a CString ??? Pin
Larsson3-Jul-04 5:20
Larsson3-Jul-04 5:20 
GeneralRe: Save a CString ??? Pin
User 66583-Jul-04 6:17
User 66583-Jul-04 6:17 
AnswerRe: Save a CString ??? Pin
PJ Arends3-Jul-04 6:42
professionalPJ Arends3-Jul-04 6:42 
GeneralRe: Save a CString ??? Pin
Graham Bradshaw3-Jul-04 7:35
Graham Bradshaw3-Jul-04 7:35 
GeneralRe: Save a CString ??? Pin
PJ Arends3-Jul-04 8:02
professionalPJ Arends3-Jul-04 8:02 
GeneralRe: Save a CString ??? Pin
Graham Bradshaw3-Jul-04 13:03
Graham Bradshaw3-Jul-04 13:03 
Generalinvisible window with activex control Pin
maruku3-Jul-04 1:58
maruku3-Jul-04 1:58 
GeneralRe: invisible window with activex control Pin
Ryan Binns4-Jul-04 18:39
Ryan Binns4-Jul-04 18:39 
GeneralRe: invisible window with activex control Pin
maruku5-Jul-04 22:46
maruku5-Jul-04 22:46 
GeneralRe: invisible window with activex control Pin
Ryan Binns5-Jul-04 22:58
Ryan Binns5-Jul-04 22:58 
GeneralCDateTimeCtrl init Pin
JabraJabra3-Jul-04 0:48
JabraJabra3-Jul-04 0:48 
GeneralRe: CDateTimeCtrl init Pin
Gary R. Wheeler3-Jul-04 2:38
Gary R. Wheeler3-Jul-04 2:38 
GeneralRe: CDateTimeCtrl init Pin
JabraJabra5-Jul-04 5:52
JabraJabra5-Jul-04 5:52 
Questionhow can i make setup of my application Pin
Anonymous2-Jul-04 23:30
Anonymous2-Jul-04 23:30 

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.