Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Installling an XP Program in Vista Pin
ThatsAlok18-Jul-09 7:41
ThatsAlok18-Jul-09 7:41 
QuestionConverting static libraries to dynamic libraries. Pin
Ben Burnett17-Jul-09 7:35
Ben Burnett17-Jul-09 7:35 
AnswerRe: Converting static libraries to dynamic libraries. Pin
Stuart Dootson17-Jul-09 13:10
professionalStuart Dootson17-Jul-09 13:10 
GeneralRe: Converting static libraries to dynamic libraries. Pin
Rick York18-Jul-09 16:48
mveRick York18-Jul-09 16:48 
QuestionRedisplay image in new dimensions Pin
Darryl Bryk17-Jul-09 7:27
Darryl Bryk17-Jul-09 7:27 
AnswerRe: Redisplay image in new dimensions Pin
Rozis17-Jul-09 11:54
Rozis17-Jul-09 11:54 
GeneralRe: Redisplay image in new dimensions Pin
Darryl Bryk17-Jul-09 12:40
Darryl Bryk17-Jul-09 12:40 
GeneralRe: Redisplay image in new dimensions Pin
Rozis18-Jul-09 0:45
Rozis18-Jul-09 0:45 
I'll guess the next thing you do is changing the bits in the buffer P...

I'm not into C++ but with the following GDI-functions you maybe get the idea. I'll expect you have a handle to the source bitmap and a DC to the screen. Then use CreatecompatibleDC() to create an extra DC. Use CreatecompatibleBitmap() with the desired dimensions as the target bitmap. Now do everything you want with this bitmap and finally BitBlt() it back to the screen. Below a code snippet (not in C++, but i'll bet you can read it) that mirrors a area of the screen horizontally, to give you some idea:

hMemDC2:=CreateCompatibleDC(hdc)         // create a compatible DC
dh:=int(h/2)+1
hbitmap2:=CreatecompatibleBitmap(hmemdc,w,dh) // create bitmap
hold2:=SelectObject(hMemDC2,hBitmap2)         // select it in the DC
stretchblt(hmemDC2,0,0,w,dh,hDC,x,y+h,w,-(dh+1),SRCCOPY) // get upperhalf store in lowerhalf (mirrored)
bitblt(hDC,x,y-1,w,dh,hmemDC2,0,0,SRCCOPY)    // and put it back to the screen
DeleteObject(SelectObject(hMemDC2,hold2))     // cleanup
DeleteDC(hMemDC2)


Helps this?

Rozis
GeneralRe: Redisplay image in new dimensions Pin
Darryl Bryk20-Jul-09 12:41
Darryl Bryk20-Jul-09 12:41 
GeneralRe: Redisplay image in new dimensions Pin
Darryl Bryk24-Jul-09 13:07
Darryl Bryk24-Jul-09 13:07 
AnswerRe: Redisplay image in new dimensions Pin
Darryl Bryk24-Jul-09 13:41
Darryl Bryk24-Jul-09 13:41 
Question[Message Deleted] Pin
sam_psycho17-Jul-09 7:16
sam_psycho17-Jul-09 7:16 
QuestionRe: Execute C C++ programs in linux environment. Pin
David Crow17-Jul-09 7:19
David Crow17-Jul-09 7:19 
Questionconvert c to c++ Pin
Member 311244717-Jul-09 6:43
Member 311244717-Jul-09 6:43 
QuestionRe: convert c to c++ Pin
David Crow17-Jul-09 7:03
David Crow17-Jul-09 7:03 
AnswerRe: convert c to c++ Pin
Stuart Dootson17-Jul-09 13:07
professionalStuart Dootson17-Jul-09 13:07 
GeneralRe: convert c to c++ Pin
killabyte17-Jul-09 15:50
killabyte17-Jul-09 15:50 
GeneralRe: convert c to c++ Pin
lls020117-Jul-09 17:09
lls020117-Jul-09 17:09 
Questionchange the text box. Pin
Sanjeev.Kr.mit17-Jul-09 6:20
Sanjeev.Kr.mit17-Jul-09 6:20 
AnswerRe: change the text box. Pin
David Crow17-Jul-09 7:06
David Crow17-Jul-09 7:06 
AnswerRe: change the text box. Pin
carter200017-Jul-09 16:09
carter200017-Jul-09 16:09 
AnswerRe: change the text box. Pin
lls020117-Jul-09 17:59
lls020117-Jul-09 17:59 
QuestionWMI in windows service - Access Denied Pin
hackcrackvirus17-Jul-09 4:56
hackcrackvirus17-Jul-09 4:56 
AnswerRe: WMI in windows service - Access Denied Pin
Randor 17-Jul-09 9:21
professional Randor 17-Jul-09 9:21 
GeneralRe: WMI in windows service - Access Denied Pin
hackcrackvirus19-Jul-09 19:01
hackcrackvirus19-Jul-09 19:01 

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.