谁有透明的静态文本框,或编辑框控件!!!!!!!!!!!

解决方案 »

  1.   

    Just go to www.codeguru.com, you will attain what you want
      

  2.   

    在你的代码中加入这些,应该可以实现CWnd *Static=(CWnd*)GetDlgItem(ID_xxx);   //ID_xxx静态文本框id
    HINSTANCE hInst = LoadLibrary("User32.DLL"); 
    if(hInst) 
    {            
    typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);          
    MYFUNC fun = NULL;
    //取得SetLayeredWindowAttributes函数指针     
    fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");
    if(fun)fun(Static->GetSafeHwnd(),0,a,2);    
                     //0<a<255,透明值 
    FreeLibrary(hInst); 
    }
      

  3.   

    派生,然后在你派生的控件的OnInitDialog中加上使窗体变为透明的代码
    如下:///////////////////////////////////////////////////
    SetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE,
    GetWindowLong(this->GetSafeHwnd(),GWL_EXSTYLE)^0x80000);
    HINSTANCE hInst = LoadLibrary("User32.DLL"); 
    if(hInst) 

    typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD); 
    MYFUNC fun = NULL;
    //取得SetLayeredWindowAttributes函数指针 
    fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");
    if(fun)fun(this->GetSafeHwnd(),0,5,2); 
    FreeLibrary(hInst); 
    }
      

  4.   

    to:  AthlonxpX86(一滴水)  
        不行
     to:  cbc(逍遥子)
        可不可以不用派生?
      

  5.   

    SetLayeredWindowAttributes是Win2000下用的API,
    Win98下用不了.给篇不错的文章看看吧, 会有很多启发的.
    http://www.csdn.net/Develop/read_article.asp?id=9603
      

  6.   

    谢谢:goodlcp(goodlcp) 
        俺瞧瞧!