Click here to Skip to main content
15,889,034 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOpenGl and SDI Application Pin
godspeed12326-Sep-07 12:35
godspeed12326-Sep-07 12:35 
AnswerRe: OpenGl and SDI Application Pin
Cedric Moonen26-Sep-07 20:12
Cedric Moonen26-Sep-07 20:12 
GeneralRe: OpenGl and SDI Application Pin
godspeed12326-Sep-07 20:14
godspeed12326-Sep-07 20:14 
GeneralRe: OpenGl and SDI Application Pin
Cedric Moonen26-Sep-07 20:23
Cedric Moonen26-Sep-07 20:23 
AnswerRe: OpenGl and SDI Application Pin
Russell'26-Sep-07 22:49
Russell'26-Sep-07 22:49 
Questionhdc in shared mem Pin
Force Code26-Sep-07 11:54
Force Code26-Sep-07 11:54 
AnswerRe: hdc in shared mem Pin
Mark Salsbery26-Sep-07 13:47
Mark Salsbery26-Sep-07 13:47 
GeneralRe: hdc in shared mem [modified] Pin
Force Code26-Sep-07 14:11
Force Code26-Sep-07 14:11 
Mark Salsbery wrote:
An HDC is only valid within the context of the process that created it.
You can share the handle in a shared data segment but that won't make it
valid to another process.

What part(s) of the device context are you looking to share between processes?


Just an HBITMAP, not fonts, or pens, etc. If one process does a hdc = CreateCompatibleDC(...) and SelectObject(hdc,hbmp), I want any other process to be able to BitBlt to/from it.

This hdc is part of a C++ object I have defined in a shared memory segment of a DLL:

G g_list __attribute__((section ("shared"), shared));

So, every process that accesses that DLL is accessing the exact same g_list and g_list members. The class doesn't contain pointers, with the exception of this hdc which I didn't realize was a local pointer.
GeneralRe: hdc in shared mem Pin
Waldermort26-Sep-07 15:12
Waldermort26-Sep-07 15:12 
GeneralRe: hdc in shared mem Pin
Mark Salsbery26-Sep-07 17:02
Mark Salsbery26-Sep-07 17:02 
GeneralRe: hdc in shared mem Pin
Force Code26-Sep-07 17:23
Force Code26-Sep-07 17:23 
GeneralRe: hdc in shared mem Pin
Waldermort26-Sep-07 18:50
Waldermort26-Sep-07 18:50 
GeneralRe: hdc in shared mem Pin
Mark Salsbery27-Sep-07 5:09
Mark Salsbery27-Sep-07 5:09 
QuestionCStatic Image Painting problem Pin
shivrajbhosale26-Sep-07 7:14
shivrajbhosale26-Sep-07 7:14 
AnswerRe: CStatic Image Painting problem Pin
Mark Salsbery26-Sep-07 7:55
Mark Salsbery26-Sep-07 7:55 
GeneralRe: CStatic Image Painting problem Pin
shivrajbhosale27-Sep-07 7:27
shivrajbhosale27-Sep-07 7:27 
GeneralRe: CStatic Image Painting problem Pin
Mark Salsbery27-Sep-07 7:39
Mark Salsbery27-Sep-07 7:39 
AnswerRe: CStatic Image Painting problem Pin
Hamid_RT26-Sep-07 18:55
Hamid_RT26-Sep-07 18:55 
GeneralRe: CStatic Image Painting problem Pin
shivrajbhosale27-Sep-07 7:29
shivrajbhosale27-Sep-07 7:29 
AnswerRe: CStatic Image Painting problem Pin
zakkas248327-Sep-07 0:20
zakkas248327-Sep-07 0:20 
GeneralRe: CStatic Image Painting problem Pin
shivrajbhosale27-Sep-07 7:24
shivrajbhosale27-Sep-07 7:24 
GeneralRe: CStatic Image Painting problem Pin
Shog927-Sep-07 8:10
sitebuilderShog927-Sep-07 8:10 
QuestionTab Control -- dialog resource question Pin
Izk26-Sep-07 7:01
Izk26-Sep-07 7:01 
AnswerRe: Tab Control -- dialog resource question Pin
Maximilien26-Sep-07 7:13
Maximilien26-Sep-07 7:13 
GeneralRe: Tab Control -- dialog resource question Pin
Izk26-Sep-07 9:09
Izk26-Sep-07 9:09 

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.