OK, my problem's as follows; a while back I wrote a custom windowproc function to superclass my edit controls to simulate dialog-box style tabbing (along with the same functionality when pressing enter, and being able to go to previous editboxes by backspacing in an empty box) in a regular window.
I did this by calling
in the modded windowproc itself, but needless to say this gives it very limited functionality; it only works for editboxes that have IDs in a row and the parent window has no control over the whole process whatsoever.
SetFocus( GetDlgItem( GetParent(hwnd), GetDlgCtrlID(hwnd)+1) );
Now I want to expand this functionality by not having the edit control's windowproc itself call SetFocus, but instead send a notification to the parent window saying "select the previous/next editbox" or "the user pressed enter in this editbox, check it's contents now" so that I can take care of it differently for different parent windows. I was thinking of doing this by calling
but I'm not sure what to put in the place of the question marks. I can go define my own notification code, but it seems there'd be no guarantee that the code would be a unique one, and there's a good chance the original editproc (which is still called from my modded proc) will also send a message with that identifier to the parent, causing a false alarm so to speak. How can I be sure I'm using a unique notification code? Or is there some cleaner way to send a custom notification to the parent window? (if so, how?)
SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwnd), ???), (LPARAM)hwnd);
Thanks in advance!