|
I have individual step into the PreSubclassWindow that make sure it has good work.
I try to unsetting them which mentioned above, Only a bit changes as follows:
void CTTComboBox::PreSubclassWindow()
{
ModifyStyle(CBS_DROPDOWN | CBS_DROPDOWNLIST | CBS_SIMPLE, CBS_OWNERDRAWFIXED|CBS_HASSTRINGS);
CComboBox::PreSubclassWindow();
}
It still hasn't work?
|
|
|
|
|
Override OnCreate, CBS_OWNERDRAWFIXED is not a style you can force upon an already created control. Just like you can't transform a push button into a radio button without destroying it and creating a new one. Modifing styles in PreSubclassWindow is too late as the window has already been created.
|
|
|
|
|
Pardon me,
Here I only use DDX_Control method to subclass the Combobox in DoDataExchange function in specified dialog without OnCreate method to create the Combobox control, thus I seem must modify the style CBS_OWNERDRAWFIXED at PreSubclassWindow function. How you think that?
|
|
|
|
|
In the resource editor set the combobox's owner draw property to fixed.
|
|
|
|
|
Yes, I had done in Resource-editor, but I haven't still understand why don't via programmed to change it.
|
|
|
|
|
Forgive me, I don't know exactly what your asking or what your trying to do. Your English comes out a little ambiguous. Let me guess, you want to have a combobox that is dynamic in that sometimes it might need to be owner drawn, and sometimes you just want to let windows do this. Unfortunately this isn't easy. Once the control is committed you cannot change swap it's owner drawn style. You'll have to get creative. Perhaps two controls, one ownerdrawn one default and only have one of these visible at a time. Or you can handle your own "default" style drawing in the owner drawn. Either way you're going to have to get your hands a little dirty. Good luck.
|
|
|
|
|
Thanks for lots of helps,
I only want to have a combobox that is dynamic created or subclassed, and only by means of programmed to operate these.
Ok, to create a combobox and add the style CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE in the OnCreate function preprocessing. that will be successful without question,
but to subclass a combobox and do additional the style in PreSubclassWindow functon. that will be failed.
I haven't know whether the problem has been clearly described...
|
|
|
|
|
hello
Iam using MFC classes CToolbar for creating the toolbar. when iam inserting or adding new buttons to existing toolbar,its works fine(repainting the bar)when its on Docking state. but when the toolbar on floating state it doesnt repaint it.
How can i solve this problem. if any one have solution pls help me out.
with regds
vipin
|
|
|
|
|
|
'Person Name Smart Tags' are available with To/From/Cc/Bcc e-mail addresses of Outlook. If you move the mouse pointer to e-mail ids in these fields, a 'Windows Messenger' icon will appear and you can get a context menu by clicking on that icon. This Smart Tag of Outlook provides the functionality to call or send mail to that person using smart tag menus by leveraging the functionality of 'Windows Messenger'.I want to do some preprocessing (like providing default message body or displaying a message box before placing call) on the click of these menu items using outlook automation or plug in or any other possible way. Is there any way to modify the name of these smart tag menu items and hooking or capturing the click event of these menu items?How Microsoft Outlook integrated with Windows messenger to provide call facility? Which DLL is responsible for it? Can I hook into that DLL to trap the click of Call menu?Please help me if you have any ideas in this regard. Let me know if I am not clear with my points.
NB : I don’t want to do this activity via adding ‘Additional Actions’ in the smart tag menu, but I want to use the existing ‘Call Work..’ menu click event.
|
|
|
|
|
Can anybody tell me, how i can add a link or hyperlink to a messagebox?
I guess it's not that difficult, but i've never done it and could not find any documents how to do so.
|
|
|
|
|
Create your own dialog.
Subclass CStatic, putting in the functionality of a link by handling such messages and functions as DrawItem(), WM_MOUSEHOVER, WM_MOUSELEAVE.
Use it in your dialog.
this is this.
|
|
|
|
|
With the message box that comes from MessageBox() , you can't. There are plenty of examples here, however, on making your own.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Try Here[^] instead...
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I've added a bar chart (MSChart OCX component) to my application and I don't know how to add a label with the column value over each bar. How can I do that?
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
|
Ups, I can't find the answer there I don't want to change the column label (used when showing the legend), I want to insert the value f the column over the drawn bar or above it. Do you know how to do that?
Thanks,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Sorry, but I didn't find any function which can solve the purpose. In case you find the solution,plz tell me.
all the best
Ritu Kwatra
|
|
|
|
|
I don't understand why MSChart is not document as other components are ...
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I am using textout function to display time (in minutes/seconds)...problem arises when after each minute seconds are reset...first 10 seconds are displayed 10,20,30.... instead of 1,2,3 and so on
what should be done
thanks
|
|
|
|
|
Before drawing your text, use FillSolidRect() to fill the background area for the text.
this is this.
|
|
|
|
|
I want to know how can I exchange data between property pages. For example, suppose I have two property pages. I need to use an edit box named m_edit1 in property page1 to store the value, and read and show it in property page2
How can I tackle the problem?
Thanks~
|
|
|
|
|
You'd have to access to property pages parent (PorpertySheet) to get and set information from the pages. The property pages would have public methods to get and set the data you need and call them by using the CPropertySheet::GetPage.
From within the page you need to get/set information:
CPropertySheet* pSheet = (CPropertySheet*) GetParent();
CPropertyPage* pPage = pSheet->GetPage(1);
pPage->GetSetText(...); // call the public method you've defined.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi,Thank u for ur help.I have tried it but i cannot get the wanted result.Please read my code:
BOOL CReinforce::OnInitDialog()
{
CPropertyPage::OnInitDialog();
CPropertySheet* pSheet =
(CPropertySheet*)GetParent();
CComputer* pComputer = (CComputer*)pSheet->GetPage(1);
//double shearforce,moment;defined in the CComputer;
reinforceshearforce=pComputer->shearforce;
reinforcemoment=pComputer->moment;
}
The class CComputer is dereived of CPropertyPage and the frist PropertyPage.The class class CReinforce is second PropertyPage.And parameter( shearforce and moment) is defined in the CComputer.
Is it right?
Thank u .
|
|
|
|
|
What kind of problem are you having?
greenwyx wrote:
CComputer* pComputer = (CComputer*)pSheet->GetPage(1);
If CComputer is the first page added it would be GetPage(0) instead of 1.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|