Click here to Skip to main content
15,920,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Quick Question... Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:57
Iain Clarke, Warrior Programmer6-Oct-04 4:57 
GeneralRe: Quick Question... Pin
Graham Bradshaw6-Oct-04 5:41
Graham Bradshaw6-Oct-04 5:41 
GeneralProblem with Menu and Submenu / Entries Pin
P-Rex6-Oct-04 2:50
P-Rex6-Oct-04 2:50 
GeneralRe: Problem with Menu and Submenu / Entries Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:21
Iain Clarke, Warrior Programmer6-Oct-04 4:21 
GeneralOwner drawn popup menu and its border Pin
tabor256-Oct-04 2:29
tabor256-Oct-04 2:29 
GeneralRe: Owner drawn popup menu and its border Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:25
Iain Clarke, Warrior Programmer6-Oct-04 4:25 
GeneralRe: Owner drawn popup menu and its border Pin
tabor256-Oct-04 5:03
tabor256-Oct-04 5:03 
GeneralSelecting a bitmap into two mem DC's at the same time Pin
Garth Watkins6-Oct-04 2:22
Garth Watkins6-Oct-04 2:22 
Here's the problem:

I have a memory DC that I create and keep around for the duration of the app. The mapping mode for this DC is setup once, and then never again. However there are times during the life of the app that I need to work in the default mapping mode (MM_TEXT). Instead of saving the context of the DC, setting up the default mapping mode and then restoring the DC to it's previous state, I thought it would be great if I could have two DC's that refer to the same 'surface' but that have different mapping modes. I know this is possible with a DC that references an actual output device such as the screen, but seems to be impossible with a memory DC. A second option I thought of would be to create a bitmap and select it into both DC's, then all drawing operations on any of the two DC's would go to the same bitmap/surface. Alas, the docs say a bitmap can only be selected into a single mem DC at any one time.

A third option I am considering, but haven't tried yet, nor do I know if it will work, is to create two DIB sections, one for each DC, with a common file mapping object and select the two bitmaps into their DC's respectively.

Any ideas on solving this problem would be greatly appreciated.




Generalexe file not run properly Pin
nirmit6-Oct-04 2:08
nirmit6-Oct-04 2:08 
GeneralRe: exe file not run properly Pin
ThatsAlok6-Oct-04 2:44
ThatsAlok6-Oct-04 2:44 
GeneralRe: exe file not run properly Pin
David Crow6-Oct-04 3:58
David Crow6-Oct-04 3:58 
GeneralPop-up Menu Pin
Rage6-Oct-04 2:03
professionalRage6-Oct-04 2:03 
GeneralRe: Pop-up Menu Pin
Garth Watkins6-Oct-04 2:51
Garth Watkins6-Oct-04 2:51 
GeneralRe: Pop-up Menu Pin
Rage6-Oct-04 3:59
professionalRage6-Oct-04 3:59 
GeneralRe: Pop-up Menu Pin
Iain Clarke, Warrior Programmer6-Oct-04 4:54
Iain Clarke, Warrior Programmer6-Oct-04 4:54 
GeneralRe: Pop-up Menu Pin
Rage6-Oct-04 21:07
professionalRage6-Oct-04 21:07 
GeneralProble with OnTimer() Pin
Leyu6-Oct-04 1:36
Leyu6-Oct-04 1:36 
GeneralRe: Proble with OnTimer() Pin
toxcct6-Oct-04 1:57
toxcct6-Oct-04 1:57 
GeneralRe: Proble with OnTimer() Pin
Nathan Holt at EMOM6-Oct-04 5:28
Nathan Holt at EMOM6-Oct-04 5:28 
GeneralRe: Proble with OnTimer() Pin
toxcct6-Oct-04 6:35
toxcct6-Oct-04 6:35 
GeneralRe: Proble with OnTimer() Pin
Nathan Holt at EMOM6-Oct-04 7:02
Nathan Holt at EMOM6-Oct-04 7:02 
GeneralRe: Proble with OnTimer() Pin
Iain Clarke, Warrior Programmer6-Oct-04 5:32
Iain Clarke, Warrior Programmer6-Oct-04 5:32 
GeneralRe: Proble with OnTimer() Pin
LittleYellowBird6-Oct-04 5:36
LittleYellowBird6-Oct-04 5:36 
GeneralRe: Proble with OnTimer() Pin
Leyu6-Oct-04 8:01
Leyu6-Oct-04 8:01 
GeneralRe: Proble with OnTimer() Pin
BlackDice6-Oct-04 10:59
BlackDice6-Oct-04 10:59 

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.