CIPAddressCtrl background image


how is it possible to add a background image to a CIPAddressCtrl
control generated by the resource editor?

I`ve written my own subclass (CImageIpAddress), where I can change the
textcolor as well as the text-background-color in the OnCtlColor

Moreover I integrated a OnPaint() method where the background-image
should be created - but it failed... At the moment only the points
between the edit control fields are gone....

CImageList  m_ImageList;
BITMAP         m_bitmap;
CRect          m_rectBtn;
BOOL           m_bLoaded;

void CImageIpAddress::OnPaint()
  CDC *pDC = GetDC();

      m_ImageList.DrawIndirect(pDC ,
         CPoint( m_rectBtn.left, ),
         CSize( m_bitmap.bmWidth , m_bitmap.bmHeight ),
         CPoint( 0 , 0 ) ,


And here`s the function to load the image.

void CImageIpAddress::SetIpAddrImg(UINT uiImage)
   CBitmap bitmapImage;

   if( bitmapImage.LoadBitmap( uiImage ) )
       bitmapImage.GetObject( sizeof( m_bitmap ) , &m_bitmap ); =0;m_rectBtn.left =0;
       m_rectBtn.right = m_bitmap.bmWidth; m_rectBtn.bottom

       if( m_ImageList.Create( m_bitmap.bmWidth ,
m_bitmap.bmHeight ,ILC_COLORDDB,1 ,2) )
	 m_ImageList.Add( &bitmapImage ,&bitmapImage);
	m_bLoaded = TRUE;

Maybe someone could give me some hints to integrate a background image
to this control. On other controls this method is working.

best regards
6/28/2010 2:09:48 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 50


Similar Artilces:

text wrapping for images difficult
In Publisher 2000, the version I am used to, it used to be possible to right-click on a image-file I inserted, select "change frame", then select "Picture Frame Properties...". Within this dialog box you could change the text wrapping from "entire frame" to "picture only". The Picture-only option is what I would like to accomplish in the new version of Publisher where the text wraps around the image itself only with no whitespace around the image. The only way I seem to be able to do this in the xp version of publisher, and in my opinion, is an e...

Dyanamically loading images in a report
I’m using Access via Office XP. I need to generate a report that can have three different signatures on it. Each signature is in a .jpg file. Based upon a flag that is set in a “data selection / option / menu” form that is run from the report “On Open” event, I would like to have one of three different signature print on the form. I have about 20 forms that need this functionality and the signatures usually change about once a year. Also, I have three different offices and each of the offices have a different people who are responsible for these forms. So I have a total o...

Picture's background color doesn't match background when printed
Hi, I've got two logos in Publisher that won't cooperate. There's a colored rectangle that I've pasted these logos on top of, but prior to inserting them, I recolored the backgrounds of the logos in MS Paint to match the RGB codes of the rectangle's color. On screen, these logos blend perfectly into the rectangle's color fill. Unfortunately, if I print the page, the background of the logos is distinctly obvious, and they no longer blend in with the rectangle. In other words, a rectangular perimeter is clearly "drawn" around the logos, exactly like their di...

Transparent image dragging
Hello all! If you have Firefox and you open multiple tabs and then click on one tab and hold and then drag the tab, you will see that Firefox renders a small image of the page as you drag it around. I don't care too much about the drag and drop, just the rendering of the small image of the big page. Has anyone done this before or can provide me with a bit of advice on where/how to go for this. I'm looking to click on a purchase order from a list and then drag the PO (rendering the PO and therefore the transparent image) and when dropped on some other process have that...

Problem inserting in-line images
I am using Word 2003. Generally when I want to insert an image in a document I successfully use Insert..Picture...from file. I can then right click and add a caption is I want to. This is the preferred setting for me as i like to be able to easily add text before and after the picture. Hence my default settting (under Options...Edit) is 'Insert/paste pictures... Inline with text. I am having a problem with one particular document today (and I have seen it occasionally in the past) when I use the above method but the image gets hidden behind the text above. If I open a new...

Images Tweeked After Upgrade...
I recently upgraded to Publisher 2003... I noticed that some of the images in previous publisher 2000 files gett "toned down" when loaded into publisher 2003. What were once clean strong lines become a bunch of twisted 75 dpi scattered pixels when printed. I can't figure out what is going on... Is Office 2003 have some kind of graphic manager that is modifing the image when saved? Is Publisher causing the issue? I have printed the same file out hundreds of times on an older installation and compared it against the new - I AM GOING NUTS trying to figure this one out. A...

