Duckling Napisano Lipiec 10, 2018 Autor Zgłoś Napisano Lipiec 10, 2018 najprosciej w opengl kwadrat narysowac? nie zajmuje sie opengl ale nie wystarczy Ci np FillRect? Cytuj
Nemo Napisano Lipiec 11, 2018 Zgłoś Napisano Lipiec 11, 2018 Zgadzam sie z mistyk9001 ze lepiej uzyj GDI niz API do rysowania prostych figur. Ale jeśli się uprzesz to przecież możesz odbierać komunikat WM_CHAR. Zaglądnij jeszcze do dokumentacji na chasło WM_CHAR bo możliwe że w którymś parametrze MSG (LPARAM lub WPARAM) jest wartość licznika potwórzęn danego znaku - to też moze sie przydac. pozdro. Cytuj
Enigma Napisano Lipiec 11, 2018 Zgłoś Napisano Lipiec 11, 2018 Eee, troszke nie wiem o co ci chodzi z tym patrzeniem PS: Z opengl to było tak dla przykłądu, bo to co robie lepiej jest zrobic opengl. Cytuj
Nemo Napisano Lipiec 11, 2018 Zgłoś Napisano Lipiec 11, 2018 Wkleje ci w kawałek z dokumentacji: The WM_CHAR message is posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. WM_CHAR contains the character code of the key that was pressed. WM_CHAR chCharCode = (TCHAR) wParam; // character code lKeyData = lParam; // key data Parameters chCharCode Value of wParam. Specifies the character code of the key. lKeyData Value of lParam. Specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table: Value Description 0-15 Specifies the repeat count. The value is the number of times the keystroke is repeated as a result of the user holding down the key. 16-23 Specifies the scan code. The value depends on the original equipment manufacturer (OEM). 24 Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0. 25-28 Reserved; do not use. 29 Specifies the context code. The value is 1 if the ALT key is held down while the key is pressed; otherwise, the value is 0. 30 Specifies the previous key state. The value is 1 if the key is down before the message is sent, or it is 0 if the key is up. 31 Specifies the transition state. The value is 1 if the key is being released, or it is 0 if the key is being pressed. Przyjzyj sie temu: lKeyData - to jest licznik potwórzeń. Jak przytrzymasz jakiś klawisz dłużej to Windows wysyłając ten komunikat zwiększa wartosc w lKeyData (czyli lParam). To było to co może ci się przydać. Ale nie wiem czy ci to pomoze bo nie zabardzo rozumiem problema;) Pozdro. Cytuj
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.