Click here to Skip to main content
15,917,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32 service problem. Please help Pin
pankajdaga13-Nov-03 23:48
pankajdaga13-Nov-03 23:48 
QuestionXML reply from router? Pin
Kuniva13-Nov-03 9:17
Kuniva13-Nov-03 9:17 
GeneralFlatScrollBar Pin
Tzunga Ma13-Nov-03 9:08
sussTzunga Ma13-Nov-03 9:08 
GeneralOutput file Pin
Anonymous13-Nov-03 8:13
Anonymous13-Nov-03 8:13 
GeneralRe: Output file Pin
David Crow13-Nov-03 9:00
David Crow13-Nov-03 9:00 
GeneralRe: Output file Pin
Anonymous13-Nov-03 9:05
Anonymous13-Nov-03 9:05 
GeneralRe: Output file Pin
David Crow13-Nov-03 9:10
David Crow13-Nov-03 9:10 
GeneralStretchDIBits problem with 16-bit (65536) color Pin
tchu13-Nov-03 7:31
tchu13-Nov-03 7:31 
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

81386745
GeneralFloat Roading. Pin
Mike Doner13-Nov-03 7:08
Mike Doner13-Nov-03 7:08 
GeneralRe: Float Roading. Pin
JWood13-Nov-03 8:42
JWood13-Nov-03 8:42 
GeneralMerge sort Pin
Azury13-Nov-03 6:53
Azury13-Nov-03 6:53 
GeneralRe: Merge sort Pin
Dhakad13-Nov-03 20:16
Dhakad13-Nov-03 20:16 
Generalshow fields from a table on a Listbox Control using MFC VC++ Pin
swerajan13-Nov-03 5:32
swerajan13-Nov-03 5:32 
GeneralRe: show fields from a table on a Listbox Control using MFC VC++ Pin
David Crow13-Nov-03 9:04
David Crow13-Nov-03 9:04 
GeneralRe: show fields from a table on a Listbox Control using MFC VC++ Pin
valikac13-Nov-03 9:07
valikac13-Nov-03 9:07 
GeneralRe: show fields from a table on a Listbox Control using MFC VC++ Pin
David Crow13-Nov-03 9:12
David Crow13-Nov-03 9:12 
GeneralLPCOLESTR Pin
act_x13-Nov-03 5:24
act_x13-Nov-03 5:24 
GeneralRe: LPCOLESTR Pin
Michael Dunn13-Nov-03 8:08
sitebuilderMichael Dunn13-Nov-03 8:08 
Generalthread exit with code 13 Pin
avallet13-Nov-03 4:30
avallet13-Nov-03 4:30 
GeneralRe: thread exit with code 13 Pin
Michael Dunn13-Nov-03 8:09
sitebuilderMichael Dunn13-Nov-03 8:09 
GeneralWM_CTRLCOLOR Pin
Alton Williams13-Nov-03 3:51
Alton Williams13-Nov-03 3:51 
GeneralRe: WM_CTRLCOLOR Pin
Steve S13-Nov-03 4:29
Steve S13-Nov-03 4:29 
Generalpositioning problem Pin
ns13-Nov-03 3:45
ns13-Nov-03 3:45 
GeneralRe: positioning problem Pin
Ravi Bhavnani13-Nov-03 5:23
professionalRavi Bhavnani13-Nov-03 5:23 
AnswerRe: How can I Enable Drag&amp;Drop of IE URL's in my prog Pin
Mike Dimmick13-Nov-03 3:34
Mike Dimmick13-Nov-03 3:34 

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.