Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: FAQ for an interview in Multithreading/C++ Pin
AryaSoft23-May-06 7:46
AryaSoft23-May-06 7:46 
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 
I have just copy and paste the above code from MSDN
any way this time I changed it in my way and comiled it. Hope it will work.
<br />
<br />
typedef BOOL (WINAPI* EnumDisplayDevices) (<br />
											LPCTSTR lpDevice,                // device name<br />
											DWORD iDevNum,                   // display device<br />
											PDISPLAY_DEVICE lpDisplayDevice, // device information<br />
											DWORD dwFlags                    // reserved<br />
											);<br />
<br />
BOOL GetDisplayMonitorInfo(int nDeviceIndex, LPSTR lpszMonitorInfo)<br />
{<br />
	EnumDisplayDevices  pEnumDisplayDevices;<br />
	HINSTANCE hInstUser32;<br />
	DISPLAY_DEVICE DispDev;<br />
	char szSaveDeviceName[32];<br />
	BOOL bRet = TRUE;<br />
	<br />
	hInstUser32 = LoadLibrary("User32.DLL");<br />
	if (!hInstUser32) return FALSE;<br />
	<br />
	// Get the address of the EnumDisplayDevices function<br />
	pEnumDisplayDevices = (EnumDisplayDevices)GetProcAddress(hInstUser32,"EnumDisplayDevicesA");<br />
	<br />
	ZeroMemory(&DispDev, sizeof(DISPLAY_DEVICE));<br />
	DispDev.cb = sizeof(DISPLAY_DEVICE);<br />
	<br />
	pEnumDisplayDevices(szSaveDeviceName, 0, &DispDev, 0);<br />
	<br />
	FreeLibrary(hInstUser32);<br />
	<br />
	return bRet;<br />
}<br />
<br />
<br />
void main()<br />
{<br />
}<br />
<br />


Regards
Anil

-- modified at 21:05 Tuesday 23rd May, 2006
AnswerRe: EnumDisplayDevices [modified] Pin
zaro33324-May-06 4:14
zaro33324-May-06 4:14 
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 

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.