Controls from dialogbox disappearing?

Hi

In my MFC dialog based application, i am using a JPEG file as a background
for my dialog box whose code i have given in the
OnEraseBkgnd() in the dialog class.

Also i have few static controls on my dialog box -- a static text, 2 buttons
& a list control to be precise. In order to have the background of these
controls as transparent i have written the neccessary code inside the
OnCtlColor().

When the application is run, everything is perfect but as soon as i click on
the column divider in the list control & drag it to decrease column size,
the buttons & the static text disappears.
When i drag the column divider to increase the column size things stay
perfect.

Now when i bring the mouse over the button they are displayed.

What cude be the possible reason for such behaviour.

Waiting for suggestions



0
davinder1 (74)
3/23/2006 9:11:27 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
454 Views

Similar Articles

[PageSpeed] 10

It's tough for me to tell what's going on from this description, but could 
it be that you have some controls overlapped.  I'm not sure how you did the 
jpg as a background and without code it's tough to tell for sure, but it 
sounds like some controls are behind others and popping to the front when 
they are selected.

Tom

"davinder" <davinder@stellarinfo.com> wrote in message 
news:%23p6hEmlTGHA.5500@TK2MSFTNGP12.phx.gbl...
> Hi
>
> In my MFC dialog based application, i am using a JPEG file as a background
> for my dialog box whose code i have given in the
> OnEraseBkgnd() in the dialog class.
>
> Also i have few static controls on my dialog box -- a static text, 2 
> buttons
> & a list control to be precise. In order to have the background of these
> controls as transparent i have written the neccessary code inside the
> OnCtlColor().
>
> When the application is run, everything is perfect but as soon as i click 
> on
> the column divider in the list control & drag it to decrease column size,
> the buttons & the static text disappears.
> When i drag the column divider to increase the column size things stay
> perfect.
>
> Now when i bring the mouse over the button they are displayed.
>
> What cude be the possible reason for such behaviour.
>
> Waiting for suggestions
>
>
> 


0
tserface (3860)
3/23/2006 4:53:42 PM
Reply:

Similar Artilces:

why won't word 2007 release control of a .rtf file after exiting w
I AM HAVING TROUBLE WITH ACCESS TO RICH TEXT FILES BY PROGRAMS OTHER THAN WORD------ AFTER THE FILE OPEN IN WORD IS CLOSED AND EVEN AFTER WORD HAS BEEN SHUT DOWN (EXITED) ---------- I GET THE ERROR MESSAGE THAT THE FILE IS "IN USE" BY WORD WHEN (FOR EXAMPLE) AN ATTEMPT IS MADE TO DELETE IT ---- SOMETIMES WHEN RE-OPENING THE FILE AFTER RE-STARTING WORD THE FILE CANNOT BE SAVED BECAUSE IT IS IN "READ ONLY" MODE ------- AFTER MUCH FIDDLING AROUND I FINALLY MANAGED TO DELETE THE PROBLEM FILE ONLY TO HAVE THE SAME PROBLEM RETURN WITH A DIFFERNT FILE ----- WORD 200...

RE: Control
Can some one point me right direction to achive this following. Need to dispaly a data in a table format. some of the column data may have to display a image/icon based on a value from the table (1 :- Red color icon, 2:-yellow color icon...) Once the data is loaded and displayed on the format , able to search particular row by column index and update the values including the images(change different image). I tried with Listview control, with the report view I am not able to search row and update the columns with the List vew I am not able to show the image/icon. do not want to use ...

bound control or inbound control
Hi Katherine, There are differences between using bound versus unbound controls. Where on the form do you want to use an unbound control? Jeanette Cunningham "Katherine" <Katherine@discussions.microsoft.com> wrote in message news:23BBC192-0A74-4B9F-9513-5E5923A76658@microsoft.com... > ...

MSCRM login and the Users Control Panel
Is anyone aware of any way that the settings stored under Control Panel - Users - Password Management might interfere with the process of Single Sign On into MSCRM? It seemed to have somehow cached someones login and prevented logging in as the logged in user, until cached credentials had been "deleted". However I have never seen this mentioned as being relevant. I am not too sure what the architecture model is there, but it appears to be a single domain. If this area has any relevance, it would be useful to know....thanks ...

Adding a control variable
Hello all, Under VC++ 7.1, I've added a checkbox to a dialog. Using the dialog editor, I am not trying to add a control variable for this check box. However, when I right-click on the check box and select "Add Variable", the resulting wizard dialog does not allow me to select "Control Variable" (it is grayed out). What do I need to do to get a control variable for this check box added to my class? Thanks, Dave I've never seen that before - are you able to duplicate this problem with other projects too? -- Regards, Nish [VC++ MVP] "Dave" <bett...

