Ok, this is my proc, and as I've stated before, a few extra characters become bold or underline whenever control+b or control+u is released. I included an ss to demonstrate.
Whats wrong?

Code:
 LRESULT CALLBACK RichProc(HWND hwnd,UINT msg,WPARAM wp,LPARAM lp)
{
   switch(msg)
   {
     {   
    case WM_KEYDOWN:
		  if(wp == VK_CONTROL) {
			  cd++;
		  }
	 break;
  case WM_KEYUP:
	   if(wp == 0x42 && cd !=0) {
		   if(!bc) {
		         CHARFORMAT2 cfm;
                    cfm.cbSize = sizeof(cfm);
					SendMessage( hwnd, EM_GETCHARFORMAT,
                    (WPARAM)SCF_SELECTION, (LPARAM)&cfm );
                     cfm.dwMask = CFM_PROTECTED | CFM_BOLD;
                     cfm.dwEffects = CFE_BOLD;

                    SendMessage( hwnd, EM_SETCHARFORMAT,
                   (WPARAM)SCF_SELECTION, (LPARAM)&cfm );
					bc++;
					cd--;
			  }

		   else if(bc != 0) {
		      	  CHARFORMAT2 cfm;
                    cfm.cbSize = sizeof(cfm);
                     cfm.dwMask = CFM_PROTECTED;
                    SendMessage( hwnd, EM_SETCHARFORMAT,
                   (WPARAM)SCF_SELECTION, (LPARAM)&cfm );
					bc--;
					cd--;
			  }
	   }
	  else if(wp == 0x55 && cd !=0) {
		  if(!uc) {
	               CHARFORMAT2 cfm;
                    cfm.cbSize = sizeof(cfm);
					SendMessage( hwnd, EM_GETCHARFORMAT,
                    (WPARAM)SCF_SELECTION, (LPARAM)&cfm );
                 //    cfm.dwMask = CFM_UNDERLINETYPE;
					cfm.dwMask = CFM_UNDERLINE;
					 cfm.dwEffects = CFE_UNDERLINE;
			//		 cfm.bUnderlineType = CFU_UNDERLINEWAVE | 0x50; 

                    SendMessage( hwnd, EM_SETCHARFORMAT,
                   (WPARAM)SCF_SELECTION, (LPARAM)&cfm );
					uc++;
					cd--;
			   }
		   else if(uc != 0) {
		      	  CHARFORMAT2 cfm;
                    cfm.cbSize = sizeof(cfm);
                     cfm.dwMask = CFM_PROTECTED;
                    SendMessage( hwnd, EM_SETCHARFORMAT,
                   (WPARAM)SCF_SELECTION, (LPARAM)&cfm );
					uc--;
					cd--;
			  }
	  }
         break;
	case WM_CHAR: {
	   int blah = Search(hwnd);
	   wsprintf(end,"%s %d","//.signal -n editbox ",(int)AllProcs[blah].procz);
	   DoCommand(end);
				 }
	   break;
	  case WM_DESTROY:
          SubclassWindow(hwnd,NULL);
		  PostMessage(hwnd,WM_DESTROY,0,0);
		  break;
			}
		int blah = Search(hwnd);
          return CallWindowProc(AllProcs[blah].procold,hwnd,msg,wp,lp);
	 }
   int blah = Search(hwnd);
     return CallWindowProc(AllProcs[blah].procold,hwnd,msg,wp,lp);
}