si ma quale api ?? sul msdn nn trovo una mazza![]()
si ma quale api ?? sul msdn nn trovo una mazza![]()
leggi la guida che ti ho postato... e abbi fede (devi "capire" cosa vuoi fare... non si parla più soltanto di C/C++... leggi e prova gli esempiOriginariamente inviato da TestaDiMucca
si ma quale api ?? sul msdn nn trovo una mazza![]()
)
oppure questo: http://www.librinformatica.com/trade...tview/948/314/
...Terrible warlords, good warlords, and an english song
roba difficile quindi hehehe![]()
me la studio un po' và
mah... dipendeOriginariamente inviato da TestaDiMucca
roba difficile quindi hehehe![]()
me la studio un po' và![]()
Crea un nuovo "progetto" WIN32 GUI (io ho usato Dev C++)
e copia/incolla questo codice:
p.s. il progetto cerca il file bitmap (image.bmp) nella directory corrente. (il file .bmp ha dimensioni 400x200)codice:#include <windows.h> LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { HWND hwnd; MSG messages; WNDCLASSEX wincl; char szClassName[ ] = "WindowsApp"; wincl.hInstance = hThisInstance; wincl.lpszClassName = szClassName; wincl.lpfnWndProc = WindowProcedure; wincl.style = CS_HREDRAW | CS_VREDRAW ; wincl.cbSize = sizeof (WNDCLASSEX); wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION); wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION); wincl.hCursor = LoadCursor (NULL, IDC_ARROW); wincl.lpszMenuName = NULL; wincl.cbClsExtra = 0; wincl.cbWndExtra = 0; wincl.hbrBackground = (HBRUSH) GetStockObject (1); if (!RegisterClassEx (&wincl)) return 0; hwnd = CreateWindowEx (0,szClassName, "Splash Screen",WS_OVERLAPPED,CW_USEDEFAULT, CW_USEDEFAULT,400,200,HWND_DESKTOP, NULL,hThisInstance,NULL); ShowWindow (hwnd, nFunsterStil); UpdateWindow (hwnd) ; HBITMAP hbmp = (HBITMAP)LoadImage(hThisInstance,".\\image.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE); HDC hdc = GetDC(hwnd); HDC imageDC = CreateCompatibleDC(hdc); HBITMAP oldBMP = (HBITMAP)SelectObject(imageDC,hbmp); BitBlt(hdc,0,0,400,200,imageDC, 0,0,SRCCOPY); Sleep(5000); WinExec(".\\prova.exe", 1); PostQuitMessage(0); while (GetMessage (&messages, NULL, 0, 0)) { TranslateMessage(&messages); DispatchMessage(&messages); } return messages.wParam; } LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT ps; switch (message) { case WM_PAINT: BeginPaint (hwnd, &ps); EndPaint (hwnd, &ps); return 0; default: return DefWindowProc (hwnd, message, wParam, lParam); } return 0; }
il progetto ( splash screen) termina dopo 5 secondi(prima di chiudersi lancia un altro file eseguibile, quest'ultimo chiamato "prova.exe"... (<-- deve trovarsi sempre nella directory corrente.)
...Terrible warlords, good warlords, and an english song
Johnny sei un grande...
Ma Come faccio a nascondere il bordo della finestra lasciando solo l'immagine ????
PoWered by:
Gentoo 1.5.3 - Kernel 2.6.7
Debian Sid - Kernel 2.6.7 - Bash 3.0
Slackware current - Kernel 2.6.7
ma che ve ne fate di uno splash screen per un'applicazione a consolle? :quipy:
PoWered by:
Gentoo 1.5.3 - Kernel 2.6.7
Debian Sid - Kernel 2.6.7 - Bash 3.0
Slackware current - Kernel 2.6.7
niente, è una cosa tamarra![]()
in linea di massima no, io faccio programmini in C che metto in background e non visualizzo la consolle usando WINAPI WINMAIN pertanto uno splash a caricamento del sistema operativo mi ricorda che il prog è attivo...tutto qui......
l'ideale sarebbe levare il titolo della finestra e far in modo che venga sempre centrato, sto cercando in retema come al solito non troverò nulla che io capisca
![]()
TestaDiMucca quando trovi qualcosa farci sapere...
altrimenti ci affidiamo a Johnny
Se poi c'e' anche qualcuno che lo sa' fare sotto linux...
gli sarei immensamente grato...
PoWered by:
Gentoo 1.5.3 - Kernel 2.6.7
Debian Sid - Kernel 2.6.7 - Bash 3.0
Slackware current - Kernel 2.6.7