Releasing memory after creating OCX control
Hi, I try to create an instance of an activex control in my MFC dialog based app. Though my application works with out any error, if i check the memory after calling "delete pMyControl" it keeps on occupying the same memory it occupied when the control was alive. Could anyone help me where I am missing to clear the memory? Thank you. My Code here ---------------m_pxWmp= new CWMPPlayer4();if( m_pxWmp->Create("replay", WS_CHILD | WS_BORDER | WS_VISIBLE , CRect(100, 100,320,240), this, 2)){ m_replay = true; m_pxWmp->SetUrl("C:\\video.avi"); m_pxWmp->Set...

Spam control - MS Outlook
Hi! I am using MS Outlook 2000 and use 2 profiles. I recently installed a firewall package (Fsecure = Telia S�ker Surf), including Spam control. After install, MSO hangs and I cannot change to the other profile (if I not removed MSO by ctrl/alt/del) Somebody want to comment this? /Sven-Erik Intergrated AV/Spam is the cause of frequent issues in Outlook Is the FSecure you installed compatible with this old version of Outlook? "Storfille" <storfille@ebrev.net> wrote in message news:b1Ixm.11987$U5.164765@newsb.telia.net... > Hi! > > I am using MS Outlook 200...

stock control system
trying to see up a 'basic stock control sytem' for a warehouse that contains building materials. -- Thank you. You can use multiple ways of doing, there's 3 ways to come to m head... 1) Use a worksheet as database an save all the information on the cell of that worksheet using some macros to access it and handle. 2) You might want to use Access instead of Excel, I think would b easier to handle the database portion and you still have the Macro available. 3) You can use VB with an Access to create an application -- fanay ------------------------------------------------------...

Creating dialog controls at run-time
I've been researching how to do this, but whenever I try what other people do, I get very bad results. But my challenge doesn't end there. The number of controls I want to create is only known at run-time. The problems I face are manifold: 1. The code most people use fails badly. Not only is the font unconventionally big, but when I click the checkbox I create, the whole dialog disappears. If that's not enough, the pointer to the control is NULL when the dialog's destructor is called, so I can't delete the instance, and get a memory leak message when the program ends: CADi...

what control can display characters from txt files in a dialog?
I want to read lines from txt files and display them on a dialog.I wonder which control can be put into the dialog to hold the characters from txt? Something like :- while(m_file.ReadString(tmpstr)) { str += tmpstr; } m_edit.SetWindowText(str); -- Regards, Nish [VC++ MVP] "liao_xf" <sclxf@sina.com> wrote in message news:001401c3652f$177b9830$a001280a@phx.gbl... > Thanks first! > I know that Edit control can receive and edit input. > and I know the filestdio can read lines from txt. > but can you tell me how to attatch the lines to the edit? > Thanks!...

MDI support in ATL composite control
Hi, I have components created in ATL. The components are ATL composite controls. Entire work has been done till now using ATL, however I now need to give MDI type of work area (based o doc-view architecture) within the control. I have class derived from CMDIFrameWnd. However when I try to initialize instance of this class by calling "Create" method of CFrameWnd (base class in CMDIFrameWnd), I get error and creation fails. Tracing the code, I found that base class create method calls "AfxGetInstanceHandle" to get handle to the DLL. Now since this is ATL Composite control, ...

View Filtering and Access Controls for Business Units
I am trying to implement MS-CRM for my company. We have multiple Business Units . I need to give views to each Business Units so that they see only their own Contacts/Accounts/Opp lists. How do I accomplish this ? Also, If I gave inter business unit acesses , how do I make sure that the one business unit users can not modify any fields on other's Business Unit's records ? Thanks in advance for any help, Kishore This is quite easy to do with CRM. Assuming you have already created your Business Units in CRM, you can view a security role within one of the Business Units and a...

Tab Control Problems
I previously worked in VC++ 6.0, and have several applications that have either custom shadebox controls, or tab controls or group boxes. In all cases, when I moved the applications over to VS.NET 2003, everything was fine, except in the resource editor, I cannot see any of the controls that have been overlayed on a tab control, or a custom shadebox control and in some cases group boxes. I can tab to them and see the outline, but I cannot see the actual controls. If I drag a new control onto the tab control, I can see the control, but once it is saved, I can no longer access the cont...

mouse is user-defined, when mouse move to another dialog, mouse disappeared
We are doing a program running in a game. The game's mouse is user-defined, my program's dialog pop-up in game by Hook. my dialog can show in game normally, and can capture keyboard event. but mouse disappeared when mouse move from game to my dialog, and mouse will show normally when mouse leave my dialog. mouse event respond. although mouse disappeared I can drag my dialog using mouse. I think mouse need re-draw when move to my dialog, but I do know how to do. Please give advice, thank in advance. ...

FindRecord Control Button
i built a find record control button so a user can type in the form number and go there but it only searches the field that the cursor is in and the form # is not on the tab order(purposely). How can i specify where the find record function searches? thanks Ryan, usually people use an unbound combo box or an unbound text box for searching. There is a sample download with code of a search form at http://www.allenbrowne.com/ser-62.html If you need help to get it working, post back. You can also use the wizard to put a combo for searching on your form. On the form in design view, click the...

Controls coordinates
Hi everyone, Could somebody give me a simple example of getting a controls coordinates and then using them to put the control back where it was. So basicaly the control hasn't moved. Here's what I'm doing: m_cQuality.GetWindowRect(&qualityRC); ClientToScreen(&qualityRC); // int temp=qualityRC.Height(); // qualityRC.top=unyteRC.bottom-temp; // qualityRC.right=qualityRC.Width(); // qualityRC.left=0; // qualityRC.bottom=qualityRC.top+temp; // m_cQuality.MoveWindow(&qualityRC); m_cQuality.SetWindowPos(this, qualityRC.left, qualityRC.top, qualityRC.Width(), qualityRC.He...

My emails disappear when downloaded to my inbox.
I'm running Windows XP and using Outlook Express 6. When I download my emails to my inbox the inbox will be empty even though the emails went into the inbox. One time I was able to see two emails that I downloaded and then I click on my outbox and then went back to my inbox and my emails disappeared. Can you tell me what the problem might be Thanks! ...

User Control to Control Other User Control
Has anyone here created a control that controlled the content of other controls? I have my own custom ad control (for displaying space ads). I may have several on a page. What I'd like it to create another control that could determine how many instances of the first control existed on the current page, build a list of ads, and then set each control to show a particular ad. Is this practical? Suggestions? Thanks. Jonathan "Jonathan Wood" <jwood@softcircuits.com> wrote in message news:uQ5stZRnKHA.1552@TK2MSFTNGP05.phx.gbl... > Has anyone...

fonts are changing and text disappears
Hello when i open outlook 2003 all my maps on the left side of the screen are looking well and normal. But after a wile the font changed or a piece of the name/text disappear. Very stange i think. When i close outlook and turn it back on, everyting is back to normal but not for long. ...

Controlling drawing objects in Excel . . .
i m trying to do the following. 1) i draw 10 circles, 10 rectangles and 10 ellipses (all are scattering here & there) in excel. 2) i would like to change all the sizes of circles with minimum steps. [Is it possible to control in such a way that a circle is drawn as a master one, and that circle will be copied and copied until required number. When we want to change something to all circles, we will change the master circle, and all other circles will be automatically changed.] If someone knows, kindly explain to me. Thanks & Have a nice day!!! Thaw Htin Oo. Thaw, (Oo?) One...

