|
"The DefWindowProc function validates the update region. The function may also send the
WM_NCPAINT message to the window procedure if the window frame must be painted and send the
WM_ERASEBKGND message if the window background must be erased."
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi all, I'm learning how to print in MFC and I know MFC will generate a 'printpreview' view for you once you've got all the printing settings right. I'm trying to find out how to make this 'PrintPreview' the initial view of an application so that when you enter the program with some initial parameters you get a 'PrintPreview' window directly before any operations. Has anyone got any ideas on this? Thanks in advance.
|
|
|
|
|
Hai,
I am new to dll.I have created a menu in my dll.i want to use that in other for a Dialog Based Appication. How I can acheive this
-- modified at 7:01 Wednesday 6th June, 2007
|
|
|
|
|
Go to Resource view. Right Click, Add Resource, Then Add Menu.
Customize the menu and call it whereever you want to use.
Programming in Dll is almost same as that of other application.
Anurag Gandhi.
|
|
|
|
|
i mean i have already created a menu in my dll. i want to use that menu in other applications.my question was not clear, sorry for that
|
|
|
|
|
Can you please mention in detail, which type of dll you are creating and what will be your client application.
Dll created using MFC is not very much flexible.
Anurag Gandhi.
|
|
|
|
|
I am Creating a AtlCom Dll & i have to use menu created in that dll in a dialog based apllication
|
|
|
|
|
In you client application, add this string (#include "yourATLDLL.rc") in View->Resource Includes->Compile-time directives edit box.
Next, in Project Settings->Resources tab, under "Additional resource include directories:" edit box, add (..\foldername) where your "ATLDLL.rc" file is located.
Hope this helps.
Thammadi
|
|
|
|
|
Hi,
I have generated a webservice proxy code in c++ using SPROXY.exe tool.
Using this proxy code I call to webservice methods (written in Java). I can call the methods now but I am not able to send the authentication (username/pwd) information and hence the web service responds with error stating “Failed Authentication”.
How can I modify my proxy code so that I can send the authentication information in the SOAP header?
Regards
Regards
|
|
|
|
|
Hello
Plz help me to hide the caret in CRichEditView. the HideCaret() does'nt work.
Thanks
-- modified at 6:42 Wednesday 6th June, 2007
|
|
|
|
|
Do you want to prevent the user from entering characters as well?
If so, you can use the EM_SETREADONLY message.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi all
i have made a SDI application
please help me
when i right click on a menu item
it will not show the event handler on menu item and i want event handler
// I double click on IDR_MAINFRAME and i will show mwnues
i add a tool menu and a dependent item under this but when i right
click on it it will not show event handler
thanks
hi
|
|
|
|
|
Hi,
I guess the class wizard donot seem helpful for you.
Do it manually,
use ON_COMMAND macro in your message map of mainframe window class
BEGIN_MESSAGE_MAP(CYourMainFrame, CFrameWnd)
ON_WM_CREATE()
.
.
.
ON_COMMAND(ID_YOUR_MENU_ITEM, &CYourMainFrame::OnYourMenuItemHandler)
.
.
.
END_MESSAGE_MAP()
And Declare and implement your handler
afx_msg void CYourMainFrame::OnYourMenuItemHandler();
Best Regards
Raj
|
|
|
|
|
thanks sir
but can i know sir why it is not present on right clicking the menu
hi
|
|
|
|
|
Conventionally, Only Leaf node of menu handles the event.
It is not a good practice to add event handler for those menu which has child node.
That's why wizards don't support it.
Anurag Gandhi.
|
|
|
|
|
It seems that CString doesn't work beyond 30,000 characters of length. Can anyone please tell me is there any way to edit strings of larger length so flexibly like CString does.
Anurag Gandhi.
|
|
|
|
|
Anurag Gandhi wrote: It seems that CString doesn't work beyond 30,000 characters of length.
Actually the following code snippet:
CString sTest="";
for (int i=0; i<50000; i++)
{
sTest+="*";
}
int iLen = sTest.GetLength();
works fine on my system.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
At those sort of links I'd be tempted to say just use several CString s
Seriously though CString is going to be horribly inefficient with this amount of data as it's constantly reallocating and moving stuff around. You're either writing some serious text processing here in which case I would do my own text buffer with the required functionality or you're in need of breaking up that CString. Have a look at CStringArray if MFC is your thing.
If things get difficult when they shouldn't be then often you just need to do more of the easy stuff. It's one of the reasons I love programming.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks to both.
The problem was not with CString, it was something else. Well, thanks a lot.
Anurag Gandhi.
|
|
|
|
|
Anurag Gandhi wrote: It seems that CString doesn't work beyond 30,000 characters of length.
CString has no such limitation.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi All,
I added virtual copy constructor for quite a few classes. I see a drastic difference in memory usage before and after the change, that too only with debug binary. When I ran release binary the memory usage is almost the same.
Here below are the memory statistics
Before Change
-------------
Peak Mem Usage & VM Size for Debug binary is: 15 MB & 10.5 MB
Peak Mem Usage & VM Size for Release binary is: 11.5 MB & 8 MB
After Change
-------------
Peak Mem Usage & VM Size for Debug binary is: 29 MB & 26 MB
Peak Mem Usage & VM Size for Release binary is: 12 MB & 8.5 MB
Is it the case virtual copy constructor makes debug binary use more space?
Thanks and Regards,
Nani
-- modified at 4:39 Wednesday 6th June, 2007
|
|
|
|
|
mandanani wrote: I added virtual copy constructor...
How?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You mean in what way I added virtual copy constructor?
Here below is the code:
CValueObjectBase* CashflowVO::clone() const
{
return new CashflowVO(*this);
}
Here CValueObjectBase is base class and clone method is pure virtual method. The clone method of derived class copies the object and return base class pointer.
Hope I have provided the right information.
|
|
|
|
|
I thought constructors couldn't be virtual, since they require complete information to create the object.
|
|
|
|
|
Cyrilix wrote: I thought constructors couldn't be virtual, since they require complete information to create the object.
You are correct, hence my question to him as to how he managed to pull this off.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|