Menu

A little help with GDB please

2003-01-13
2012-09-26
  • Nobody/Anonymous

    My program read values from Registry Keys and get its main window x/y position from it.

    But it is not working.

    I was able to use GDB to watch the values of the vars that hold this values and the values are correct.

    Than i thought the problem should be when i try to move the window to this position, heres the line:
     
    MoveWindow(mainWindow, (int)mainxpos, (int)mainypos, 369, 445, FALSE);

    Can i use GDB to see what is the return value from this  MoveWindow() ? Im totally new to GDB.

     
    • Nobody/Anonymous

      As a matter of fact, i think ill ask your help on this:

      I gave up on using the registry, and im using a ini file now.

      My program has to load values from key mainwndx and mainwndy to the vars im gonna use with MoveWindow() later (mainxpos, mainypos).

      I have declared them like this:
      char mainxpos[10];
      char mainypos[10];

      and my GetPrivateProfileString() line looks like:

         GetPrivateProfileString("positions", "mainwndx", "200", mainxpos, 10,  ".\\obs.ini");
        GetPrivateProfileString("positions", "mainwndy", "200", mainypos, 10,  ".\\obs.ini");

      Maybe that where all the problem is happening: MoveWindow wants its args to be INTs :\

      What can i do here?

       
      • Nobody/Anonymous

        First use atoi on this char vars then use MoveWindow.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.