From: Joseph M. Newcomer on 5 Nov 2009 11:28 The problem now is clear: you are experiencing the problem I told you that you would experience. First, the program that was running is *always* running; what you probably meant to say was "the program that was running still displays". And that is correct behavior, given the bad code you have. You simply cannot get the display DC, write pixels on it, and expect to get just those pixels displayed; in fact, only under the most bizarre conditions would that ever give a pretense of working. What you have to do is create a window, make that window be the currently active window, and in the OnPaint handler of that window draw your JPEG. The system is working as documented and expected; you just tried to do something that is guaranteed to work in the way you just described, so the fact that it works that way should be no surprise. joe On Thu, 5 Nov 2009 07:13:25 -0800 (PST), Aegis Delacour <eloquent1(a)gmail.com> wrote: >Ok i think i was not very clear. >Here is what i need. >The entire program is very long, when a physical button is pressed..it >will go to the function screeny(); >when it does that, it will load and display an image(Jpg) on full >screen...there is no need to stretch it out or anything as the image >WILL be >in the exact resolution of the monitor. > >currently with that code, it just doesnt work..the program that was >running before i pessed the button is still running. > >im really not sure why im finding it this hard to just display a >jpg..surely theres an easy way as this seems quite basic? Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Giovanni Dicanio on 5 Nov 2009 12:00 "Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio news:53v5f5dbei84app758ccj8oh6asgtk5gu1(a)4ax.com... > What you have to do is create a window, make that window be the currently > active window, > and in the OnPaint handler of that window draw your JPEG. To add to Joe's insights, when I had to display something in fullscreen, I used DirectDraw component from DirectX, and in particular two methods of this interface were useful for that purpose: - IDirectDraw::SetCooperativeLevel with DDSCL_FULLSCREEN flag, to set fullscreen mode; - IDirectDraw::SetDisplayMode, to set the fullscreen resolution. Giovanni
From: Joseph M. Newcomer on 5 Nov 2009 12:55 And what about multiple monitors... I have been guilty of multiple-monitor avoidance in the past, and these days, I have to be really conscious of it. Multiple-monitor cards are now dirt cheap and readily available. joe On Thu, 5 Nov 2009 18:00:50 +0100, "Giovanni Dicanio" <giovanniDOTdicanio(a)REMOVEMEgmail.com> wrote: > >"Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio >news:53v5f5dbei84app758ccj8oh6asgtk5gu1(a)4ax.com... > >> What you have to do is create a window, make that window be the currently >> active window, >> and in the OnPaint handler of that window draw your JPEG. > >To add to Joe's insights, when I had to display something in fullscreen, I >used DirectDraw component from DirectX, and in particular two methods of >this interface were useful for that purpose: > >- IDirectDraw::SetCooperativeLevel with DDSCL_FULLSCREEN flag, to set >fullscreen mode; >- IDirectDraw::SetDisplayMode, to set the fullscreen resolution. > >Giovanni > Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Giovanni Dicanio on 5 Nov 2009 13:10 "Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio news:9b46f5li7r6akrss6n64182vv8ig7th67g(a)4ax.com... > And what about multiple monitors... I'm not sure, but IIRC DirectDraw has some function like DirectDrawEnumerate(Ex) that allows you to enumerate available graphics devices and monitors. Giovanni
From: Joseph M. Newcomer on 5 Nov 2009 16:18 Yes, but you have to use it. I've found that multi-monitor awareness is no longer optional. joe On Thu, 5 Nov 2009 19:10:12 +0100, "Giovanni Dicanio" <giovanniDOTdicanio(a)REMOVEMEgmail.com> wrote: > >"Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio >news:9b46f5li7r6akrss6n64182vv8ig7th67g(a)4ax.com... >> And what about multiple monitors... > >I'm not sure, but IIRC DirectDraw has some function like >DirectDrawEnumerate(Ex) that allows you to enumerate available graphics >devices and monitors. > >Giovanni > Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Bitmap printing upside down Next: Disable an item in CMFCPopupMenu |