|
Hi all!
Now I am developing an application which will use many technology about OLE. But I know little about it. I often meet the problems. When I seek the answer in MSDN, I notice that a document named 'OLE specification' is often be referenced. I try to find it. But nothing can be found through google. Is here somebody know it? If somebody know, I hope you could be kind to tell me the web-link of it, or send it to me by email. Thank you!
Best regards!
There is some white cloud floating on the blue sky. That's the landscape I like.
|
|
|
|
|
Not too difficult to find these links[^].
The best things in life are not things.
|
|
|
|
|
Thank you very much!
There is some white cloud floating on the blue sky. That's the landscape I like.
|
|
|
|
|
Question 1:
I create one CDockablePane wnd and dock it in the bottom of the parent wnd. But the default CDockablePane height is too short and I want to resize the height of the CDP. But don't find any workable method to do.
Btw, if the CDP is docked in the left/right side of the parent wnd, it works well when setting new width.
Question 2:
Another question is how to make the CDP floating when initialized. The CDP is initially docked in one side when created. But I want to make it floating after it is created in the target position and with a initial size. How to do it ?
I feel very hard to control the CDP programmatically, like floating, resizing and moving with MFC. I found one artical from MS website about docking window management programmatically. But it is for C# Winform, not for MFC.
Can anyone give help?
modified on Wednesday, June 1, 2011 5:25 AM
|
|
|
|
|
I have the following piece of code which returns the handle to the window which should receive the focus,
CWnd* pWndNewFocus = GetNextTabStopWnd(pWndCurrentFocus->;GetSafeHwnd(), iDirection);
For setting the focus to the new window, i've written the following code, pWndNewFocus->SetFocus();
Incidentally the window that is set to receive the focus is a CButton. I have an OK button which is default button and a Cancel button. OK button is dithered. So the pWndNewFocus will be my Cancel button. When SetFocus is getting called on that, i'm not able to see the focus [dotten line around the caption] on the button.
Could you let me know the reason for this error? The same code when I execute it from VC++ 6.0, the focus is correctly getting set to the button. But when i execute the code in VC++ 10, i'm getting this issue.
|
|
|
|
|
|
Hi ALL,
I am not very sure if I am correct when i clear a embeded map variable.
map<string, map<int, int> > C1;
for(iter1 = C1.begin(); iter1 = C1.end(); iter1++)
{
map<int ,int>.swap((*iter1).second);
}
map<string, map<int,int> >().swap(C1);
modified on Saturday, May 28, 2011 10:14 AM
|
|
|
|
|
cy163@hotmail.com wrote: I am not very sure if I am correct when i free a map variable.
Are you looking for this[^]?
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
Hi All,
I am working on a dialog which have several controls and an Ultimate Grid
(UG is invoked from OnInitDialog m_TestGrid.AttachGrid(this, IDC_STATIC);).
When i use the "Test Dialog", The tabstops work as i defined.
But when i compile the code and run the dialog, Tab Stops dont work.
The tabstop works only when i switch between 2 controls(Ex: stop 7 and 8).
Can anyone give me some inputs on this.
Kasi
|
|
|
|
|
Hi,
I am having the follwoing CString "0000122334" and I need to remove the starting zeros from the string.
Kindly help.
Thanks in Advance.
|
|
|
|
|
Probably something like this[^].
The best things in life are not things.
|
|
|
|
|
Use The method CString::Remove like thish
CString TempString("0000122334");
TempString.Remove('0');
|
|
|
|
|
Try using CString::TrimLeft() to remove leading characters (see documentation in MSDN), CString::Remove() will remove all instances and not just the leading zeros.
|
|
|
|
|
here there are two method.
method 1: if your string is numeric then first convert into integer and again change into string.
eg. CString cs("000012345745");
int num = atoi(cs);
cs.Format("%d",num);
method 2:
eg. CString cs("000012345745");
cs.Trim();
int start=0;
while(cs.Mid(start,1)=="0")
{
start++;
}
cs= cs.Mid(start);
|
|
|
|
|
My MSAA Hook dll is expected to be loaded into all process's memory. in 32 bits Win7 it works.
But in win7 64 bits some process can load MSAAHook.dll 64 bits cannot be loaded into some 64 bits process. Why does this happens?
= ::SetWinEventHook(EVENT_MIN,
EVENT_MAX,
m_hModule,
MSAAHook::WinEventProc,
0,
0,
WINEVENT_INCONTEXT | WINEVENT_SKIPOWNTHREAD);
|
|
|
|
|
Currently, "exiting" (pressing upper right-hand corner's "X") WMP closes the WMP window but allows WMP sound to continue. How can this WMP "exiting\termination" event be caught or trapped programmatically so as to enable clean and thorough shutdown of Windows Media Player? Can the WMP ATL's OnOpenStateChange possess a Dispatch Identifier (known as DISP) that can catch this closure and termination event?
Thank you.
Michael A. Rinaldi
|
|
|
|
|
I converted old C++ project to VS.Net 2010 with 4.0 Framework.
error C2440: 'static_cast' : cannot convert from 'void (__thiscall CChatView::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
ON_MESSAGE(WM_ChatAddSize, OnChatAddSize)
void CChatView::OnChatAddSize(LPARAM lParam, WPARAM wParam)
afx_msg void OnChatAddSize(LPARAM lParam, WPARAM wParam);
Help would be really appreciated.
Thanks
|
|
|
|
|
You have your WPARAM and LPARAM in the wrong order, and your return types don't match; read the error message, it contains pearls of wisdom.
The best things in life are not things.
|
|
|
|
|
that's right, they are not related pointer type.
|
|
|
|
|
Studio has gotten a lot more picky about this (and they should've been all along) but essentially what the error is telling you.
You defined a message catching method as:
afx_msg void OnChatAddSize(LPARAM lParam, WPARAM wParam);
but it expected (for ON_MESSAGE() ) a method call that would look like this:
afx_msg LRESULT OnChatAddSize(WPARAM wParam, LPARAM lParam)
So you essentially have to have the parameters be of the same type and order (WPARAM, LPARAM) and have return of type LRESULT and you'll make the compiler happy.
|
|
|
|
|
Hi i need code for displaying the utf8 text through mfc application.Please any one help me in this regard.
Regards
Kishore Kumar Dacha
|
|
|
|
|
Where do you want to display it? One of the printf() [^] or TextOut() [^] type routines should be able to handle it.
The best things in life are not things.
|
|
|
|
|
Hello,
I have a Windows Application with its own PlugIn-System. Each PlugIn is a typical Windows-Dll. All works fine so far.
The problem is that if a single PlugIn (for whatever reason) crashes, the whole application crashes too.
Its the same problem as FireFox and Flash-PlugIn, for example.
I wonder if someone has any idea how to catch such crashes in order to prevent the crashing of the main application.
Calling the PlugIn-Dll Functions from another process? If, how to communicate with the mainapp and vice versa?
Any ideas/help appreciated.
Nikolaus
|
|
|
|
|
You could look at using COM as your API mechanism; you can create inproc servers, and use them inproc for debugging and out of proc to air-gap your app from the faults
However, I'd suggest it would be far more effective fixing your broken code, than trying to implement a cute way to hide the problem
|
|
|
|
|
I am talking about external plugins. "third party modules" - if the problem/crash arises there, it can crash, but it should not affect the calling application.
|
|
|
|