Click here to Skip to main content
16,012,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalerror LNK2005 Pin
Ares218-Nov-03 6:39
Ares218-Nov-03 6:39 
GeneralRe: error LNK2005 Pin
David Crow18-Nov-03 6:51
David Crow18-Nov-03 6:51 
GeneralRe: error LNK2005 Pin
Ares218-Nov-03 6:57
Ares218-Nov-03 6:57 
GeneralRe: error LNK2005 Pin
David Crow18-Nov-03 6:59
David Crow18-Nov-03 6:59 
GeneralRe: error LNK2005 Pin
Ares218-Nov-03 7:24
Ares218-Nov-03 7:24 
GeneralRe: error LNK2005 Pin
Ares218-Nov-03 7:36
Ares218-Nov-03 7:36 
GeneralRe: error LNK2005 Pin
David Crow18-Nov-03 7:42
David Crow18-Nov-03 7:42 
GeneralStretchDIBits problem with 16-bit (65536) colours Pin
tchu18-Nov-03 5:40
tchu18-Nov-03 5:40 
StretchDIBits problem with 16-bit (65536) colours

hello all,

my name is durval and i've the following problem in my project:
when the color-palette from the windows-desktop (properties)
16-bit (65536) is set. on ms-c++ print-preview (mfc) the
::StretchBlt(...)/::StretchDIBits(...)/::::BitBlt(...)
doesn't work properly. the bitmap is dividing in 2 parts, the
right (1/3 from the bitmap) will be put on the left place and
the left is displaced to the right.
at all the other color-settings there's no problem: 8-bit, 24-bit...

do you know this problem?
please, if everybody could help me, it would be very nice.

thanx a lot,
durval.
Frown | :(


the code:

BOOL CDib::Draw(CDC* pDC, CPoint origin, CSize size)
{
if(m_lpBMIH == NULL) return FALSE;
if(m_hPalette != NULL)
::SelectPalette(pDC->GetSafeHdc(), m_hPalette, TRUE);
pDC->SetStretchBltMode(COLORONCOLOR);

// ::BitBlt( pDC->GetSafeHdc(), origin.x, origin.y, m_lpBMIH->biWidth, m_lpBMIH->biHeight, memDC.m_hDC, 0, 0, SRCCOPY );

// ::StretchBlt( pDC->GetSafeHdc(), origin.x, origin.y, size.cx, size.cy, memDC.m_hDC, 0, 0, m_lpBMIH->biWidth, m_lpBMIH->biHeight , SRCCOPY );

::StretchDIBits(pDC->GetSafeHdc(), origin.x, origin.y, size.cx, size.cy,
0, 0, m_lpBMIH->biWidth, m_lpBMIH->biHeight,
m_lpImage, (LPBITMAPINFO) m_lpBMIH, DIB_RGB_COLORS, SRCCOPY);
return TRUE;
}

-------------------------------------------------------------------

system:

Microsoft (R) Windows NT (TM) Workstation
Version 4.0 (Build 1381: Service Pack 6) x86 Uniprocessor Free

-------------------------------------------------------------------

graphic:

BIOS-Datum: 11/17/20
BIOS-Version: Video memory: 1 MB Device Revision: 2.0
Hardware Version 0.0
Adapter:
Setting: 1280 x 1024 x 65536 75 Hz
Typ: i81xnt4-kompatible Grafikkarte
Description: Intel815 Video Accelerator
Memory: 4 MB
Chip-Typ: Intel815
DAC-Typ: Internal
Driver:
Company: <n a="">
Datei(en): i81xnt4.sys, i81xdnt4.dll
Version: <n a="">, 4.0.32
GeneralCPU usage meter in win98 Pin
Max Rudensky18-Nov-03 5:30
sussMax Rudensky18-Nov-03 5:30 
GeneralRe: CPU usage meter in win98 Pin
alex.barylski18-Nov-03 5:45
alex.barylski18-Nov-03 5:45 
GeneralRe: CPU usage meter in win98 Pin
Max Rudensky19-Nov-03 0:12
sussMax Rudensky19-Nov-03 0:12 
QuestionHow to control many events? Pin
Azury18-Nov-03 5:28
Azury18-Nov-03 5:28 
AnswerRe: How to control many events? Pin
David Crow18-Nov-03 5:47
David Crow18-Nov-03 5:47 
GeneralActiveX with modeless Dialog Pin
AnTri18-Nov-03 5:12
AnTri18-Nov-03 5:12 
GeneralRe: ActiveX with modeless Dialog Pin
Peter Molnar18-Nov-03 13:45
Peter Molnar18-Nov-03 13:45 
GeneralRe: ActiveX with modeless Dialog Pin
AnTri18-Nov-03 23:05
AnTri18-Nov-03 23:05 
GeneralRe: ActiveX with modeless Dialog Pin
Peter Molnar19-Nov-03 4:26
Peter Molnar19-Nov-03 4:26 
Generalemail + attachement Pin
doctorpi18-Nov-03 4:47
doctorpi18-Nov-03 4:47 
GeneralRe: email + attachement Pin
David Crow18-Nov-03 5:51
David Crow18-Nov-03 5:51 
GeneralRe: email + attachement Pin
Peter Molnar18-Nov-03 14:05
Peter Molnar18-Nov-03 14:05 
GeneralRe: deleting pointers and STL. Pin
berndg18-Nov-03 4:10
berndg18-Nov-03 4:10 
GeneralRe: deleting pointers and STL. Pin
TFrancis18-Nov-03 4:11
TFrancis18-Nov-03 4:11 
GeneralThanks! to both!!! Pin
ns18-Nov-03 4:20
ns18-Nov-03 4:20 
GeneralError in Release !!! Pin
SD318-Nov-03 3:15
SD318-Nov-03 3:15 
GeneralRe: Error in Release !!! Pin
valikac18-Nov-03 5:58
valikac18-Nov-03 5:58 

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.