Question on using SystemParametersInfo in a form RRS feed

  • Question

  • Hi,

    I'm using Visual Studio 2005. I've programmed in c++ before, but very little in Visual c++.

    I'm looking to make a small application that will reside in the far right corner of a users desktop. The application will query a DB that I manage via a ODBC driver.

    I first thought that this would be easiest to create with a Forms Application via the wizard.  While trying to get the form to reside automatically in the far corner of the desktop, I tried using the SystemParametersInfo call in order to find the size of the desktop, then to move the form with that information.

        RECT windowSize;
        SystemParametersInfo(SPI_GETWORKAREA, 0, &windowSize, 0);

    However, I when trying to compile, I get the error message:

    Error    1    error LNK2028: unresolved token (0A000008) "extern "C" int __stdcall SystemParametersInfoW(unsigned int,unsigned int,void *,unsigned int)" (?SystemParametersInfoW@@$$J216YGHIIPAXI@Z) referenced in function "public: __clrcall windowControl::windowControl(void)" (??0windowControl@@$$FQ$AAM@XZ)    windowControl.obj   

    Am I going the completely wrong route with this? I'm wondering if that function call can even be used in this form?

    Wednesday, October 8, 2008 8:57 PM


All replies