HBRUSH C***Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC hereswitch (pWnd->GetDlgCtrlID())
// TODO: Return a different brush if the default is not desiredreturn hbr;
Best Reguards !
If you have a question about a specific implimentation then post the code you having troubles with.
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
I'll try using m_hWnd... when I figure out how to use it >_>
This is just the handle to your application's main window (whether app, or dialog). Windows needs it to discover who makes the call to an API function. You don't need to figure out how to use it so much as use the value that is returned by a CreateWindow() call, or in a Dialog application the handle that Windows sends you on every callback.
Sorry but still stuck, I'm pretty much a n00b programmer.
By using it I mean I just have no clue on handles or what not or where to put m_hWnd, it comes up as undeclared identifier. Everytime I've coded I've never really bothered with this and if some piece of code included it i just stuck it in and hoped it worked.
I have no CreateWindow call and I have no idea where in my program (which isn't really my program) windows sends a handle.
The difference is not DDX_Control. That just helps you associate a variable in your dialog with a window.
The difference is:
a) A control "built" in to the dialog resource, and created automatically as part of the dialog creation,
b) A control you create manually, later.
So, to answer your points...
1) Different Fonts.
At creation time for the dialog, it sets the font (WM_SETFONT) of the child windows (ie, your rich edit) to the same font as the dialog is set to use.
When you create a window manually later, this step does not happen.
2) Different extent sizes.
Almost certainly the same issue. Text size comes from fonts.
3) Inverse background colour.
Not sure, but I bet the text is inially selected, or something along those lines. Try dragging the mouse over text - I bet it goes inverse too.
Points 1 & 2 would be the same for a button, or an edit control... Nothing to do with the rich edit control at all.
Hope that helps!
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
in my project i import msado15.dll to opetate data from database
now i want to let the data can print in ms-word,so i
#import "C:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.dll" rename_namespace("AAA")
but it said:
error C2011: '_Application' : 'class' type redefinition
error C2011: '_Global' : 'class' type redefinition
error C2011: 'FontNames' : 'class' type redefinition
error C2011: 'Languages' : 'class' type redefinition
error C2011: 'Language' : 'class' type redefinition
error C2011: 'Documents' : 'class' type redefinition
error C2011: '_Document' : 'class' type redefinition
i know it should rename_namespace, but i am a fresh man, i can not find example
how can i work this problem, how to rename namespace, and what name should be renamed
thanks a lot