Click here to Skip to main content
15,901,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: gethostbyname Pin
Joaquín M López Muñoz26-Jul-02 3:54
Joaquín M López Muñoz26-Jul-02 3:54 
GeneralRe: gethostbyname Pin
Konst26-Jul-02 4:04
Konst26-Jul-02 4:04 
GeneralCalendar Control Doesn't Redraw Self Pin
JennyP26-Jul-02 3:27
JennyP26-Jul-02 3:27 
GeneralRe: Calendar Control Doesn't Redraw Self Pin
perlmunger26-Jul-02 19:25
perlmunger26-Jul-02 19:25 
GeneralRe: Calendar Control Doesn't Redraw Self Pin
JennyP27-Jul-02 5:10
JennyP27-Jul-02 5:10 
GeneralRe: Calendar Control Doesn't Redraw Self Pin
perlmunger27-Jul-02 7:06
perlmunger27-Jul-02 7:06 
GeneralRe: Calendar Control Doesn't Redraw Self Pin
JennyP27-Jul-02 15:25
JennyP27-Jul-02 15:25 
GeneralRe: Calendar Control Doesn't Redraw Self Pin
perlmunger27-Jul-02 16:05
perlmunger27-Jul-02 16:05 
Some things that are done by the framework behind the scenes aren't very clear to me, however, in general I don't mess with the mechanisms Microsoft has set up to make your application development quicker. That being said, sometimes you have to do things yourself.

I'm not sure that you're really helping yourself by creating the controls manually. I've never done it this way, so I'm no expert on it. When I need an index of my controls, I just create an array with all of their resource IDs in it and iterate through that with GetDlgItem. While this is probably not your problem, I do wonder if there is something about adding a control (CEdit in your case) with the create method to a DialogBar. DialogBars inherit from CControlBar (which inherits from CWnd) rather than CDialog. While adding to a CWnd is acceptable, it is normally a CDialog where this would be done. Again, this may have nothing to do with your problem. Just food for thought, I suppose.

What I usually do when I want to add a dialog bar to my application is I use the Project | Add to Project | Componenets and Controls menu in Visual Studio. In the ensuing dialog box, open the "Visual C++ Components" folder and select the "Dialog Bar" component. Click Insert and then OK on the Dialog Bar creation dialog. This will automatically insert a new resource into the dialog resources. Just open the resource and drag and drop your componenets as needed just as in a normal dialog. It will work as expected out of the box because it was implemented within the framework.

So, where does this leave you? To be honest, I'm not sure exactly. It kind of depends on you. I will send you a demo project I created that does just this and you can view the code there. However, the components added to the dialog are done through the resource editor and not manually.

If I were you, I would backtrack until you can get it to update/repaint properly. A control should rarely need you to update the drawing for it, so your UpdateData(FALSE) method should never need to be called. Just remove controls until you see it update properly and then add them back in testing to see if they work as you go.

Best of luck to you and I hope that this had been helpful. Maybe someone who knows more about creating the controls manually could be more help to you. Let me know if you have other questions. I'd be glad to help you muddle through it any way I can Wink | ;-) .

Best Regards.

-Matt

------------------------------------------

The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
GeneralRe: Calendar Control Doesn't Redraw Self Pin
JennyP27-Jul-02 18:51
JennyP27-Jul-02 18:51 
GeneralRe: Calendar Control Doesn't Redraw Self Pin
perlmunger27-Jul-02 19:46
perlmunger27-Jul-02 19:46 
GeneralIHTMLDOMNode::put_nodeValue problem Pin
pépé26-Jul-02 3:15
pépé26-Jul-02 3:15 
Generalhelp me Pin
Anonymous26-Jul-02 3:13
Anonymous26-Jul-02 3:13 
GeneralRe: help me Pin
Tomasz Sowinski26-Jul-02 3:17
Tomasz Sowinski26-Jul-02 3:17 
GeneralRe: help me Pin
lucy26-Jul-02 3:50
lucy26-Jul-02 3:50 
GeneralRe: help me Pin
Alexandru Savescu26-Jul-02 3:58
Alexandru Savescu26-Jul-02 3:58 
GeneralXMLTextWriter, Files and a Class Library Pin
Paul Watson26-Jul-02 3:06
sitebuilderPaul Watson26-Jul-02 3:06 
GeneralRe: XMLTextWriter, Files and a Class Library Pin
Rama Krishna Vavilala26-Jul-02 3:33
Rama Krishna Vavilala26-Jul-02 3:33 
GeneralRe: XMLTextWriter, Files and a Class Library Pin
Paul Watson26-Jul-02 3:44
sitebuilderPaul Watson26-Jul-02 3:44 
GeneralRe: XMLTextWriter, Files and a Class Library Pin
Alexandru Savescu26-Jul-02 3:55
Alexandru Savescu26-Jul-02 3:55 
GeneralRe: XMLTextWriter, Files and a Class Library Pin
Paul Watson26-Jul-02 4:44
sitebuilderPaul Watson26-Jul-02 4:44 
GeneralRe: XMLTextWriter, Files and a Class Library Pin
Rama Krishna Vavilala26-Jul-02 5:12
Rama Krishna Vavilala26-Jul-02 5:12 
GeneralRe: XMLTextWriter, Files and a Class Library Pin
Paul Watson26-Jul-02 5:34
sitebuilderPaul Watson26-Jul-02 5:34 
Generaldual processor - multiple threads. Pin
Niko Tanghe26-Jul-02 1:54
Niko Tanghe26-Jul-02 1:54 
GeneralRe: dual processor - multiple threads. Pin
Tomasz Sowinski26-Jul-02 2:14
Tomasz Sowinski26-Jul-02 2:14 
GeneralRe: dual processor - multiple threads. Pin
Paul M Watt26-Jul-02 5:40
mentorPaul M Watt26-Jul-02 5:40 

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.