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

C / C++ / MFC

 
GeneralRe: Code to Figure out x,y cords for CDC::Pie inside an CDC::Ellipse given % Pin
ForNow15-Mar-22 5:01
ForNow15-Mar-22 5:01 
QuestionIPv6 address compression code using vc++ Pin
Member 1252773510-Mar-22 17:12
Member 1252773510-Mar-22 17:12 
AnswerRe: IPv6 address compression code using vc++ Pin
Victor Nijegorodov10-Mar-22 21:06
Victor Nijegorodov10-Mar-22 21:06 
QuestionQuestions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow10-Mar-22 6:02
ForNow10-Mar-22 6:02 
AnswerRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
RedDk10-Mar-22 8:22
RedDk10-Mar-22 8:22 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow10-Mar-22 9:35
ForNow10-Mar-22 9:35 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
RedDk10-Mar-22 9:40
RedDk10-Mar-22 9:40 
AnswerRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan10-Mar-22 22:19
mveRichard MacCutchan10-Mar-22 22:19 
1. No, the callback method is a function in your application, and nothing to do with the control. Information between the two is passed via the system.

2. As far as I can see there is no such message as EM_EDITWORDPBREAKPROC so no, you do not add it to the message map. And if you think about it, that would not make sense. Once you register your callback with the system the edit control will call it automatically whenever the specific conditions trigger the event.

3. Callback methods need their address to be computed at build time. So if it is a class member it needs to be a static method.

4. In the line
C++
if (lpszEditText[ichCurrent] == 0x0a0d)

you are looking for the two characters, but that may not be correct. You should use the debugger to check exactly what character(s) are being pointed at.

And finally, yes the documentation is not always completely clear, but it is always worth reading in its entirety: EDITWORDBREAKPROCA (winuser.h) - Win32 apps | Microsoft Docs[^].
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 1:41
ForNow11-Mar-22 1:41 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 1:51
mveRichard MacCutchan11-Mar-22 1:51 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 2:13
ForNow11-Mar-22 2:13 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 3:49
mveRichard MacCutchan11-Mar-22 3:49 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 4:08
ForNow11-Mar-22 4:08 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 4:19
mveRichard MacCutchan11-Mar-22 4:19 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 4:46
ForNow11-Mar-22 4:46 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 4:54
mveRichard MacCutchan11-Mar-22 4:54 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 5:06
ForNow11-Mar-22 5:06 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 6:11
mveRichard MacCutchan11-Mar-22 6:11 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow11-Mar-22 7:56
ForNow11-Mar-22 7:56 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Randor 11-Mar-22 12:55
professional Randor 11-Mar-22 12:55 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan11-Mar-22 22:03
mveRichard MacCutchan11-Mar-22 22:03 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow12-Mar-22 13:23
ForNow12-Mar-22 13:23 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow12-Mar-22 13:28
ForNow12-Mar-22 13:28 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
Richard MacCutchan12-Mar-22 22:14
mveRichard MacCutchan12-Mar-22 22:14 
GeneralRe: Questions about EM_SETWORDBREAKPROC message and EDITWORDBREAKPROCA function Pin
ForNow13-Mar-22 5:01
ForNow13-Mar-22 5:01 

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.