Click here to Skip to main content
15,906,625 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: What to replace macro in C/C++? Pin
Ryan Binns21-Nov-04 17:48
Ryan Binns21-Nov-04 17:48 
GeneralRe: What to replace macro in C/C++? Pin
Jörgen Sigvardsson21-Nov-04 21:22
Jörgen Sigvardsson21-Nov-04 21:22 
AnswerRe: What to replace macro in C/C++? Pin
John R. Shaw21-Nov-04 5:46
John R. Shaw21-Nov-04 5:46 
GeneralRe: What to replace macro in C/C++? Pin
Link260021-Nov-04 14:04
Link260021-Nov-04 14:04 
GeneralRe: What to replace macro in C/C++? Pin
Ryan Binns21-Nov-04 18:04
Ryan Binns21-Nov-04 18:04 
GeneralRe: What to replace macro in C/C++? Pin
Don Clugston21-Nov-04 19:11
Don Clugston21-Nov-04 19:11 
GeneralPostMessage Doesn't work with ALT Pin
Hany Grees Ayoub21-Nov-04 2:22
Hany Grees Ayoub21-Nov-04 2:22 
GeneralRe: PostMessage Doesn't work with ALT Pin
ThatsAlok21-Nov-04 17:50
ThatsAlok21-Nov-04 17:50 
Here is What MSDN says ABout your Problem
<br />
WM_CHAR<br />
The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed. <br />
<br />
A window receives this message through its WindowProc function. <br />
<br />
LRESULT CALLBACK WindowProc(<br />
  HWND hwnd,       // handle to window<br />
  UINT uMsg,       // WM_CHAR<br />
  WPARAM wParam,   // character code (TCHAR)<br />
  LPARAM lParam    // key data<br />
);<br />
Parameters<br />
wParam <br />
Specifies the character code of the key. <br />
lParam <br />
Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table. Value Description <br />
0–15 Specifies the repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative. <br />
16–23 Specifies the scan code. The value depends on the original equipment manufacturer (OEM). <br />
24 Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0. <br />
25–28 Reserved; do not use. <br />
29 Specifies the context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0. <br />
30 Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up. <br />
31 Specifies the transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed. <br />
<br />
<br />
Return Values<br />
An application should return zero if it processes this message. <br />
<br />
Remarks<br />
The WM_CHAR message uses UTF-16. <br />
<br />
Because there is not necessarily a one-to-one correspondence between keys pressed and character messages generated, the information in the high-order word of the lParam parameter is generally not useful to applications. The information in the high-order word applies only to the most recent WM_KEYDOWN message that precedes the posting of the WM_CHAR message. <br />
<br />
For enhanced 101- and 102-key keyboards, extended keys are the right ALT and the right CTRL keys on the main section of the keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN and arrow keys in the clusters to the left of the numeric keypad; and the divide (/) and ENTER keys in the numeric keypad. Some other keyboards may support the extended-key bit in the lParam parameter<br />
<br />


-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
GeneralRe: PostMessage Doesn't work with ALT Pin
22491721-Nov-04 22:14
22491721-Nov-04 22:14 
GeneralI got A Queistion about COM+ Pin
Rassul Yunussov21-Nov-04 0:46
Rassul Yunussov21-Nov-04 0:46 
GeneralSlider Control Pin
shijuck21-Nov-04 0:11
shijuck21-Nov-04 0:11 
Generalnew to dll files Pin
Swatgod20-Nov-04 21:11
Swatgod20-Nov-04 21:11 
GeneralRe: new to dll files Pin
Mike Danberg24-Nov-04 19:10
Mike Danberg24-Nov-04 19:10 
GeneralPrint Dialog appears sometimes Pin
Jo Fredrickson20-Nov-04 19:20
Jo Fredrickson20-Nov-04 19:20 
GeneralRe: Print Dialog appears sometimes Pin
Neville Franks20-Nov-04 22:55
Neville Franks20-Nov-04 22:55 
GeneralRe: Print Dialog appears sometimes Pin
Jörgen Sigvardsson21-Nov-04 2:43
Jörgen Sigvardsson21-Nov-04 2:43 
GeneralRe: Print Dialog appears sometimes Pin
Jo Fredrickson22-Nov-04 3:08
Jo Fredrickson22-Nov-04 3:08 
GeneralRe: WM_CTLCOLORBTN Pin
Michael Dunn20-Nov-04 19:16
sitebuilderMichael Dunn20-Nov-04 19:16 
GeneralRe: WM_CTLCOLORBTN Pin
Neville Franks20-Nov-04 22:58
Neville Franks20-Nov-04 22:58 
GeneralRe: WM_CTLCOLORBTN Pin
John R. Shaw21-Nov-04 6:10
John R. Shaw21-Nov-04 6:10 
GeneralRe: WM_CTLCOLORBTN Pin
Timothy Grabrian21-Nov-04 18:40
professionalTimothy Grabrian21-Nov-04 18:40 
GeneralRe: WM_CTLCOLORBTN Pin
John R. Shaw22-Nov-04 12:45
John R. Shaw22-Nov-04 12:45 
GeneralWM_CTLCOLORBTN Pin
Timothy Grabrian20-Nov-04 17:57
professionalTimothy Grabrian20-Nov-04 17:57 
GeneralSorting a linked list of type class Pin
Maxforce20-Nov-04 17:25
Maxforce20-Nov-04 17:25 
GeneralRe: Sorting a linked list of type class Pin
Jack Puppy20-Nov-04 19:08
Jack Puppy20-Nov-04 19:08 

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.