black backgrounds for video windows
Hi I have made a video for my website in Q Time. When the video opens the 'video box' or 'window' of the actual video, smaller than the screen , opens onto a white background/screen. All the pages of my website are on black background. I can't seem to figure out how to have the video open and play on a black window. Can anyone help? If it would help to see what I'm talking about my website is 1. Once you land on the first page, please click "gallery" 2. within the gallery page please click on the second image in the le...

For Office: convert documents into jpg (image screenshot)
I would love this feature! It took me about 20 minutes manually taking screenshots of a document I had and saving it as a picture. I would like Office 2007 and later to have this feature so I dont have to use other programs. Here was the document: Here was the picture I created manually via screenshots of the document: Thanks a many! Blessings It took me about 2 seconds to spot this as advertising! This is a newsgroup for Microsoft Acces...

How to Convert tif image to bmp image
Hi All, Can any body tell me how to convert tiff image to bmp.Its very urjent. On 2=BF=F926=C0=CF, =BF=C0=C8=C45=BD=C358=BA=D0, wrote= : > Hi All, > Can any body tell me how to convert tiff image to bmp.Its very > urjent. Use the CxImage library ( x ). -- Daewon <> wrote in message > Hi All, > Can any body tell me how to convert tiff image to bmp.Its very > urjent. If the pixel format o...

Images Not displaying in emails
All of a sudden when someone send me an email with a pasted screen print in it or even a signature image in their signature box, it does not display. It has a red X and says Picture (Device Independent Bitmap). I have gone into the options to make sure it downloads all pictures and that setting was never checked so it should have all along. The funny thing is that when I reply, it shows the images. Just when I open to read the email it doesn't display. There is no message up in the toolbar to download images or anything like that either like I have seen as I am trying to research this...

earlier added images appear in place of newly added images
I have been using publisher (2007) for a while now maintaining my son's website consisting of nothing but pictures. So far it has worked great. I am recently running into a problem where when I add new images, it somehow confuses the filenames (I guess) and displays older pictures from elsewhere in the site. I don't know if the problem is b/c of the quantity of images I have or what. I am aware that the images are renamed to imagexxx.jpg when published. Is there a maximum number of images that can be loaded? On a side note, I would also like to know if there is a wa...

Printing Issues with Background Images
I have created a Background image that basically is a header and footer. I have a text box in the mid section of the page where text would be typed. It looks good and works the way I want it too when it is opened. However, when I go to print, I get multiple thumbnail size images duplicated all over the page. Any ideas on what I can do to fix this? I am using Word 2003...This is driving me crazy, please help! "KW45" wrote: > I have created a Background image that basically is a header and footer. I > have a text box in the mid section of the page where tex...

Change Event macro
Hi, I am very new to Excel macro programming, but thanks to Dave McRitchie's code (as well as some contributions from numerous others, I have a macro which works, but not quite as I intended. What I want to do is create a gantt chart in excel 2000. Each altenate row has a project name and details, with a range of columns representing weeks in the financial year. I would like to enter a value into a cell to represent the stage of a project (e.g. sketch scheme, detail design, tender, contruction, post-tender). I would like the macro to change the background colour of the cell to produce t...

Background or Header picture
Hi, I don't even know if what I need help with can be done, but here goes: I have a picture, .bmp, that I would like to appear at the top of my printed Excelsheet. The challenge is to get the picture to cover the entire sheet with NO margins. The top of the printed paper should not show any white margins at all. I've tried to use both the Header and the Background-function but solve it... Does anyone know if and how it can be done? (Excel 2007) BR //Jenny ...

Publisher 2000 How to! Assign all backgrounds to the same
Hello If a student already has multiple pages made, how would they assign the background from page 1 to the rest of the document. Thank You Tim <Remove nospam from E-mail> Use the background (master page). ctrl+m. When you put something on the background it will be on all pages of your document. -- Mary Sauer MS MVP "Tim" <> wrote in message news:4c0f01c3764b$82cf8a10$a501280a@phx.gbl... > Hello > > If a student already has multiple pages made, how would > they assign the bac...