Need more than 1208 controls per sheet
Hi, Does anyone know how to go around the limitation of MS Excel, which doesn't let the user, through automation, to create more than 1208 controls (checkboxes, buttons, or combination of two for example) on one sheet?? Thanks much! -- mowali ------------------------------------------------------------------------ mowali's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=20886 View this thread: http://www.excelforum.com/showthread.php?threadid=491476 I don't know whether it is possible to overcome the limit, but I would not use a worksheet where the ...

Gantt Bars disappear when constraint applied
I'm looking at a project 2007 file that has constraints applied to many of the tasks. The gantt bars do not show. If I remove the constraint the gantt bars appear. Any ideas on what's happening? In article <D58974E8-84BB-4D18-9507-7CDEE5C80778@microsoft.com>, Redrover <Redrover@discussions.microsoft.com> wrote: > I'm looking at a project 2007 file that has constraints applied to many of > the tasks. The gantt bars do not show. If I remove the constraint the gantt > bars appear. Any ideas on what's happening? Redrover, My first guess is th...

MFC Table control or similar control
Hi, I have a MFC dialog database application that returns data which i then put into an excel spreadsheet and display onscreen. Due to license issues i would like to write the data to a user defined control. I would like this control to have a similar tabular look like the excel spreadsheet. It should also have the option on control to print out what data is in the control. I would also like to be able to put a bitmap on the control (Showing a logo). Can anyone give me advice on how what control(s) i should use to accomplish this? Thanks In Advance Macca You could buy a third party ...

Unprotection For ActiveX Control
I have a protected sheet but would like others to manipulate Spin Buttons (ActiveX variety) to change some of the data. But if the sheet is protected I can't use the spin buttons even when the cells to be manipulated are unprotected AND the spin buttons are unlocked. Is there ANY way to get around this without having to unprotect the entire sheet every time I use the spin buttons?? Thanks, --Abe Do you have a linkedcell? Is that cell locked? Can you unlock that linkedcell? You could put the linked cell on another sheet (or even in an unlocked hidden cell (hidden column or h...

Metrics are not available
Hi everyone, I get the following error message appear on my homepage when logging into GP9.0: "Metrics are not available because the Microsft Office Chart Control is Missing". This never appeared until we installed IE7 on all our systems, including the Citrix boxes where our users gain access to GP9.0. Following advice from a previous post I installed Office Web Components for Office XP onto the server, but it hasn't helped at all. Does anyone know a fix for this? Thanks all, T S Since the homepage is created and rendered on the individual workstation, I would look at...