Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalproblem with EnumDisplayDevices(..) Pin
Anonymous18-Jun-03 2:03
Anonymous18-Jun-03 2:03 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Anonymous18-Jun-03 4:18
Anonymous18-Jun-03 4:18 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Anonymous18-Jun-03 4:51
Anonymous18-Jun-03 4:51 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Ryan Binns18-Jun-03 15:31
Ryan Binns18-Jun-03 15:31 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Hatem Darweesh18-Jun-03 20:56
Hatem Darweesh18-Jun-03 20:56 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Ryan Binns18-Jun-03 21:06
Ryan Binns18-Jun-03 21:06 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Hatem Darweesh18-Jun-03 21:18
Hatem Darweesh18-Jun-03 21:18 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Ryan Binns18-Jun-03 21:33
Ryan Binns18-Jun-03 21:33 
The code that you posted has the #define line after the #include line, so I assumed that this was the code you were testing.

The function works perfectly. I have used it plenty of times before. Try this:
#include <windows.h>
#define COMPILE_MULTIMON_STUBS
#include <multimon.h>

int WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
    DISPLAY_DEVICE dd;
    dd.cb = sizeof(DISPLAY_DEVICE);
    for(int i=0; EnumDisplayDevices(NULL, i, &dd, 0); i++)
    {
        // Do whatever with the data here
    }
    return 0;
}


Ryan

Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)

Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

GeneralRe: problem with EnumDisplayDevices(..) Pin
Hatem Darweesh18-Jun-03 22:02
Hatem Darweesh18-Jun-03 22:02 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Anonymous18-Jun-03 22:09
Anonymous18-Jun-03 22:09 
GeneralRe: problem with EnumDisplayDevices(..) Pin
Ryan Binns18-Jun-03 22:21
Ryan Binns18-Jun-03 22:21 
Generaluse of CFrameWnd Pin
gucy18-Jun-03 0:40
gucy18-Jun-03 0:40 
GeneralLogonUser without Password Pin
isriniv18-Jun-03 0:22
isriniv18-Jun-03 0:22 
GeneralRe: LogonUser without Password Pin
geo_m18-Jun-03 0:45
geo_m18-Jun-03 0:45 
GeneralRe: LogonUser without Password Pin
AlexO18-Jun-03 3:58
AlexO18-Jun-03 3:58 
GeneralOne Form of Data Transfer to other Form Pin
Anonymous18-Jun-03 0:21
Anonymous18-Jun-03 0:21 
GeneralDialog box questions Pin
pani6817-Jun-03 23:53
pani6817-Jun-03 23:53 
GeneralRe: Dialog box questions Pin
skaanji18-Jun-03 0:27
skaanji18-Jun-03 0:27 
GeneralRe: Dialog box questions Pin
Ryan Binns18-Jun-03 4:01
Ryan Binns18-Jun-03 4:01 
Questionhow do i convert a string to LPCSTR? Pin
Member 40481317-Jun-03 23:33
Member 40481317-Jun-03 23:33 
AnswerRe: how do i convert a string to LPCSTR? Pin
Anonymous18-Jun-03 1:55
Anonymous18-Jun-03 1:55 
AnswerRe: how do i convert a string to LPCSTR? Pin
Ryan Binns18-Jun-03 4:14
Ryan Binns18-Jun-03 4:14 
Generalediting mpeg 1 question Pin
Emiliano17-Jun-03 23:29
Emiliano17-Jun-03 23:29 
GeneralActivex control in .NET Form (VS.NET 2003) Pin
Uma Mahes17-Jun-03 23:07
Uma Mahes17-Jun-03 23:07 
GeneralCEdit Control Pin
Anonymous17-Jun-03 22:50
Anonymous17-Jun-03 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.