Image out of focus in Publisher 2003
I am having a lot of problems with the new Publisher 2003. (1) I have a rather large (12 meg) file that works fine in Pub 2000. There is a bmp in it that is still sharp in the old version but extremely out of focus in the new. I have tried to reload the image from the old file and it is still out of focus. I have tried to save the old as a jpeg and import into the new with the same results. (2) The same file will not save as a 300 dpi jpeg. The screen is black. It does fine as a 150 dpi. (3) If you select all and copy & paste to Word, it never completes. The program lo...

Macro in Background
Hi All Bit of a weird one but I have a big spreadsheet which does a large number of calculations (using a macro). The macro flicks across the spreadsheet (opening and shutting different sheets). which last about 2/3 mins. Is there away of running the macro in the background so it stays on the front page while it does the calculations? Any help appreciated application.screenupdating = false 'your code here application.screenupdating = true -- HTH... Jim Thomlinson "Hager" wrote: > Hi All > > Bit of a weird one but I have a big sprea...

Custom Button Image Size
Hello all, I have been trying to create an image for a custom button and have been having a bit of trouble finding the optimal size. I would like to to maximize the amount of space used by my image without too much resizing taking place. If anyone has had any experience with this please let me know. Thanks -- Andrew Roesch POSitive Technology Custom Solutions This may depend on how many buttons you have and the size of your screen resolution. As you add buttons they seem to shrink to fit. I'm not sure what the limit is as I only currently have 9. Most of our customers will only ...

How to set image as a Background to MFC Dialog
Hi, I had an MFC Dialog. I want to set a image as a background to my MFC Dialog. Could any one help in this... Thanks in Advance... Regards & Thanks, B B S Kumar Katikireddy On Tue, 6 Mar 2007 15:51:32 +0530, "Kumar" <> wrote: > I had an MFC Dialog. I want to set a image as a background to my MFC >Dialog. > > Could any one help in this... You might want to consider this: MrAsm On Tue, 6 Mar 2007 15:51:32 +0530, Kumar wrote: >I had an MFC Dialog. I ...

Losing transparent background in PDF
I'm working in Publisher 2003. I created a publication with a background. When I set a picture to have a transparent background, it works, but when I convert it to a PDF, the background of the pictures is white again. How do I correct this? I can't duplicate this. Are you using Acrobat? -- Mary Sauer MSFT MVP news:// "brenda" <> wrote in message > I'm working in Publisher 2003. I created a ...

Edit button image of a custom macro on the QuickAccess toolbar
In Office 2007, I made a macro (personal workbook for use among any/all files) and put it on the Quick Access toolbar. Now how do I change the picture of the icon? In the old Excel I would get the customize box up and then right click on the button. Then I would click on Edit Button Image, and I could "paint" the pixels however I wanted. -- Thanks, PTweety hi PTweety See this page -- Regards Ron de Bruin "pickytweety" <> wrote in message news:995...

App without visible window / running background
Hello, I have an application that will run in background and won't show a window. I have a dialog, which I use to perform the actions my app needs to do. I've tested my app with the wizard generated InitInstance() method: BOOL CMyApp::InitInstance() { CWinAppEx::InitInstance(); SetRegistryKey(_T("MyCompany")); CMyDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { ...

Help!!How to make background of an image to be transparently in report?
I put an image named Image1 in a report and change Image1.picture in background VBA code. Image1.picture="c:\a.gif" a.gif is a picture with transparently background .But in print view of the report,it's background turns white! Why? And How to make background of an image to be transparently in report? Try This works on white opaque bacgrounds. I've used it in A2003 but cannot get it to work for A2007. Strangely form brought forward from A2003 to A2007 are OK. Rod I do not have A2007 installed here but I would imagine t...

Image for a popup menu item.
Hi, I am using VS2008 feature pack. I want to display image before a menu item that has a submenu (means it is a popup menu). So I have created a toolbar and assigned the same ID as of the menu item , but this works only on those menu items that are not popup and does not work on the popup ones. please help.. Thanks ...

display a JPEG image on a 8 bit screen color depth
Hi My application uses VC++ 6.0. Could anyone help me out by letting me know how could I display a JPEG image on a 8 bit screen color depth.This JPEG image is getting displayed using my app. when i use a 16 bit screen color depth.Is there any function by which i can manually specify the bitmap color depth in my app. Thanks a lot. Anita You could look at GDI+ or check out what code might be available at joe On 24 Jul 2006 09:32:41 -0700, wrote: >Hi > > >My application uses VC++ 6.0. Could anyone help me out by letting me >kn...