|
There are seveal registry classes on CodeProject. Do they not do what you need?
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
I have been exploring this for hours. The one by PJ Naughter seems the most promising but I haven't been able to figure out how to get it to update any of the keys except the one he wrote for his company. What he wrote looks great. I'm just struggling because I can't get it to work for me. The problem is me and that is why I asked for help.
Kyle
|
|
|
|
|
I have a much simpler CRegistry class that has always worked for me. If you want, I'll send it to you.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Tom, I would be very grateful. Thank you for the generous offer. I will be anxiously waiting. Please send to Kyle@TrustLine.com.
Thanks,
Kyle
|
|
|
|
|
It's on the way. I think you'll find it very easy to work with. Lemme know if you have any questions.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Thank you Tom! I'll let you know how it goes.
Kyle
|
|
|
|
|
I want to overwrite the OnDraw of my ATL composite control, to prevent flickering when redrawing. I thought I could just overwrite the CComCompositeControl::OnDraw, but it seems this method is never called, instead the OnPaint of CAxHostWindow is called, which does not call the OnDraw as the OnPaint of the CCompositeControl does.
Anyone got an idea how to do this ???
|
|
|
|
|
Hello,
I have a little question!
I have a CEdit-derive class, we shall tell CMyEdit .
Inside it on pressing the left button of the mouse I create in-place edit, we shall name CInPlaceEdit
pEdit = new <code>CInPlaceEdit</code>;
pEdit->Create(WS_CHILD | WS_VISIBLE | ES_CENTER, rect, this, 100);
Then, when CInPlaceEdit loses focus, it needs to be removed.
Where and as it is better to remove him!?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
DestroyWindows should do the trick
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
If I have correctly understood, I should in CInPlaceEdit in method OnKillFocus call DestroyWindow ?
This same that in the parent to specify delete pEdit?
Or in DestrowWindow it is necessary to specify
delete this;
Best regards,
Eugene Pustovoyt
|
|
|
|
|
If you look at the CWnd d'tor, you'll see that it calls DestroyWindow for you (shown here) so you can do the "delete this" if you want and it will work.
CWnd:: ~CWnd()
{
if (m_hWnd != NULL &&
this != (CWnd*)&wndTop && this != (CWnd*)&wndBottom &&
this != (CWnd*)&wndTopMost && this != (CWnd*)&wndNoTopMost)
{
TRACE(traceAppMsg, 0, _T("Warning: calling DestroyWindow in CWnd:: ~CWnd; ")
_T("OnDestroy or PostNcDestroy in derived class will not be called.\n"));
DestroyWindow();
}
...
}
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Thank you!
But I have some more questions, there can be you help to me, before I shall create a new theme!?
1. Why in-place edit I can't change the background color?
CInPlaceEdit::OnCtlColor()
{
HBRUSH hbr = (HBRUSH)m_brColorBk;
pDC->SetColorBk(m_crColorBk);
return hbr;
}
2. How to delete in-place edit, when the mouse clicked outside the parent window?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
1) You're handling the wrong message. You need the following:
.h file
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
.cpp file
BEGIN_MESSAGE_MAP(CMyEdit, CEdit)
ON_WM_CTLCOLOR_REFLECT()
END_MESSAGE_MAP()
...
HBRUSH CMyEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
pDC->SetBkColor(RGB(255,0,0));
return m_Brush;
}
2) Do the "delete this" in the control class' OnKillFocus
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
2. But I for any reason do not get in handler OnKillFocus ?
Eugene Pustovoyt
|
|
|
|
|
Why I can't handle the WM_NCLBUTTONDOWN in in-place edit! And how I can do it?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I have a dialog that uses the 8 point Sans Sarif font. I want to make a static text control have a larger & bold font. How do I change the font for this one control on my dialog?
Thanks in advance,
Bob
|
|
|
|
|
|
In this thread, I list a complete code snippet on cycyling through all controls on an edit control and setting their fonts.
You can easily modify this to set all the static controls or just a single static control. Let me know if you need any help with either.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Thanks Tom, just what I needed!
|
|
|
|
|
Glad I could help
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Hi,
In a three pane splitter where the right pane is a CFormView, how can I calculate the width values for SetColumnInfo, so that the right pane is always at the exact width needed to accomodate it's dialog resource and resizing the window only affects the middle pane? (Kind of like the behavior of Outlook Calendar)
I've tried a lot of things, but I can't even get the initial sizes (before any resizing) right. The right pane is always either too small or too big or even just 0 width. And when I start meddling with the OnSize the whole thing goes completely crazy...
Anyone have a clue? (cause I can't seem to resize my brain to the exact size needed to accomodate the mfc documentation...)
Thanks.
|
|
|
|
|
Can anyone give a list of all WNDPROC WM_* messages I can receive from a window
Thanks already
LPCSTR Dutch = "Double Dutch "
|
|
|
|
|
Sure thing. Do you have five reams of paper ?
Get Visual Assist from www.wholetomato.com, type in WM_ and hit ALT-space - you'll get a list.
|
|
|
|
|
An easy way to see them all is to bring up the help (included with VC or the Platform SDK), go to the index, and type "WM_" and notice all the messages in the list. There is no single list of all the messages. They seem to broken out into different "sections", keyboard, mouse, etc.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
Run the Spy++ application that ships with VC++. When it starts, select the Log Messages menu item, drag and drop the Finder Tool icon onto a window and then click the Messages tab. At that point, you will see the roughly 1000+ messages you can capture. You can also filter these messages (via type) so that you can spy on specific messages types (e.g., keyboard, mouse, afx/mfc, edit control, etc.)
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|