Click here to Skip to main content
15,911,139 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Writing a plugin system Pin
Joaquín M López Muñoz10-Apr-02 10:03
Joaquín M López Muñoz10-Apr-02 10:03 
GeneralRe: Writing a plugin system Pin
Zac Howland10-Apr-02 10:33
Zac Howland10-Apr-02 10:33 
GeneralRe: Writing a plugin system Pin
Joaquín M López Muñoz10-Apr-02 10:41
Joaquín M López Muñoz10-Apr-02 10:41 
GeneralRe: Writing a plugin system Pin
Zac Howland11-Apr-02 2:44
Zac Howland11-Apr-02 2:44 
GeneralRe: Writing a plugin system Pin
Chris Losinger10-Apr-02 10:08
professionalChris Losinger10-Apr-02 10:08 
QuestionDirectX 8.1 on CD-ROM? Pin
Jeremy Falcon10-Apr-02 9:02
professionalJeremy Falcon10-Apr-02 9:02 
QuestionHow to used "Multiple Display Monitors" and "virtual screen" Pin
hhxz_wind10-Apr-02 7:42
hhxz_wind10-Apr-02 7:42 
AnswerRe: How to used "Multiple Display Monitors" and "virtual screen" Pin
alex.barylski10-Apr-02 8:22
alex.barylski10-Apr-02 8:22 
I've never done it myself...but have read about it a few times and I think it's pretty simple.

GetSystemMetrics()


Using

SM_XVIRTUALSCREEN
SM_YVIRTUALSCREEN
SM_CXVIRTUALSCREEN
SM_CYVIRTUALSCREEN

SM_CMONITORS

Use the 5 following API functions:

EnumDisplayMonitors()
GetMonitorInfo()
MonitorFormPoint()
MonitorFromRect()
MonitorFromWindow()


Psuedo-code:

//globals
//Holds monitor top-left coordinates within vSpace???
int monView[9][2]; /* Window 98 allows 9 montors max */
int nMonitors = 0;  /* Number of current monitors */

BOOL CALLBACK MonInfo(HMONITOR hMon, HDC hdc, LPRECT rect, LPARAM extra){
  MONITORINFOEX mi;

  mi.cbSize = sizeof(MONITORINFOEX);
  GetMonitorInfo(hMon, &mi); 
  monView[nMonitors][0] = mi.rcMonitor.left;
  monView[nMonitors][1] = mi.rcMonitor.top;
  nMonitors++;

  return TRUE;
}

OnCreate(){
  m_pxTop    = GetSystemMetrics(SM_YVIRTUALSCREEN);
  m_pxLeft   = GetSystemMetrics(SM_XVIRTUALSCREEN);
  m_pxRight  = GetSystemMetrics(SM_CXVIRTUALSCREEN);
  m_pxBottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);

  //MonInfo is a callback function
  ::EnumDisplayMonitors(NULL, NULL, MonInfo, 0);
}


Obviously this is not a complete example of source, but will get you started. Read up on MSDN on the preceeding functions and you should figure it out from here.

Cheers! Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
QuestionMS to drop static linking from VC? Pin
Jim A. Johnson10-Apr-02 7:27
Jim A. Johnson10-Apr-02 7:27 
AnswerRe: MS to drop static linking from VC? Pin
Joaquín M López Muñoz10-Apr-02 9:31
Joaquín M López Muñoz10-Apr-02 9:31 
GeneralCalculating a text's dimension Pin
Hans Ruck10-Apr-02 7:21
Hans Ruck10-Apr-02 7:21 
GeneralRe: Calculating a text's dimension Pin
Ravi Bhavnani10-Apr-02 7:27
professionalRavi Bhavnani10-Apr-02 7:27 
GeneralRe: Calculating a text's dimension Pin
Chris Losinger10-Apr-02 7:35
professionalChris Losinger10-Apr-02 7:35 
GeneralRe: Calculating a text's dimension Pin
Hans Ruck10-Apr-02 7:51
Hans Ruck10-Apr-02 7:51 
GeneralRe: Calculating a text's dimension Pin
Stan Shannon10-Apr-02 7:54
Stan Shannon10-Apr-02 7:54 
GeneralMFC App and C2065 Pin
10-Apr-02 6:13
suss10-Apr-02 6:13 
GeneralRe: MFC App and C2065 Pin
Jeremy Falcon10-Apr-02 7:45
professionalJeremy Falcon10-Apr-02 7:45 
GeneralRe: MFC App and C2065 Pin
10-Apr-02 8:17
suss10-Apr-02 8:17 
GeneralRe: MFC App and C2065 Pin
Jeremy Falcon10-Apr-02 8:22
professionalJeremy Falcon10-Apr-02 8:22 
GeneralRe: MFC App and C2065 Pin
10-Apr-02 8:29
suss10-Apr-02 8:29 
GeneralRe: MFC App and C2065 Pin
Jeremy Falcon10-Apr-02 8:47
professionalJeremy Falcon10-Apr-02 8:47 
GeneralRe: MFC App and C2065 Pin
10-Apr-02 9:53
suss10-Apr-02 9:53 
GeneralRe: MFC App and C2065 Pin
Jeremy Falcon10-Apr-02 10:06
professionalJeremy Falcon10-Apr-02 10:06 
GeneralRe: MFC App and C2065 Pin
Jeremy Falcon10-Apr-02 13:44
professionalJeremy Falcon10-Apr-02 13:44 
GeneralRe: MFC App and C2065 Pin
10-Apr-02 14:39
suss10-Apr-02 14:39 

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.