New topic: How to convert a c++ structure for usage with WIN32 API Call
<http://forums.realsoftware.com/viewtopic.php?t=29675> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message spacewalker Post subject: How to convert a c++ structure for usage with WIN32 API CallPosted: Fri Aug 21, 2009 10:34 am Joined: Thu Nov 08, 2007 4:59 am Posts: 261 Location: Germany Hello, I need to call the WIN32 API function SetConsoleCursorPosition The function is decribed here: http://msdn.microsoft.com/en-us/library/ms686025(VS.85).aspx It needs 2 parameters : hConsoleOutput as Integer dwCursorPosition as "COORD structure" My problem is that I dont know how to create and pass a "structure" to this function : The "COORD structure" is defined like this in C++: Code:typedef struct _COORD { SHORT X; SHORT Y; }COORD, *PCOORD; I am as far as this : Code:Soft Declare Function GetStdHandle Lib "kernel32" (iStdHandle As Integer) As Integer Soft Declare Function SetConsoleCursorPosition Lib "kernel32" (ConsoleOutputHandle As Integer, COORD ?????) As Integer const STD_OUTPUT_HANDLE = &hFFFFFFF5 dim consoleHandle as Integer consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE) '**set Cursor Postion to x/y : x=1 y=1 '**How to create a "structure" containing x/y and pass it to the API Call ? Call SetConsoleCursorPosition (consoleHandle,?????) .. thank you Heinz _________________ Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
