|
In Project Settings->Link Tab
There will be Ignore Default Libraries checkbox. check that and again rebuild ur code. Give it a try...
Bye
Cool Ju
|
|
|
|
|
I have a function MessageBubble(CString someMessage) which is located in the main dialog class of my app(MFC). I want to be able to call this function from any of the child objects. How would I go about doing this? Thanks.
|
|
|
|
|
If it's really in the main dialog you'll need to declare a public method and call it from the child one:
CYourMainDlg* pMainDlg = GetParent();
pMainDlg->YourPublicMethod();
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi
I got a package of dlls, some compiled as:
- "MFC Extension DLL (using shared MFC DLL)"
- and other as "Regular DLL using shared MFC DLL"
I want to compile myown application which uses those DLLs, in "Use MFC in a Static Library" mode.
but i'm getting the following linking errors:
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: "public: int __thiscall type_info::operator==(class type_info const &)const " (??8type_info@@QBEHABV0@@Z) already defined in libcmt.lib(typinfo.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __setmbcp already defined in libcmt.lib(mbctype.obj)
msvcrt.lib(MSVCRT.dll) : warning LNK4006: "public: int __thiscall type_info::operator==(class type_info const &)const " (??8type_info@@QBEHABV0@@Z) already defined in libcmt.lib(typinfo.obj); second definition ignored
msvcrt.lib(MSVCRT.dll) : warning LNK4006: __setmbcp already defined in libcmt.lib(mbctype.obj); second definition ignored
Creating library Release/IFL_Sample.lib and object Release/IFL_Sample.exp
nafxcw.lib(nolib.obj) : warning LNK4098: defaultlib "mfc42.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
nafxcw.lib(nolib.obj) : warning LNK4098: defaultlib "mfcs42.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
libcmt.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/IFL_Sample.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
Thanks in advance!
Yael
|
|
|
|
|
Hi, This is a really basic question but I just want to be doubley sure. The difference between BOOL* whatever; and BOOL *whatever;
?
|
|
|
|
|
no difference to the compiler.
both are pointers to BOOL. some people like to put the * next to the pointed-to type to emphasize that the * is actually part of the variable's type. some like it near the variable name.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
even the same to BOOL*whatever , BOOL * whatever , and
BOOL<br />
*<br />
whatever
...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I wrote a small method that will strip all the spaces from the end of an basic_string up until is reaches text.
So a string like "This is a test " .. would be
"This is a test" once the method is complete.
Something is not working correctly though.
typedef std::string::size_type size_type;
std::string AnyString;
char MySpace = ' ';
size_type CHAR_INDEX;
CHAR_INDEX = AnyString.size();
for (size_type i = CHAR_INDEX;AnyString[i]== MySpace; i--)
AnyString.erase(i,1);
The above source only works when stripping one space, like from
"2003 " to "2003".
If i have "2003 ", it does not work. Can anyone tell me what i am doing wrong here?
|
|
|
|
|
isn't i going to be out of bounds as soon as you hit that loop? a string of length 10 won't have an element 10, it'll only have 0..9 .
---
here's how i did a TrimRight
string TrimRight(string str)
{
const TCHAR * szTrimChars = _T( " \t" );
int nIdx = str.find_last_not_of(szTrimChars);
if ( str.npos == nIdx )
{
str.erase();
}
else
{
char tSave = str.at(nIdx);
m_str.erase(nIdx, str.npos);
m_str.append(1, tSave);
}
return str;
}
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Even if i start at element 9.
my method still does nto work correctly.
Any idea what i am doing wrong
|
|
|
|
|
Strange things happen if you try to modify the collection you are looping over. The best thing is to copy the string, loop over the original string but delete elements from the copy. Finally, assign the copy to the original string.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I do the following based on your suggestion but still cannot get it to work if there is more than 1 space to be removed before i hit text
typedef std::string::size_type size_type;
std::string strTemp;
char MySpace = ' ';
size_type CHAR_INDEX;
strTemp = AnyString;
CHAR_INDEX = strTemp.size();
CHAR_INDEX--;
for (size_type i = CHAR_INDEX; AnyString[i]== MySpace; i--)
strTemp.erase(i);
AnyString = strTemp;
|
|
|
|
|
hello...
i want to ask about filename.dat
how can i put images (jpeg or any other format)in the file.dat,i want to know the steps, and how they will be in that file .
please answer me ,it's very important to me.
thanks
|
|
|
|
|
Your question is a bit on the unclear side. You are wanting to write image data to a file named filename.dat (or file.dat). Correct? Where are you getting this image data from?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
hello
i need to Store the content of the image file inside the filename.dat.
i want to perform this because i am trying to execute face detection using version 1.2 of the frontal face detector code (http://www.cc.gatech.edu/~wujx)
the auther used cars in his file.dat .
i want to use faces .how can i perform that.
thanks
|
|
|
|
|
sara-m wrote:
i need to Store the content of the image file inside the filename.dat.
If you already have the face data in a buffer of some sort, then you simply need to call CreateFile() , WriteFile() , and CloseHandle() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
What do u want 2 do:
1.Store the filename of the image in the filename.dat
2.Store the content of the image file inside the filename.dat
If method 1, i know but method 2 never heard about
/\|-||\/|/\|)
|
|
|
|
|
I use MFC and I want to print out text with a image how can I do that.
And if it is possible how can I print out a image that is in the program and outside?
|
|
|
|
|
i want to do a timer in windows sdk, which run continuesoly.So please help me about this.
I dont want to write a timer procedure for that so whethere it is possible?
Thanks in advance,
santosh
|
|
|
|
|
|
By calling SetTimer(nn) you initialize a timer that fires OnTimer each nn milliseconds.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I don't know other way than:
UINT_PTR SetTimer( HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC timerFunc
);
static LRESULT CALLBACK WindowProc(
HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
)
{
switch(uMsg)
{
case WM_CREATE:
{
SetTimer( hWnd, 1, 1000, NULL) // 1000 - 1sec
}
break;
case WM_TIMER:
// do something
break;
case WM_QUIT:
KillTimer(1);
break;
}
}
}
|
|
|
|
|
How do I open a document from within my CDocument derived class?
I tried CMyDoc::OnOpenDocument(LPCTSTR pathname), but that doesn't work.
|
|
|
|
|
You not opening document. Ususaly when you click on menu File New or Open function OnNewDocument or OnOpenDocument are called automaticaly. Document template wants to control all creation and deletion of documents.
You can treak it if you look in CDocumentTemplate.
|
|
|
|
|
I have a VC++ application that link/update/retrieve data of a MS access mdb file on the web. However, I do not know how to launch/open a web page through this application
Anyone knows how to do it? If so, can we are able to close it after launching?
*) The reason I ask for help, because I need to update data to that MS access mdb file without requiring the user to launch the web page himself!
Thanks for any help
|
|
|
|