|
Thank you, David! Ok very simple and I did it but, doesn't result... Remains ocurring the link error:
ExportedFunctions.obj : error LNK2001: unresolved external symbol _fnEntrada
../dlls/Axsceovs2.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Another idea?
Cesario Simoes, jr
Working with computers since 1970 (Burroughs/GTE). Programming in assembly DSP (TMS320c2x and TMS320c5x), C and C++. Using C++ and MFC, developping GUI to telecommunication equipment (PABX, ACD, RAS, etc.)
|
|
|
|
|
|
The problem occurs just this functions. If I declare a variable, this is recognized in the other module... Perhaps is something related with the function declaration? I'm declaring like this:
int fnEntrada();
Cesario
Cesario Simoes, jr
Working with computers since 1970 (Burroughs/GTE). Programming in assembly DSP (TMS320c2x and TMS320c5x), C and C++. Using C++ and MFC, developping GUI to telecommunication equipment (PABX, ACD, RAS, etc.)
|
|
|
|
|
Thanks again, David!
It's ok now! I forget a "static" in front of the function declaration in the .h file...
Best regards from the lower south of Brazil...
Cesario Simoes, jr
Working with computers since 1970 (Burroughs/GTE). Programming in assembly DSP (TMS320c2x and TMS320c5x), C and C++. Using C++ and MFC, developping GUI to telecommunication equipment (PABX, ACD, RAS, etc.)
|
|
|
|
|
Hi!,
I use this code to get the column number of a CListControl into a CFormView. It works fine.
But It work for right click. I cannot find a Handler for left click. Something like NM_LCLICK unstead of NM_RCLICK.
BOOL CDataBaseManagerView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
HD_NOTIFY *pHDN = (HD_NOTIFY*)lParam;
LPNMHDR pNH = (LPNMHDR) lParam;
// wParam is zero for Header ctrl
if( wParam == 0 && pNH->code == NM_RCLICK )
{
// Right button was clicked on header
CPoint pt(GetMessagePos());
CHeaderCtrl* pHeader =(CHeaderCtrl*)m_wndListCtrl.GetHeaderCtrl();
pHeader->ScreenToClient(&pt);
// Determine the column index
int index = 0;
CRect rcCol;
for( int i = 0 ; Header_GetItemRect(pHeader->m_hWnd, i, &rcCol) ; i++ )
{
if( rcCol.PtInRect( pt ) )
{
index = i;
break;
}
}
CString str;
str.Format("Column no: %d", index);
AfxMessageBox(str);
}
return CFormView::OnNotify(wParam, lParam, pResult);
}
any ideas?
Thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
I found It!!
BOOL CDataBaseManagerView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
//unstead of: HD_NOTIFY *pHDN = (HD_NOTIFY*)lParam;
// and: LPNMHDR pNH = (LPNMHDR) lParam;
NMHDR *pHdr = (NMHDR*)lParam;
//unstead of: if( wParam == 0 && pNH->code == NM_RCLICK )
if(pHdr->code == LVN_COLUMNCLICK)
{
...
}
return CFormView::OnNotify(wParam, lParam, pResult);
}
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi,
For Left Mouse Button, it is just NM_CLICK.
regards
~Hari~
|
|
|
|
|
Hello all,
Suppose I have a workspace with 50 files in it, and I want to print all of them. I couldn't find any 'Print All' option in the File Menu.
|
|
|
|
|
VC's IDE does not have such a feature. You'll need to use another text editor for printing multiple files.
|
|
|
|
|
Just out of curiosity, does VS .NET have this feature?
|
|
|
|
|
I've not used it so I can't say.
|
|
|
|
|
|
hi Makeover,
.NET does not have this feature.
mahes
|
|
|
|
|
Hi there, I think I need a little help with include files. Let's say I've 4 files: foo.h, foo.cpp, yak.h, yak.cpp.
foo.h has to include yak.h in order to use the classes it has. However yak.h needs a class from foo.h, let's say class bar. If I include foo.h in yak.h everything gets messed up. Can I do sth else? Can extern help me, if yes, how?
Thankx, Themis
|
|
|
|
|
well i usually get around this but not using those classes in my header file except for pointers ( i.e pointer parameters and member variables ) If you do that than all you need to do is include a class prototype for the object you are going to be using at the top of the file. If you a non-pointer variable you must use the header file because it will try to construct the object and hence require knowledge of the implementation.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
I have array of characters.I want to send it as a parameters to other function and this character may contain '0',when I do it like the code below,it only pass up to '0' character.
char c[1000];
for(int i ; i<1000; i++)
c[i] =value;
myfunc(c);
Before the last line it containcorrect value,but in myfunc() it contain only value up to '0' value.So how can I pass it correctly?
Mazy
No sig. available now.
|
|
|
|
|
What is the parameter definition of myfunc()? Does it accept a pointer to char?
myfunc(char *);
Kuphryn
|
|
|
|
|
kuphryn wrote:
What is the parameter definition of myfunc()? Does it accept a pointer to char?
myfunc(char *);
myfunc(const char szbody[]);
Mazy
No sig. available now.
|
|
|
|
|
What is the starting value for i? Hint: it ain't 0!
|
|
|
|
|
DavidCrow wrote:
What is the starting value for i? Hint: it ain't 0!
Its 0. Its just miss-typing.
Mazy
No sig. available now.
|
|
|
|
|
Miss-typing and omission are two different things:
char c[1000];
for(int i = 0; i<1000; i++)
c[i] =value;
myfunc(c);
|
|
|
|
|
maybe the problem is the declaration of myfunc(), your upper code seems alright to me...
is the declaration
myfunc(char* c) ????
is the argument a pointer?
greets,
jason
|
|
|
|
|
jason99 wrote:
is the argument a pointer?
As I said before, NO.
Mazy
No sig. available now.
|
|
|
|
|
Since arrays decay immediately into pointers, an array is never actually passed to a function. Allowing pointer parameters to be declared as arrays is a simply a way of making it look as though the array was being passed.
Therefore, any parameter declarations which "look like" arrays, e.g.
f( char a[])
{ ... }
are treated by the compiler as if they were pointers, since that is what the function will receive if an array is passed:
f( char *a)
{ ... }
This conversion holds only within function formal parameter declarations, nowhere else. If the conversion bothers you, avoid it.
|
|
|
|
|
try this:
BYTE c[1000];
for (int i=0; i<1000; i++)
c[i] = value;
myfunc(c, 1000);
and here is the definition of myfunc:
void myfunc(BYTE* p, int iLen);
|
|
|
|