请教下各位,使用此函数想创建没有标题框,没有按钮框,完全透明的窗口,如何做?i_style我已经试过很多宏了。都不行。   p_event->hwnd =
        CreateWindowEx( WS_EX_NOPARENTNOTIFY | i_stylex,
                    p_event->class_main,             /* name of window class */
                    _T(VOUT_TITLE) _T(" (DirectX Output 1)"),  /* window title */
                    i_style,                                 /* window style */
                    (!p_event->wnd_cfg.x) ? CW_USEDEFAULT :
                        (UINT)p_event->wnd_cfg.x,   /* default X coordinate */
                    (!p_event->wnd_cfg.y) ? CW_USEDEFAULT :
                        (UINT)p_event->wnd_cfg.y,   /* default Y coordinate */
                    rect_window.right - rect_window.left,    /* window width */
                    rect_window.bottom - rect_window.top,   /* window height */
                    p_event->hparent,                       /* parent window */
                    NULL,                          /* no menu in this window */
                    hInstance,            /* handle of this program instance */
                    (LPVOID)p_event );           /* send vd to WM_CREATE */

解决方案 »

  1.   

    没有按钮框,标题栏可以在资源里设置啊,完全透明可以用SetLayeredWindowAttribute
      

  2.   

    p_event->hwnd =
            CreateWindowEx( WS_EX_NOPARENTNOTIFY | i_stylex,
                        p_event->class_main,             /* name of window class */
                        _T(VOUT_TITLE) _T(" (DirectX Output 1)"),  /* window title */
                        i_style,                                 /* window style */这里指定下,不要标题栏
                        (!p_event->wnd_cfg.x) ? CW_USEDEFAULT :
                            (UINT)p_event->wnd_cfg.x,   /* default X coordinate */
                        (!p_event->wnd_cfg.y) ? CW_USEDEFAULT :
                            (UINT)p_event->wnd_cfg.y,   /* default Y coordinate */
                        rect_window.right - rect_window.left,    /* window width */
                        rect_window.bottom - rect_window.top,   /* window height */
                        p_event->hparent,                       /* parent window */
                        NULL,                          /* no menu in this window */
                        hInstance,            /* handle of this program instance */
                        (LPVOID)p_event );           /* send vd to WM_CREATE */
      

  3.   

    谢谢两位的解答,是我没有把题目说清楚,i
    define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME| WS_MINIMIZEBOX | WS_MAXIMIZEBOX)style初始化时被定义为:
    i_style = WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE|WS_CLIPCHILDREN;我的本意是创建出一个层叠窗口没有边框与标题,只有客户区的窗口?
      

  4.   


    i_style=WS_POPUP|WS_SYSMENU|WS_VISIBLE|WS_CLIPCHILDREN;