用SDK画一个Edit控件,CreateWindow("EDIT","Content"...)就可以了.如果在程序过程 
中,自己输出了一个值在EDIT中,然后可以用GetWindowText来取得这个值,但在取这个值 
的时候,好像有问题,对应的这个值是跟地址在一起的.好像无法单独取出它的内容. 请高手指教!

解决方案 »

  1.   

    ? 问题好像没看明白.
    你 GetWindowText 和 SetWindowText 的参数贴来看看?
      

  2.   

    hEdit=CreateWindow( 
    "EDIT",   // predefined class 
    "E:\\mp3\\liangzhu.mp3",       // button text 
    WS_CHILD | WS_VISIBLE | WS_BORDER | 
        ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL,  // styles  // Size and position values are given explicitly, because 
    // the CW_USEDEFAULT constant gives zero values for buttons. 
    20,         // starting x position 
    80,         // starting y position 
    400,        // button width 
    40,        // button height 
    hWnd,       // parent window 
    (HMENU)IDE_FILENAME,       // ID 
    (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE), 
    NULL);      // pointer not needed 上面画的这种控件是一个EDIT控件,现在想MessageBox上面这个控件里填写的内容.如何实现?
      

  3.   


    char txt[80];
    GetWindowText(hEdit,txt,80);
    MessageBox(GetFocus,"test",txt,MB_OK);