|
Hi,
Where did u added. Add in CMyclass.cpp ie where u added the CMyDialog.h
Its working for me.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Well, i dont have the code with me right now...
I'll try it and tell you tomorrow.
Thanks a lot, man. Thanks for the help.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi Cool Ju,
It was just a silly fault on my part.
i am extremely sorry about the whole matter.
During the initial phase, i had commented out the resource.h file.
Moreover, i had declared one function in MyClass.h but forgot to define it in MyClass.cpp. That gave a linker error and showed the mangled names of the function. Since the names were not so clear, i skipped reading it everytime.
Yesternight, i looked more closely to the error and read each line of it then realised my mistake.
Thanks for all the help.
And, sorry that i bothered you.
Thanks a lot!
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
I think IDC_MY_DIALOG ist not defined.
Did you include resource.h in your Source ?
Is there a Dialog with this ID in your resource ?
|
|
|
|
|
HI Karle,
Thanks for the help.
I had commented out "resource.h" in "stdafx.h"
Moreover, i forgot to define a function which i had declared in the header file. The linker error was so confusing that i wasn't able to understand the actual problem.
Now its working...
Thanks for the help.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi guys,
When I try to link a DLL I get this error message.
Cannot Find TestDLL even with argument lookup.
TestDLL is a function defined in the dll.
I am a newbie to DLL. I have done it in other languages but not in VC. Can somebody tell me how to go about this.
Also kindly tell me the basic steps for working with a DLL.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hi,
How r u linking the dll (explicitly - lib or implicitly - run time loading)
Check this[^] for tutorials
Bye
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Runtime linking
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
For Runtime Linking are you calling LoadLibrary(..) and GetProcAddress api?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Could you tell me your Flow... are you using LoadLibrary and GetProcAddress Api to dynamically load dll?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am using neither of them.
I just included the necessary files and then the library path in project settings.
I don't if I am right.
Will need help.
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Here A Small code that will demonstrate dynamically loading of function from DLL.here, I will load mciSendString defined in WINMM.DLL .
// first make Function pointer
typedef MCIERROR (WINAPI * MCISENDSTRING)(
LPCTSTR lpszCommand,
LPTSTR lpszReturnString,
UINT cchReturn,
HANDLE hwndCallback
);
/// In function where you want to use about api
MCISENDSTRING fnmciSendString=NULL;
HMODULE hLibrary;
// load the library
hLibrary=LoadLibrary(_T("winmm.dll"));
// check is library loaded
if(hLibrary)
{
// if yes try to get Function addressfnmciSendString=(MCISENDSTRING)::GetProcAddress(_T("mciSendString"));
}
// check is we got Function Pointer
if(fnmciSendString)
{
// if yes call function
(fnmciSendString)(......);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks
<marquee direction="up" height="30" scrolldelay="1" step="1" scrollamount="1" hspace="0" vspace="0">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Help me. I write a UDP/IP transfer file programe,but don't transfer,Who can help ? Please leave Email , i'll talk about with UDP/IP transfer file.
i use MFC c++
........
-- modified at 3:12 Monday 21st November, 2005
|
|
|
|
|
::SetCursor(::LoadCursor(NULL,IDC_WAIT));
m_pMenu->TrackPopupMenu(TPM_CENTERALIGN,p.x,p.y,pParent,NULL);
::SetCursor(::LoadCursor(NULL,IDC_ARROW));
I wrote this code, it doesn't work correctly.
|
|
|
|
|
Try to use BeginWaitCursor
=================
Enjoy Programming
|
|
|
|
|
You can use the CWaitCursor (MFC) class. It's very simple to use.
I.e:
CWaitCursor wait;
|
|
|
|
|
I have a feeling the cursor handling used by TrackPopupMenu to show the selected item in the menu is overriding your SetCursor() call.
Software Zen: delete this;
|
|
|
|
|
I would like to know how to scroll the Edit box without flash?
In my condition, I need to keep the Edit box at the last row, so I need to scroll the Edit box after any update of the Edit box. This is my code:
if (m_LC_STATUS.GetLineCount()>11)
{
PKTstr=PKTstr.Right(PKTstr.GetLength()-m_LC_STATUS.LineLength(0)-2);
}
SetDlgItemText(IDC_LC_STATUS, PKTstr);
m_LC_STATUS.LineScroll(m_LC_STATUS.GetLineCount()-1, 0);
When I use this code, the Edit box is flash during update it.
Please help!
|
|
|
|
|
You can use CEDit::SetSel to select the last letter, and then clear the selection
=================
Enjoy Programming
|
|
|
|
|
Still the same because
SetDlgItemText(IDC_LC_STATUS, PKTstr);
Set the text into the Edit box at the beginning, then the SetSel or Linescroll move the display to the end.
So the display flash!
Please help!
|
|
|
|
|
Hi Everybody,
I have a list control in a CDialog, which is a member of the main CDialog, as follows.
class CMainDlg: public CDialog
{
CMyDialog mMyDlg;
}
class CMyDialog: public CDialog
{
CListCtrl *mMyListControl;
}
mMyListControl->InsertColumn works fine, but m_MyListControl->InsertItem doesn't work. It takes the program to CListCtrl::DrawItem and stops, because I haven't provided override for the DrawItem method. If I move mMyListControl to CMainDlg, then InsertItem seems working fine.
My questions are: Why does IntertItem not work? Is there a easy way to solve the probelm other than providing overide for the DrawItem method?
Any suggestions would greatly be appreciated.
Kevin
|
|
|
|
|
Do you check the own draw style in resource?
Try to check it off.
GL.
|
|
|
|
|
Many thanks, GL. I am relative new to VC++. Could you please provide some more details, or where can I find the relavent information? Thanks.
Kevin
|
|
|
|
|
Hi GL,
I tried your suggestion and it worked. Thank you very much. I spent fairly some time and couldn't figure the problem out but now the problem is solved with your help.
Have a nice evening.
Kevin
|
|
|
|