|
You do not need to recompile test.exe until your new dll exports the function that is being called by test.exe
test.exe is only concerned about the function that it calls. No matter if you add or remove any other functions in the dll.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Does it mean, that i can keep on adding new functions to a dll (and export these functions) or modify the behavior of existing exported functions, and i do not have to recompile existing programs which are already linked to it?
Example
DLL ver1.0 - Functions : void BFunction(), void CFunction();
test.exe (calling BFunction()) is linked using .lib, .h during compile time to this DLL.
DLL ver 2.0 - Added function void AFunction(), and modified internal behavior of BFunction().
test.exe will still work fine? Since the function prototype of BFunction is still the same, test.exe should work fine right?
|
|
|
|
|
1. You are free to add new functions always.
2. You are free to remove existing functions if those functions are not being used by the calling program.
3. You can modify the internal behavior of existing functions that are being used by the calling program, until you keep the return type and function parameters same.
uus831 wrote: Since the function prototype of BFunction is still the same, test.exe should work fine right?
Yes.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Thanks a lot. Now it's clear to me
Really appreciated it.
|
|
|
|
|
If anyone else is using your DLL, it's not advisable to change the functionality of existing functions.
It might be a good idea to create/export classes for each interface version, and only add new functionality to new classes.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
I using the Editbox as the Text editor and i assing the short cut keys in editbox for some operation like find text as Alt +H . How can i use it..
Manikandaprabu
|
|
|
|
|
Have you tried using Keyboard Accelarators?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
How to get the currrent view's bk color. I have used pDC->GetBkColor() in OnDraw() of the form view class but it gave white color.
How can this be done?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: but it gave white color.
How you are determining this ? Show code.
It gives actual color of form.
|
|
|
|
|
This is the code
void CCallLoggerClientView::OnDraw(CDC* pDC)
{
CRect rc;
GetClientRect(&rc);
CString str= "date";
COLORREF clr;
clr = pDC->GetBkColor();
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(DATE_COLOR);
pDC->FillSolidRect(rc.Width()*3/4+9,2,rc.Width()*3/4+50,15,clr);
pDC->TextOut(rc.Width()*3/4+10,2,str);
}
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: pDC->FillSolidRect(rc.Width()*3/4+9,2,rc.Width()*3/4+50,15,clr);
Why you are using this function here. You are filling rect with color , which is already thre.
Even with this call, GetBkColor returns color of form view.
|
|
|
|
|
Actually i am calling the same bunch of lines in a timer function. So the text is getting a whilte background every time.So i did like that.
Is there another way to do this?
KIRAN PINJARLA
|
|
|
|
|
And how you are creating DC there ?
|
|
|
|
|
i used
CClientDC dc(this);
KIRAN PINJARLA
|
|
|
|
|
Use CPaintDC instead.
Additionally, you need to Invalidate the rect before using this. i.e.
void CMyView::OnTimerProc()
{
Invalidate();
CPaintDC(this);
}
|
|
|
|
|
Invalidate() causes flickering in my window.
KIRAN PINJARLA
|
|
|
|
|
OK. I called InvalidateRect() in the rect region in which the text falls. Not it looks ok.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
What should i do if i want to show a bigger text and with a different font?
KIRAN PINJARLA
|
|
|
|
|
Create font of your choice.
And select it in DC.
CFont *pOld = pDc->SelectObject(&Font);
pDc->SelectObject(pOld);
|
|
|
|
|
how to get one of the system default fonts which are availabel with OS?
KIRAN PINJARLA
|
|
|
|
|
Use GetStockObject .
HFONT hfnt = (HFONT)GetStockObject(ANSI_VAR_FONT);
|
|
|
|
|
Thank you so much prasad.
KIRAN PINJARLA
|
|
|
|
|
Hello
I want to search specified string in a text(*.txt) and count the numbers of the string in this text.
what functions or methods could be supported for the question??
Thanks a lot.
Any suggestion is useful!! Thanks!!
|
|
|
|
|
|
Hello
I am sorry that I don't how to use the function. I try to use it in MFC, but I can't find CString can open the txt file.
If possible, please tell me how to open the txt file and search the specified string in detail ,or what steps and functions I must do for the question.
Thanks your help again.
Any suggestion is useful!! Thanks!!
|
|
|
|