Click here to Skip to main content
15,898,993 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: need help getting jxta-c confgui to work Pin
jhwurmbach10-Oct-07 5:44
jhwurmbach10-Oct-07 5:44 
GeneralRe: need help getting jxta-c confgui to work Pin
pds847510-Oct-07 6:42
pds847510-Oct-07 6:42 
AnswerRe: need help getting jxta-c confgui to work [modified] Pin
David Crow10-Oct-07 3:23
David Crow10-Oct-07 3:23 
GeneralRe: need help getting jxta-c confgui to work Pin
pds847510-Oct-07 3:37
pds847510-Oct-07 3:37 
GeneralRe: need help getting jxta-c confgui to work Pin
David Crow10-Oct-07 3:55
David Crow10-Oct-07 3:55 
GeneralRe: need help getting jxta-c confgui to work Pin
pds847510-Oct-07 4:01
pds847510-Oct-07 4:01 
AnswerRe: need help getting jxta-c confgui to work Pin
David Crow10-Oct-07 3:58
David Crow10-Oct-07 3:58 
GeneralRe: need help getting jxta-c confgui to work Pin
pds847510-Oct-07 4:14
pds847510-Oct-07 4:14 
QuestionRe: need help getting jxta-c confgui to work Pin
David Crow10-Oct-07 4:17
David Crow10-Oct-07 4:17 
AnswerRe: need help getting jxta-c confgui to work Pin
pds847510-Oct-07 4:41
pds847510-Oct-07 4:41 
QuestionWindow Split Problem [modified] Pin
Shivarudrayya H10-Oct-07 1:11
Shivarudrayya H10-Oct-07 1:11 
AnswerRe: Window Split Problem Pin
Nishad S10-Oct-07 2:43
Nishad S10-Oct-07 2:43 
QuestionRe: Window Split Problem Pin
Shivarudrayya H10-Oct-07 2:57
Shivarudrayya H10-Oct-07 2:57 
AnswerRe: Window Split Problem Pin
Nishad S10-Oct-07 3:34
Nishad S10-Oct-07 3:34 
QuestionConverting to c++ local variable Pin
Exelioindia10-Oct-07 0:50
Exelioindia10-Oct-07 0:50 
AnswerRe: Converting to c++ local variable Pin
Matthew Faithfull10-Oct-07 0:55
Matthew Faithfull10-Oct-07 0:55 
GeneralRe: Converting to c++ local variable Pin
Exelioindia10-Oct-07 1:54
Exelioindia10-Oct-07 1:54 
GeneralRe: Converting to c++ local variable Pin
Matthew Faithfull10-Oct-07 1:58
Matthew Faithfull10-Oct-07 1:58 
AnswerRe: Converting to c++ local variable Pin
David Crow10-Oct-07 3:26
David Crow10-Oct-07 3:26 
AnswerRe: Converting to c++ local variable Pin
toxcct10-Oct-07 3:47
toxcct10-Oct-07 3:47 
QuestionTrackbar/Sliderbar problem Pin
scody10-Oct-07 0:46
scody10-Oct-07 0:46 
AnswerRe: Trackbar/Sliderbar problem Pin
Nishad S10-Oct-07 2:54
Nishad S10-Oct-07 2:54 
Questionhow to make bitmap display independent of Device Display Setting Pin
Sharath Jagannath9-Oct-07 23:55
Sharath Jagannath9-Oct-07 23:55 
I deal with grayscale images which i convert to 32bit bitmaps to display...
I use CreateCompatibleBitmap () to create bitmap and bitblt () to display bitmap. But if i change the system display settings to other than 32 bit colors i get distorted images displayed

I use following code:

int k = 0;
for (int i = 0; i < bm_info.bmWidth * bm_info.bmHeight; i++)
{
tbmp [k++] = bmp[i];
tbmp [k++] = bmp[i];
tbmp [k++] = bmp[i];
tbmp [k++] = 0;
}

CDC pMemDC, *pDC;
CBitmap *pBitmap = new CBitmap;
BOOL res;

pDC = GetDC();
res = pBitmap->CreateCompatibleBitmap (pDC,bm_info.bmWidth,bm_info.bmHeight);
if (res > 0)
{
pBitmap->SetBitmapBits ( bm_info.bmWidth * bm_info.bmHeight*4,
(unsigned char *)tbmp );
pMemDC.CreateCompatibleDC ( pDC );
pMemDC.SelectObject ( pBitmap );
pDC->BitBlt ( 300 ,15 , bm_info.bmWidth,bm_info.bmHeight ,
&pMemDC ,0,0 ,SRCCOPY );
}

all help appreciated... ( sample code is more appreciated Wink | ;) )

Sharath
AnswerRe: how to make bitmap display independent of Device Display Setting Pin
Nelek10-Oct-07 1:04
protectorNelek10-Oct-07 1:04 
AnswerRe: how to make bitmap display independent of Device Display Setting Pin
Mark Salsbery10-Oct-07 5:54
Mark Salsbery10-Oct-07 5:54 

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.