bonjour
clic droit sur l'exe et puis "tester" le prog fonctionne à merveille mais une fois installé à l'execution de l'ecran de veille les textures jpeg ne se chargent pas
merci d'avance
une partie du code:
UINT Ondule=1;//id timer ondulation
UINT Photos=2;//id timer photos
UINT EcranDeVeille=3;//id timer ecran de veille
BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
{
return TRUE;
}
LONG WINAPI ScreenSaverProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
case WM_CREATE:
hwndScr=hwnd;
DC=GetDC (hwnd);
InitPixelFormat (DC);
RC = wglCreateContext (DC);
wglMakeCurrent (DC, RC);
etc...........................(fonctions opengl)
Images.LoadTexture("PHOTOS//photo1.jpg",0);( Images. =classe SDL chargement de textures jpeg)
Images.LoadTexture("PHOTOS//photo2.jpg",1);
SetTimer(hwnd,Ondule,10,NULL);
SetTimer(hwnd,Photos,10000,NULL);
SetTimer(hwnd,EcranDeVeille,5,NULL);
case WM_TIMER:
switch(wParam)
{
case 1:
Ondulation();
break;
case 2:
if(texture<1)
{
glBindTexture(GL_TEXTURE_2D,texture++);
}
else texture=0;
break;
case 3:
RePaint();
break;
}
break;
default : return DefScreenSaverProc(hwnd,uMsg , wParam, lParam);
}
BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message,WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_CLOSE: EndDialog(hDlg,1); return TRUE;
case WM_COMMAND:
{
int idBtn = LOWORD(wParam);
switch(idBtn)
{
case BTN_1 : EndDialog(hDlg,1); break;
}
return TRUE;
}
default : return FALSE;
}
}