Skip to content

Commit

Permalink
修正demo的问题. 此Demo编写的时候, 主流系统还是 32bit 的, 所以用了一个 %d 来接收 HWND 类型, 现在已经不对了…
Browse files Browse the repository at this point in the history
…, 改正一下
  • Loading branch information
wysaid committed Jul 20, 2024
1 parent b6c8d07 commit b3cbd59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion demo/egestar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ int preinit( int argc, char* argv[] ) {
//return -1;
} else if ( stricmp( argv[1], "/p" ) == 0 ) { // 小窗口预览模式
HWND hwnd;
sscanf( argv[2], "%d", &hwnd );
if (strstr(argv[2], "0x") == argv[2]) {
// 十六进制字符串转换为指针
sscanf( argv[2], "%p", &hwnd );
} else {
hwnd = (HWND)atoll( argv[2] );
}

attachHWND( hwnd ); // 新ege函数
setinitmode( INIT_NOBORDER | INIT_CHILD | INIT_WITHLOGO ); // 指定初始化为无边框子窗口
g_max = 200;
Expand Down

0 comments on commit b3cbd59

Please sign in to comment.