Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to add a custom search handler in Start Menu->Search Pin
PravinSingh16-Feb-04 2:34
PravinSingh16-Feb-04 2:34 
AnswerRe: How to add a custom search handler in Start Menu->Search Pin
Sebastian Schneider16-Feb-04 22:07
Sebastian Schneider16-Feb-04 22:07 
GeneralPrintDC to CDC Pin
Yusak16-Feb-04 2:02
Yusak16-Feb-04 2:02 
QuestionHow to get value of STL <vector> by iterator? Pin
vgrigor16-Feb-04 1:51
vgrigor16-Feb-04 1:51 
AnswerRe: How to get value of STL <vector> by iterator? Pin
Mike Dimmick16-Feb-04 2:39
Mike Dimmick16-Feb-04 2:39 
GeneralRe: How to get value of STL <vector> by iterator? Pin
vgrigor16-Feb-04 2:50
vgrigor16-Feb-04 2:50 
GeneralExcel protection question Pin
Tzoockee16-Feb-04 0:51
Tzoockee16-Feb-04 0:51 
Generalcreatting a transparent text GIF using CXImage Pin
emmatty16-Feb-04 0:43
emmatty16-Feb-04 0:43 
hello friends,

We are doing a project in vc++ for image processing .We used your class(CXImage) in our project for converting user typed text into transparent GIF image. We used the following steps for our requirement.

Note: Operating System : Win XP Professional ,
Development Tool : VC++ 6.0.

1)Create a memoryDC

2)Created a compatible bitmap with the dialog

3)selected the bitmap into MemoryDC

4)Draw Text on that DC

5) Created a CXImage object and passed Bitmap handle to CXImage member function called CreateFromHBITMAP

6) We used the function Save() to save that image.

But the problem ia that we can insert the Image to Frontpage but the image is not visible.
Following code is extracted from our project
void CTestCXImageDlg::OnCreateBMP()
{
CDC memDC;
CBitmap bitmap;
CBrush brush(RGB(255,255,255));
CFont font;
UpdateData();

font.CreateFontIndirect(&logfont);

if(memDC.CreateCompatibleDC(GetDC()))
{
if(bitmap.CreateCompatibleBitmap(GetDC(),200,50))
{
memDC.SelectObject(bitmap);

memDC.SetBkColor(RGB(255,255,255));
memDC.FillRect(CRect(0,0,200,50),&brush);
CRect rect(60,15,200,50);
SetTextColor(memDC.m_hDC,RGB(0,255,0));

memDC.SelectObject(&font);

memDC.DrawText(m_Text,&rect,DT_END_ELLIPSIS | DT_CENTER );

CxImage img1;
img1.CreateFromHBITMAP((HBITMAP)bitmap.m_hObject);

img1.Save("c:\\imgtest.gif",1);
.
.
.
.

eagerly waiting for your response

QuestionHow to detect the different regions of two images Pin
Arcrest16-Feb-04 0:29
Arcrest16-Feb-04 0:29 
GeneralWeb Browser control Pin
TrungHuynh16-Feb-04 0:09
TrungHuynh16-Feb-04 0:09 
QuestionSame hotkey for different dialogs in the same MFC program ?? Pin
bjolletts16-Feb-04 0:08
bjolletts16-Feb-04 0:08 
AnswerRe: Same hotkey for different dialogs in the same MFC program ?? Pin
David Crow16-Feb-04 2:27
David Crow16-Feb-04 2:27 
GeneralRe: Same hotkey for different dialogs in the same MFC program ?? Pin
bjolletts16-Feb-04 3:15
bjolletts16-Feb-04 3:15 
GeneralRe: Same hotkey for different dialogs in the same MFC program ?? Pin
David Crow16-Feb-04 4:27
David Crow16-Feb-04 4:27 
GeneralRe: Same hotkey for different dialogs in the same MFC program ?? Pin
Maximilien16-Feb-04 8:16
Maximilien16-Feb-04 8:16 
Generallinck Pin
Anonymous15-Feb-04 23:49
Anonymous15-Feb-04 23:49 
GeneralRe: linck Pin
David Crow16-Feb-04 2:28
David Crow16-Feb-04 2:28 
GeneralRe: link Pin
Anonymous16-Feb-04 2:44
Anonymous16-Feb-04 2:44 
GeneralRe: link Pin
David Crow16-Feb-04 4:43
David Crow16-Feb-04 4:43 
GeneralRe: link Pin
Steve S16-Feb-04 4:54
Steve S16-Feb-04 4:54 
GeneralDifference between delete and delete[] Pin
Cedric Moonen15-Feb-04 23:08
Cedric Moonen15-Feb-04 23:08 
GeneralRe: Difference between delete and delete[] Pin
Rob Manderson15-Feb-04 23:20
protectorRob Manderson15-Feb-04 23:20 
GeneralRe: Difference between delete and delete[] Pin
RChin15-Feb-04 23:26
RChin15-Feb-04 23:26 
GeneralRe: Difference between delete and delete[] Pin
Cedric Moonen15-Feb-04 23:35
Cedric Moonen15-Feb-04 23:35 
GeneralRe: Difference between delete and delete[] Pin
Arcrest16-Feb-04 0:06
Arcrest16-Feb-04 0:06 

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.