Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 32 results for
rawinput
- Page 1
RawInput help
Programming
Game Development
12 Years Ago
by dan_code_guru
I tried to use the code on MSDN to create
Rawinput
but i kept getting this error: RAWINPUTDEVICE was not declared … direct x and i am using Code Blocks [ICODE] void
RawInput
(void) { RAWINPUTDEVICE Rid[2]; //keyboard Rid[0] .usUsagePage = 1; Rid…
Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
14 Years Ago
by Medalgod
…;)) { coOrds[0] = 2; } else if (
rawInput
.ToLower().Contains("c")) { coOrds[0] = 3…coOrds[0] = 0; } //Vertical co-ordinate if (
rawInput
.ToLower().Contains("1")) { coOrds[1] = 1…
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
13 Years Ago
by Medalgod
…;)) { coOrds[0] = 2; } else if (
rawInput
.ToLower().Contains("c")) { coOrds[0] = 3…coOrds[0] = 0; } //Vertical co-ordinate if (
rawInput
.ToLower().Contains("1")) { coOrds[1] = 1…
HID Input
Programming
Software Development
18 Years Ago
by AhmedHan
…) RID_INPUT, (LPVOID) lpbBuffer, (PUINT) &cbSize, (UINT) sizeof(RAWINPUTHEADER));
RAWINPUT
* pRawInput = (
RAWINPUT
*) lpbBuffer; if (pRawInput->header.dwType == RIM_TYPEKEYBOARD) { usVKey = pRawInput->…
Using HID Input
Programming
Software Development
18 Years Ago
by AhmedHan
…) RID_INPUT, (LPVOID) lpbBuffer, (PUINT) &cbSize, (UINT) sizeof(RAWINPUTHEADER));
RAWINPUT
* pRawInput = (
RAWINPUT
*) lpbBuffer; if (pRawInput->header.dwType == RIM_TYPEKEYBOARD) return LastKey = pRawInput…
Create a boad in python
Programming
Software Development
12 Years Ago
by JOSED10S
… a height, and a single list of integers/strings, board =
rawinput
();
Re: Create a boad in python
Programming
Software Development
12 Years Ago
by JOSED10S
… function(length, height, list): lenght=0 height=0 list=() board=
rawinput
()
Re: Create a boad in python
Programming
Software Development
12 Years Ago
by woooee
… indented and will give an error on the "board=
rawinput
()" statement. "Thinking in Python" has a section…
Re: Read file name from console in PASCAL
Programming
Software Development
11 Years Ago
by alex910TN
… (* BEGIN WHILE LOOP *) read( InputFile,
RawInput
[i]); i := i + 1; SizeOfArray … WHILE LOOP *) writeln(OutputFile,
RawInput
); FormattedInput := UpperCase(
RawInput
, SizeOfArray); (* FormattedInput Will Contain…
Re: functions in C
Programming
Software Development
16 Years Ago
by Narue
… <stdio.h> #include <windows.h> void
RawInput
( BOOL on ) { HANDLE in = GetStdHandle ( STD_INPUT_HANDLE ); DWORD mode; GetConsoleMode ( in… SetConsoleMode ( in, mode ); } int main ( void ) {
RawInput
( TRUE ); /* getchar won't wait for a newline */
RawInput
( FALSE ); /* getchar will wait for a…
Re: Using SDL with the Raw Input API.
Programming
Software Development
12 Years Ago
by Ancient Dragon
See the links in my post in your other thread on the same subject (getting WM_INPUT message). [quote]Note that lParam has the handle to the
RAWINPUT
structure, not a pointer to it. To get the raw data, use the handle in the call to GetRawInputData.[/quote] [URL="http://msdn.microsoft.com/en-us/library/ms645590(v=vs.85).aspx"]link[/URL]
Re: Why cant I input a string this way?
Programming
Software Development
11 Years Ago
by sunfutbol
Im actually a beginner and was jus curious to know if using only input and then type casting it to string was possible...was jus trying to do something like this, for example ; >>> input() 3 * 4 ** 5 3072 This cant be done with
rawinput
, so was just wondering...
Re: RawInput help
Programming
Game Development
12 Years Ago
by sfuo
The issue is because the value of _WIN32_WINNT is below 0x0501. When I compile in Code::Blocks I get the same problem, but if I compile in Visual Studio C++ then I no longer have the problem. This is because the version of MinGW that comes with Code::Blocks is giving _WIN32_WINNT me a value of 0x0400 whereas Visual Studio is giving me 0x0601. …
Re: RawInput help
Programming
Game Development
12 Years Ago
by dan_code_guru
Cheers for the help I'll try out visual studio Can I use the free version for game development or do I have to pay for the full version
Re: RawInput help
Programming
Game Development
12 Years Ago
by sfuo
From what I read on the [URL="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_Express"]Visual Studio Wiki[/URL] there should be no major limitations by using the Express edition opposed to Ultimate or something you would pay for. There are a few things in Visual C++ that I found annoying like the pre-compiled headers …
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
14 Years Ago
by Geekitygeek
Your problem is at line 811 [iCODE]currentGrid[cell] = whosGo;[/iCODE] Arrays are a reference type, so when you change currentGrid[cell] you are actually changing OX[cell] so the method cycles through filling each array entry. Try using array.Clone() to pass the OX array in, or create a temporary array in the method to copy OX into.
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
14 Years Ago
by Medalgod
Hi, First & foremost, thankyou very much for the solution. It is greatly appreciated. I just wanted to check i understood your explanation as to why this occured (so i don't do the same thing again in future). The array that is 'made' for the second function to work on is merely a link/reference to the parent array? And it has write …
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
14 Years Ago
by Geekitygeek
C# data types are eitehr reference or value. When you pass a value type as a parameter a copy of it is created in memory so anything you do to it is not reflected back to the original object. Reference types essentially pass a pointer to their location in memory. SO anything you do to them in the method is reflected in the original object. …
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
14 Years Ago
by Medalgod
That was of great help, I didn't understand that when an array gets passed it does not get copied by default like other data types. Thanks :)
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
13 Years Ago
by amir pr
thanks a lot for your source code I copied your code in my project but it found some errors in function [[[ [U][B]static int <strong class="highlight">AI</strong>()[/B][/U] ]]] and it didn't execute . please help me whit this problem why it does't work !!!
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
13 Years Ago
by amir pr
Thanks a lot although it worked but as you said it has some errors yet . When I enter co-ordinates in execute mode for for question " Enter the co-ordinates you want to make an entry in:" it doesn't do anything. I'll be so great full if you correct it if it's not very time consuming for you. I'll probably work on this project for my AI …
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
13 Years Ago
by Medalgod
The coordinate system works fine, you enter one letter and one number eg a1 to go in the top left. And no, I wont be making any changes, I posted it only so that you could build on it if you wanted, not so i could do a piece of work for you^^
Re: Tic-Tac-Toe MiniMax AI Alogorithm
Programming
Software Development
13 Years Ago
by amir pr
you're right dear Medalgod I'll try to work on you're project and develop it . thanks again for you're helps.
Re: HID Input
Programming
Software Development
18 Years Ago
by WolfPack
Modify your RegisterInput function as follows. [code] VOID RegisterInput(HWND hWnd;) { Rid.usUsagePage = 0x01; Rid.usUsage = 0x06; Rid.dwFlags = RIDEV_INPUTSINK; Rid.hwndTarget = hWnd; // The Window Handle of your window if (RegisterRawInputDevices(&Rid, 1, sizeof(Rid)) == FALSE) ErrorTest("Error registering input&…
Re: HID Input
Programming
Software Development
18 Years Ago
by AhmedHan
Yes, thanks. It works now.
Re: Using HID Input
Programming
Software Development
18 Years Ago
by WolfPack
use the [code]pRawInput->data.keyboard.Message[/code] field. It returns 0x101 when released and 0x100 ( i think it is 0x100, check the documentation just in case ) when it is pressed. You can use an if condition to check the two. something like [code] if ( pRawInput->data.keyboard.Message = 0x100 ) // Pressed { // Do …
Re: Using HID Input
Programming
Software Development
18 Years Ago
by AhmedHan
Windows sends the key twice. First time it sends the key with a WM_KEYDOWN, and then with a WM_KEYUP message. As a special case, it sends WM_SYSKEYDOWN and WM_SYSKEYUP when ALT key is pressed. No problem so far. But when either Windows, insert, delete, home, end, pageup or pagedown key is pressed, WM_KEYDOWN and WM_KEYUP messages are sent twice.…
Re: Using HID Input
Programming
Software Development
18 Years Ago
by WolfPack
[QUOTE]But when either Windows, insert, delete, home, end, pageup or pagedown key is pressed, WM_KEYDOWN and WM_KEYUP messages are sent twice. I mean, 2x2=4 times. So, what about this situation? [/QUOTE] All these Keys are Extended Keys. If you read the documentation for WM_KEYDOWN, WM_KEYUP ..., you will see that the 25th bit of the lParam value…
Re: Using HID Input
Programming
Software Development
18 Years Ago
by AhmedHan
But I cannot use WM_KEYDOWN or something else, because I already use WM_INPUT. I recieve the input with WM_INPUT, not with WM_KEYDOWN. When user hits ALT key, WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYDOWN are sent. But, WM_SYSKEYUP is not sent. Why? Why does WM_SYSKEYDOWN is sent twice?
Re: Using HID Input
Programming
Software Development
18 Years Ago
by WolfPack
[QUOTE=AhmedHan]But I cannot use WM_KEYDOWN or something else, because I already use WM_INPUT. I recieve the input with WM_INPUT, not with WM_KEYDOWN. When user hits ALT key, WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYDOWN are sent. But, WM_SYSKEYUP is not sent. Why? [/QUOTE] [quote=MSDN] WM_SYSKEYUP Notification The WM_SYSKEYUP message is posted …
1
2
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC