RawInput help Programming Game Development 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 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 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 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 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 by JOSED10S … a height, and a single list of integers/strings, board =rawinput(); Re: Create a boad in python Programming Software Development by JOSED10S … function(length, height, list): lenght=0 height=0 list=() board= rawinput() Re: Create a boad in python Programming Software Development 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 by AhmedHan Yes, thanks. It works now. Re: Using HID Input Programming Software Development 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 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 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 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 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 …