soltaire33 Temat założony przez niniejszego użytkownika |
[C++, DirectX] Wyświetlanie tekstu » 2012-11-28 12:36:56 #include <windows.h> #include <d3dx9.h> #include <D3dx9core.h> #include <D3d9types.h>
void Zmoderowano() { LPD3DXFONT m_font; D3DXCreateFont( NULL, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT( "Arial" ), & m_font ); D3DCOLOR fontColor = D3DCOLOR_ARGB( 255, 0, 0, 255 ); RECT rct; rct.left = 2; rct.right = 780; rct.top = 10; rct.bottom = rct.top + 20; m_font->DrawText( NULL, "Hello World", - 1, & rct, 0, fontColor ); }
BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { if( fdwReason == DLL_PROCESS_ATTACH ) { MessageBox( 0, "DLL Injected.", "Attention", 0 ); Zmoderowano(); } return TRUE; }
nie ma błędów Uważaj lepiej z takimi nazwami funkcji - xevuel |
|
|
krzyk |
» 2012-11-28 12:50:37 DrawText powinno być miedzy BeginScene i EndScene chyba że użyjesz Format DT_CALCRECT. |
|
soltaire33 Temat założony przez niniejszego użytkownika |
» 2012-11-28 13:05:35 teraz to mam undeclared identifier BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { if( fdwReason == DLL_PROCESS_ATTACH ) { MessageBox( 0, "DLL Injected.", "Attention", 0 ); BeginScene(); WyswietlTekst(); EndScene(); } return TRUE; }
|
|
krzyk |
» 2012-11-28 14:04:51 Ojojoj.Niezniechęcam Cię do hakjerowania ale jeśli niezrozumiałeś o co mi chodzi to niemasz pojęcia o DirectX.
Polecam zrobić prostą aplikacje wyświetlającą zielone tło,wtedy zobaczysz że niejest to takie hop siup. |
|
SeaMonster131 |
» 2012-11-28 19:02:38 teraz to mam undeclared identifier |
Wolisz czekać kilka godzin, aż ktoś Ci odpowie na forum, czy sam spojrzysz w google? Z tego co wiem, BeginScene() oraz EndScene() to metody klasy od Direct device. Ale czy rozwiąże to problem - nie mam pojęcia. |
|
DejaVu |
» 2012-11-29 13:10:07 |
|
« 1 » |