   [win32] WM_SETTEXT doesn't work?
  Hi, I am using an edit control made with:HWND myEdit = CreateWindow(WC_EDIT,"1.0",ES_RIGHT|WS_BORDER|WS_VISIBLE|WS_CHILD,140,400,100,20,window,0,0,0);However, if I send a WM_SETTEXT message:SendMessage(myEdit,WM_SETTEXT,0,(LPARAM)"testing");It changes the text properly.... until I actually click the textbox, then it reverts back to 1.0.What is going on?   
  I can't duplicate the problem with just the info you posted. Can you post your parent window creation code and in what context you create the child and where you send the message?   ;  Ahh, I figured it out. I was calling the SendMessage right after the edit control was created. I am guessing that it has some kind of an internal WM_SETTEXT that gets sent only the first time it gets focus.   ;Quote:I am guessing that it has some kind of an internal WM_SETTEXT that gets sent only the first time it gets focus.I don't think so. But if it's working, don't fix what ain't broke, I guess.FYI, the following code works for me with either SendMessage position.myEdit = CreateWindow(WC_EDIT,"1.0",ES_RIGHT|WS_BORDER|WS_VISIBLE|WS_CHILD,140,400,100,20,hWnd,0,0,0);SendMessage(myEdit,WM_SETTEXT,0,(LPARAM)"sample");ShowWindow(hWnd, nCmdShow);UpdateWindow(hWnd);//SendMessage(myEdit,WM_SETTEXT,0,(LPARAM)"sample");