问题一:主管要我下载了个tcpmp播放器源码,运行好后 要求我做改进:
自己建立一个工程,做个自己的界面,
要求tcpmp播放器 播放视频播放到一半的时候 弹出我自己做的那个界面
二:在做这个之前,可以考虑先做个准备任务:在源码中加个按钮?按按钮 弹出界面?谁可以给点提示吗
三:当然,我现在已经完成到程序一跑起来可以弹出界面,只是弹出的东西总是在主界面后面,被覆盖看不到了,谁可以告诉我怎么把界面挪动到前面并且改小一点?
我的代码截取了一部分,看看有什么问题啊
static HANDLE Load(const tchar_t* Name)
{
HANDLE Module;
tchar_t Path[MAXPATH];
tchar_t *s;
GetModuleFileName(NULL,Path,MAXPATH);
s = tcsrchr(Path,'\\');
if (s) s[1]=0;
tcscpy_s(Path+tcslen(Path),TSIZEOF(Path)-tcslen(Path),Name);
Module = LoadLibrary(Path);
memset(&si,0,sizeof(si));
si.cb=sizeof(si);
si.wShowWindow=1;
si.dwFlags=0x00000001;
fRet=CreateProcess(L"\\Program Files\\myout\\myout.exe",NULL,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
if (!Module)
Module = LoadLibrary(Name);
return Module;
}
#endif
#if !defined(TARGET_WINCE) && defined(UNICODE)
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hParent,LPSTR CmdA,int CmdShow)
{
WCHAR Cmd[2048];
mbstowcs(Cmd,CmdA,sizeof(Cmd)/sizeof(WCHAR)); //!!!
#else
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hParent,TCHAR* Cmd,int CmdShow)
{
#endif
#ifndef NDEBUG
// DLLTest(); // just to help debugging plugins. comment out if not needed
Context();
#endif
#if defined(TARGET_WINCE) && defined(ARM)
if (ProgramId == 2)
{
OSVERSIONINFO Ver;
Ver.dwOSVersionInfoSize = sizeof(Ver);
GetVersionEx(&Ver);
if (Ver.dwMajorVersion*100 + Ver.dwMinorVersion >= 421)
{
// old shell menu not supported after WM2003SE
MessageBox(NULL,T("This ARM_CE2 version of the player is not compatible with this device. Please install ARM_CE3 version."),NULL,MB_OK|MB_ICONERROR);
return 1;
}
}
#endif
#ifdef NDEBUG
if (!FindRunning(Cmd))
{
HANDLE Handle = CreateMutex(NULL,FALSE,ProgramName);
if (GetLastError() != ERROR_ALREADY_EXISTS)
#endif
{
#ifndef NO_PLUGINS
HMODULE Module;
SetCursor(LoadCursor(NULL, IDC_WAIT));
Module = Load(T("interface.plg"));
if (Module)
{
void (*Main)(const tchar_t* Name,const tchar_t* Version,int Id,const tchar_t* CmdLine);
*(FARPROC*)&Main = GetProcAddress(Module,TWIN("Main"));
if (!Main)
*(FARPROC*)&Main = GetProcAddress(Module,TWIN("_Main@16"));
if (Main)
Main(ProgramName,ProgramVersion,ProgramId,Cmd);
FreeLibrary(Module);
}
#else
Main(ProgramName,ProgramVersion,ProgramId,Cmd);
#endif
------解决方案--------------------
si.cb=sizeof(si);
si.wShowWindow=SW_SHOWNORMAL;
si.dwFlags=STARTF_USESHOWWINDOW;