Oula, déjà pourquoi les types demandés ne sont pas les mêmes?
Error :
error C2664: 'CommandLineToArgvW' : cannot convert parameter 1 from 'char *' to 'const unsigned short *'
1 2 3 4 5 6 7 8 9 10 11 12 13
| int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR commandLine, int nShowCmd)
{
int argc = 0;
LPWSTR * argv = CommandLineToArgvW(GetCommandLine(), &argc);
if (2 == argc)
{
// TODO verif si c'est bien des int en param
int x = (int)argv[0];
int y = (int)argv[1];
MyCreateWindow(hInstance, hPrevInstance, commandLine, nShowCmd, 1, x, y);
}
return 0;
} |
Pour la verification des paramètres, je suis sure que ce n'est pas ce qu'il faut faire... je suis en cous de recherche...
Partager