|
DavidCrow wrote: These are one in the same.
Only in the broadest sense. Testing is totally different to selling a product.
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
Hi,
In a SDI, I wanted to replace the Document Template that is added using AddDocTemplate(). I want to remove one template and add another template.
Thanks,
AJ
|
|
|
|
|
Ajay L D wrote: In a SDI, I wanted to replace the Document Template that is added using AddDocTemplate(). I want to remove one template and add another template.
Quite simple, create a new template and add it using AddDocTemplate .
|
|
|
|
|
Thanks again!
AddDocTemplate() adds another template including the current one. I want to remove the current template and replace it with a new one. Or in other words how can I remove/delete a template that is already added.
Thanks,
AJ
|
|
|
|
|
Ajay L D wrote: I want to remove the current template and replace it with a new one. Or in other words how can I remove/delete a template that is already added.
Are you doing this at runtime?
|
|
|
|
|
Yes. I am trying to do this in response to a Menu item selection.
AJ
|
|
|
|
|
Ajay L D wrote: Yes. I am trying to do this in response to a Menu item selection.
Why don't you go for an MDI application.
|
|
|
|
|
Can we delete a Template in MDI?
AJ
|
|
|
|
|
Ajay L D wrote: Can we delete a Template in MDI?
You don't have to delete a template but you can switch to a new one. Of course you can also delete the template.
|
|
|
|
|
I think I could use a MDI. Could you please tell me how to delete a template?
Thanks,
AJ
|
|
|
|
|
Ajay L D wrote: Could you please tell me how to delete a template?
Deleting a document template is not a nice idea.
But anyway since you insist there is a data member in CWinApp called m_pDocManager which is a CDocManager object which in turn holds list of templates in m_templateList which is a CPtrList object. Rest you should be able to do.
|
|
|
|
|
Hi all
I am not sure my method is good . I have a Win32 dialog proc where WM_PAINT is called. I have a bitmap which is statically loaded from the dialog (ie LoadBitmap not used). But I need to resize the bitmap according to DPI . So I need to retrieve this bitmap in WM_PAINT so that I can redraw it .
Can anyone help me ?
redindian
|
|
|
|
|
Can you more explain? HBITMAP of HWND?
|
|
|
|
|
I have dialog box which has some 11 edit-box and 3 combo-box.
Now for all these i have to disable the context-menu option, when the right click is clicked on these elements.
How can i do this?
|
|
|
|
|
override the WM_CONTEXTMENU message and don't call the base class function from it...
|
|
|
|
|
if you want your context_menu on right click on the editbox see an article of Mr PJ Arends about it.
|
|
|
|
|
How can we make the Property pages to appear vertically. We can do this using the CTabCtrl, but I was wondering how to do this using Property pages.
Thanks,
AJ
|
|
|
|
|
Ajay L D wrote: How can we make the Property pages to appear vertically. We can do this using the CTabCtrl, but I was wondering how to do this using Property pages.
Use CPropertySheet::GetTabControl to get a reference to the internal tab control of the property sheet. Now use this reference to the internal tab control for manipulating the property sheet tab control.
|
|
|
|
|
Thanks! I did try that by modifying the style in the dwStyle parameter of CPropertySheet::OnCreate function, but it did not work. Any idea from where I should set the style for the tab?
AJ
|
|
|
|
|
Ajay L D wrote: CPropertySheet::OnCreate function, but it did not work. Any idea from where I should set the style for the tab?
Instead of passing the style there (which is wrong) using ModifyStyle function to modify the style of the tab control.
|
|
|
|
|
Thanks! I got it by calling ModifyStyle from OnInitDialog. It did not work from OnCreate. It could be that the tabs are not yet created when OnCreate is called.
Thanks a lot!
AJ
|
|
|
|
|
Ajay L D wrote: It did not work from OnCreate. It could be that the tabs are not yet created when OnCreate is called.
You told you passed the style to the PropertySheet which won't work. Instead you should get the tab control and pass this style to it.
|
|
|
|
|
I have a 3 pane splitter window. How do I prevent the separator bars from resizing these panes. Any help is appreciated??
|
|
|
|
|
|
Where exactly is this link supposed to go to?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|