Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery9-Oct-07 6:00
Mark Salsbery9-Oct-07 6:00 
GeneralRe: Need a best possible alternative?? [modified] Pin
Kiran Satish9-Oct-07 6:10
Kiran Satish9-Oct-07 6:10 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery9-Oct-07 8:01
Mark Salsbery9-Oct-07 8:01 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish9-Oct-07 10:49
Kiran Satish9-Oct-07 10:49 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery10-Oct-07 5:24
Mark Salsbery10-Oct-07 5:24 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish10-Oct-07 6:56
Kiran Satish10-Oct-07 6:56 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish11-Oct-07 5:14
Kiran Satish11-Oct-07 5:14 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery11-Oct-07 5:30
Mark Salsbery11-Oct-07 5:30 
Kiran Satish wrote:
Any suggestions D'Oh! | :doh: ??

Yes.  Get it working just drawing right on the dialog. 

I don't know that this control is (Disp = GetDlgItem(ID_PSF);)
that you're drawing to but it's adding unnecessary complexity.

The DIBSectionDC only needs to be created when you create the dibsection,
not every time you draw - we're trying to SAVE time here Smile | :)
Destroy it when you destroy the DIBSection - they go hand-in-hand.

But again, I recommend getting it working drawing right on the dialog.
That means your destination DC is the paintdc, that's fine as long as there's
no controls in the way.  That way, you can see what's going on.

Also, go through the code line by line and make sure you understand it.
The same principles apply as you were doing before with setpixel.
the only difference is now you draw to an offscreen DC and then blt the final drawing
to the screen.  You have a pointer to the offscreen bits so you can write pixel
values directly to memory and/or use gdi functions to draw offscreen (by
drawing to the DIBSectionDC)....that's the power.

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Need a best possible alternative?? Pin
Kiran Satish11-Oct-07 12:53
Kiran Satish11-Oct-07 12:53 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery11-Oct-07 13:06
Mark Salsbery11-Oct-07 13:06 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish11-Oct-07 13:31
Kiran Satish11-Oct-07 13:31 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery11-Oct-07 13:41
Mark Salsbery11-Oct-07 13:41 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish11-Oct-07 13:46
Kiran Satish11-Oct-07 13:46 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish17-Oct-07 11:09
Kiran Satish17-Oct-07 11:09 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery20-Oct-07 5:31
Mark Salsbery20-Oct-07 5:31 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery2-Oct-07 8:40
Mark Salsbery2-Oct-07 8:40 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery3-Oct-07 12:59
Mark Salsbery3-Oct-07 12:59 
AnswerRe: Need a best possible alternative?? Pin
Nelek27-Sep-07 21:19
protectorNelek27-Sep-07 21:19 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish1-Oct-07 10:46
Kiran Satish1-Oct-07 10:46 
GeneralRe: Need a best possible alternative?? Pin
Nelek2-Oct-07 10:19
protectorNelek2-Oct-07 10:19 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery9-Oct-07 6:04
Mark Salsbery9-Oct-07 6:04 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish18-Jun-08 17:55
Kiran Satish18-Jun-08 17:55 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery19-Jun-08 6:40
Mark Salsbery19-Jun-08 6:40 
QuestionCString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 6:41
Mike Borozdin27-Sep-07 6:41 
QuestionRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 7:20
David Crow27-Sep-07 7:20 

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.