Re: Bitmap restore
- From: Charlie <cgilley@xxxxxxxxxxx>
- Date: Tue, 15 Sep 2009 03:46:38 -0700 (PDT)
On Sep 14, 8:46 am, Satya <Sa...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"Charlie" wrote:
On Sep 13, 2:11 pm, Satya <Sa...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"Charlie" wrote:
On Sep 12, 3:33 pm, Satya <Sa...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi all, I want to display a image on LCD for a few seconds. So i am using
GetDC(), CreateCompatibleDC(), SelectObject(), BitBlt() etc to display the
image.
I want to restore the previous screen but unable to do that. Can any one
tell how to do that....
Thanks in advance...
Satya,
You don't provide much context for what you are doing. When you say
"previous screen" do you mean the current application's screen?
The main display? Sounds like you are using mfc or pure win32.
Grabbing an image of the current screen BEFORE you display your bitmap
should work, I would think. But we need more context.
Hi charlie,
Thanks for your reply & Sorry for insufficient information. The scenario is
like ....
My device is having LCD screen, on which .net based GUI is running for
perform the different operations. For user it will have keys to navigate from
one screen to other.
Now one operation is LCD test. In this test, user will have to press
predefined keys & device shall display predefined screens.
Till now every thing is ok. But at the end of the LCD test , device should
go back to the LCD test screen from where the LCD test has started. So that
device can do other operations.
My problem is i am not able to remove the displayed screen & go back to the
screen from where LCD test started.
Now i think, the whole scenario is clear & u can tell some solution.- Hide quoted text -
- Show quoted text -
Satya,
This sounds like a simple application issue. When the LCD test is
invoked, how do you display this test screen?
Are you invoking a platform utility or did you write the LCD test code
yourself?
cg
Ya u can say its a GUI application issue. I have written my own code to
display
patterns on the LCD. My code is
hDC = GetDC (NULL);
hdcMemory = CreateCompatibleDC( hDC );
hBmp = SHLoadDIBitmap(L"Some Defined Location");
SelectObject( hdcMemory, hBmp );
GetObject( hBmp, sizeof(BITMAP), &bmp );
BitBlt(hDC, 0, 0,bmp.bmWidth, bmp.bmHeight,hdcMemory,0, 0, SRCCOPY );
return 0;
Using the above code, i am able to display the image (stored at a defined
location) on the LCD screen.
LCD test shall be invoked from GUI application. In this test , defined image
should be displayed for fixed duration. After completion of test, it should
remove the displayed image & the control should return to GUI application for
further use.
But in my case, after displaying the image on the LCD i am not able to go
back to the GUI application.- Hide quoted text -
- Show quoted text -
Okay, I know I'm sounding dense, but have patience. That's just a
code snippet, right?
If I had an application that contained the LCD test, I would create a
frameless dialog,
display the dialog, and do the drawing (what you do above) in the
OnPaint handler.
I'm speaking mfc, but Win32 does the same thing.
When I leave the dialog, the existing application AND any other
applications are responsible
to redraw themselves.
Is there something special about your application or device you've not
mentioned?
cg
.
- References:
- Bitmap restore
- From: Satya
- Re: Bitmap restore
- From: Charlie
- Re: Bitmap restore
- From: Satya
- Re: Bitmap restore
- From: Charlie
- Re: Bitmap restore
- From: Satya
- Bitmap restore
- Prev by Date: Re: CE 6.0 Gprs connection with Cell Core
- Next by Date: Re: WinCE 5.0: BattdrvrTest giving build errors.
- Previous by thread: Re: Bitmap restore
- Next by thread: Re: Bitmap restore
- Index(es):
Relevant Pages
|