g_wc_Flash.cbSize = sizeof( WNDCLASSEX );
g_wc_Flash.style = CS_CLASSDC;
g_wc_Flash.lpfnWndProc = MsgProc_Flash;
g_wc_Flash.cbClsExtra = 0L;
g_wc_Flash.cbWndExtra = 0L;
g_wc_Flash.hInstance = GetModuleHandle( NULL );
g_wc_Flash.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDI_ICON_MAIN ) );
g_wc_Flash.hCursor = LoadCursor( hInst, IDC_ARROW );
g_wc_Flash.hbrBackground = ( HBRUSH )GetStockObject( LTGRAY_BRUSH );
g_wc_Flash.lpszMenuName = NULL;
g_wc_Flash.lpszClassName = _T( "Flash" );
g_wc_Flash.hIconSm = NULL;
RegisterClassEx( &g_wc_Flash ); g_hWnd_Flash = CreateWindow( _T( "" ), _T( "" ), WS_VISIBLE | WS_POPUP, 355, 120, 497, 430, NULL, NULL, g_wc_Flash.hInstance, NULL );
SetWindowLong(g_hWnd_Flash, GWL_EXSTYLE, GetWindowLong(g_hWnd_Flash, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes( g_hWnd_Flash, RGB( 255, 255, 255 ), 255, LWA_COLORKEY ); ShowWindow( g_hWnd_Flash, SW_SHOWDEFAULT );
UpdateWindow( g_hWnd_Flash );这么写有什么错误吗?窗口总是全灰一片,什么都显示不出来
g_wc_Flash.style = CS_CLASSDC;
g_wc_Flash.lpfnWndProc = MsgProc_Flash;
g_wc_Flash.cbClsExtra = 0L;
g_wc_Flash.cbWndExtra = 0L;
g_wc_Flash.hInstance = GetModuleHandle( NULL );
g_wc_Flash.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDI_ICON_MAIN ) );
g_wc_Flash.hCursor = LoadCursor( hInst, IDC_ARROW );
g_wc_Flash.hbrBackground = ( HBRUSH )GetStockObject( LTGRAY_BRUSH );
g_wc_Flash.lpszMenuName = NULL;
g_wc_Flash.lpszClassName = _T( "Flash" );
g_wc_Flash.hIconSm = NULL;
RegisterClassEx( &g_wc_Flash ); g_hWnd_Flash = CreateWindow( _T( "" ), _T( "" ), WS_VISIBLE | WS_POPUP, 355, 120, 497, 430, NULL, NULL, g_wc_Flash.hInstance, NULL );
SetWindowLong(g_hWnd_Flash, GWL_EXSTYLE, GetWindowLong(g_hWnd_Flash, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes( g_hWnd_Flash, RGB( 255, 255, 255 ), 255, LWA_COLORKEY ); ShowWindow( g_hWnd_Flash, SW_SHOWDEFAULT );
UpdateWindow( g_hWnd_Flash );这么写有什么错误吗?窗口总是全灰一片,什么都显示不出来
解决方案 »
- 请教一个简单的重叠结构的问题
- Ring0 下由 ZwQueryInformationProcess 取得 ProcessImageFileName 如何轉換為類似 C:\ 開頭的路徑名?
- mfc web控件
- [求助]请问怎么让浮点型以最简格式输出?
- 承蒙大家和大版主抬爱,就任基础版小版主,散分。前十位给分。1
- 困扰我的一大问题,之前从未遇到
- 在线急等:请问在view的基类是cformview的窗口的对话框里怎么解决数据初始化问题?
- 一个最菜的问题:CSDN邮件期刊用什么来阅读?
- 一个无模式对话框突然无法打开,提示:“试图进行系统不支持的操作”
- 请教:怎样遍历当前窗体上的控件,并得出他是什么类派生出来的?
- 这个DLL怎么写? 加急! 我不知道彼动态导入dll,请哪位高手帮我写一下,谢谢,急用
- 在tree control中 如何使子节点不缩进,即让父节点和子节点在左侧都是对齐的,可以实现吗? 谢谢
2、调用SetLayeredWindowAttributes()函数时,可以指定按照colorKey方式还是Alpha方式混合。
使用Alpha方式比较容易,直接指定透明度;
使用colorkey方式,你需要指定第二个参数--扣象颜色:在窗体中如果和这个颜色相同,就会透明效果,具体的你试试就知道了
先看AtlAxWinInit();