Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdd and Remove Program Pin
_anil_22-May-06 16:03
_anil_22-May-06 16:03 
QuestionEnumDisplayDevices Pin
zaro33322-May-06 15:39
zaro33322-May-06 15:39 
AnswerRe: EnumDisplayDevices Pin
_anil_22-May-06 16:41
_anil_22-May-06 16:41 
AnswerRe: EnumDisplayDevices Pin
zaro33323-May-06 4:56
zaro33323-May-06 4:56 
GeneralRe: EnumDisplayDevices Pin
zaro33323-May-06 4:58
zaro33323-May-06 4:58 
GeneralRe: EnumDisplayDevices Pin
zaro33323-May-06 5:01
zaro33323-May-06 5:01 
GeneralRe: EnumDisplayDevices [modified] Pin
_anil_23-May-06 15:05
_anil_23-May-06 15:05 
AnswerRe: EnumDisplayDevices [modified] Pin
zaro33324-May-06 4:14
zaro33324-May-06 4:14 
Anil, THANK YOU VERYYYYYYYYYY MUCHHHHHH, YOU ARE ONE SMART PERSON, I REALLY WANT TO THANK YOU FOR YOUR HELP, I WAS ABLE TO USE THE CODE ABOVE AND IT WORKS. I JUST INCLUDED A COUT COMMAND TO PRINT OUT THE DEVICE INFORMATION. THANKS A LOTCool | :cool: Cool | :cool: Big Grin | :-D Big Grin | :-D Big Grin | :-D Cool | :cool: Cool | :cool:

if anything, this is how i change the code that Anil gave me, for other people looking at this question: [** I had the error for precompiler stdafx.h, so just go to settings and ignore the precompiler headers.]

#include <windows.h>
#include <iostream>
using namespace std;

typedef BOOL (WINAPI* EnumDisplayDevices) (
LPCTSTR lpDevice, // device name
DWORD iDevNum, // display device
PDISPLAY_DEVICE lpDisplayDevice, // device information
DWORD dwFlags // reserved
);

BOOL GetDisplayMonitorInfo()
{
EnumDisplayDevices pEnumDisplayDevices;
HINSTANCE hInstUser32;
DISPLAY_DEVICE DispDev;
char szSaveDeviceName[32];
BOOL bRet = TRUE;
DWORD i;

hInstUser32 = LoadLibrary("User32.DLL");
if (!hInstUser32) return FALSE;

// Get the address of the EnumDisplayDevices function
pEnumDisplayDevices = (EnumDisplayDevices)GetProcAddress(hInstUser32,"EnumDisplayDevicesA");

ZeroMemory(&DispDev, sizeof(DISPLAY_DEVICE));
DispDev.cb = sizeof(DISPLAY_DEVICE);

for(i=0;pEnumDisplayDevices(NULL/*szSaveDeviceName*/, i, &DispDev, 0);i++)
{
cout<
QuestionEmbedded Chart Missing X-Axis Scale Pin
Jenleonard22-May-06 15:38
Jenleonard22-May-06 15:38 
QuestionC++ vs C# Performance Pin
Ed K22-May-06 14:37
Ed K22-May-06 14:37 
AnswerRe: C++ vs C# Performance [modified] Pin
Nibu babu thomas22-May-06 17:14
Nibu babu thomas22-May-06 17:14 
AnswerRe: C++ vs C# Performance Pin
bob1697222-May-06 17:15
bob1697222-May-06 17:15 
GeneralRe: C++ vs C# Performance Pin
Ed K23-May-06 14:06
Ed K23-May-06 14:06 
AnswerRe: C++ vs C# Performance Pin
Ryan Binns22-May-06 18:32
Ryan Binns22-May-06 18:32 
GeneralRe: C++ vs C# Performance Pin
Ed K23-May-06 14:09
Ed K23-May-06 14:09 
QuestionProcessShellCommand and DDE [modified] Pin
tbrake22-May-06 13:07
tbrake22-May-06 13:07 
AnswerRe: ProcessShellCommand and DDE [modified] Pin
Ryan Binns22-May-06 18:33
Ryan Binns22-May-06 18:33 
QuestionApplication Crash Pin
jduff22-May-06 11:36
jduff22-May-06 11:36 
AnswerRe: Application Crash [modified] Pin
Stephen Hewitt22-May-06 13:58
Stephen Hewitt22-May-06 13:58 
AnswerRe: Application Crash Pin
Stephen Hewitt24-May-06 21:28
Stephen Hewitt24-May-06 21:28 
QuestionDll load problem Pin
swatgodjr22-May-06 11:25
swatgodjr22-May-06 11:25 
AnswerRe: Dll load problem Pin
Laxman Auti22-May-06 18:56
Laxman Auti22-May-06 18:56 
GeneralRe: Dll load problem Pin
swatgodjr22-May-06 19:09
swatgodjr22-May-06 19:09 
GeneralRe: Dll load problem Pin
Laxman Auti22-May-06 19:19
Laxman Auti22-May-06 19:19 
GeneralRe: Dll load problem Pin
swatgodjr22-May-06 20:06
swatgodjr22-May-06 20:06 

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.