|
error LNK2001: unresolved external symbol "class DIR_320 * dir_320" (?dir_320@@3PAVDIR_320@@A) D320_DIS.obj.
error LNK2001: unresolved external symbol "char * ASTERIX" (?ASTERIX@@3PADA) D320_DIS.obj
I am getting the above errors while building my application. Class DIR_320 is in dircomm.h and it is included in D320_DIS.cpp where it is referenced.
Can any one provide solutions on how to fix these?
|
|
|
|
|
I resolved it. I declared the variables as extern. After removing extern in the variable declaration it built successfully.
|
|
|
|
|
Great!
Maxwell Chen
|
|
|
|
|
You say the class DIR_320 is coded in D320_DIS.cpp, but where is dir_320 ?
Iain.
|
|
|
|
|
That'll teach me to look at the forum, go away and do some actual WORK for a while, then answer a message...
Iain.
|
|
|
|
|
dear all,
I want help from you . I want to copy my mails which are in mailbox to the text file by program is anyone help me how can i do .
warm regards,
vaibhav
|
|
|
|
|
My app CreateRemoteThread in other apps.
In the remote thread proc, call to GetWindowText fails,
but SetWindowText works.
What's the problem?
Thanxxxxxxxxxx
modified on Friday, January 04, 2008 4:19:12 AM
|
|
|
|
|
According to MSDN, GetWindowText is not able to get window text of other process.
Maxwell Chen
|
|
|
|
|
I call it in the thread, and the thread is created in that process using CreateRemoteThread
|
|
|
|
|
In MSDN description:
CreateRemoteThread creates a thread runs in the virtual address space of another process.
Maxwell Chen
|
|
|
|
|
Yes, so GetWindowText runs in another process (A) too, What I do is to get the text of window in A. But it still fails.
|
|
|
|
|
I suggest you to implement a user message handler in process A. And B sends the user message to A. Let A's message handler to do the job to get window text.
Maxwell Chen
modified on Friday, January 04, 2008 6:57:37 AM
|
|
|
|
|
Have you tried sending a WM_GETTEXT message instead?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What was return value of GetWindowText?
|
|
|
|
|
Hi All,
I've the following requirement.
I've an SDI application and an ActiveX component.I need to load the activeX component in the view of the SDI application. That is, host the ocx in a view. The ocx component GUI looks like a dialog having certain controls.When I open a view in the SDI application, I should be seeing the dialog which is nothing but the ocx.
How do i develop the ocx component. Should this be a dialog? how do I host the ocx in the view.?
Please help me.
Thanks in advance,
Yeskay
|
|
|
|
|
Why do you need to create and host an ActiveX resembling a Dialog when you can simply use directly a Dialog to the purpose?
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.
[my articles]
|
|
|
|
|
The ocx is common component which will have many functionalities. this can be used by many applications. so, creating the dialog and handling it in all the applications is not acceptable.
|
|
|
|
|
If you haven't yet developed you ActiveX (taht was my impression when I read your OP) then you have the chance to separate off the "many functionalities" from the UI and go on with a simpler design. On the other hand, if you've already developed it then use MFC support for ActiveX controls.
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.
[my articles]
|
|
|
|
|
Congratulation CPallini .
|
|
|
|
|
And, again, best wishes.
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.
[my articles]
|
|
|
|
|
I'm not very good in ActiveX implementation. So, I dont know what MFC supports for activeX. I just wanted tyo know if anyone had tried such funtionality that I've asked.
I've seen some activeX controls getting loaded in the view, but i cannot understand how.
Anyway, thanks for the replies.
|
|
|
|
|
Yeskay wrote: I just wanted tyo know if anyone had tried such funtionality that I've asked.
I've seen some activeX controls getting loaded in the view, but i cannot understand how.
Well, I made a little test (using the standard ActiveX Calendar Control ) and it is not such a difficult task. I made the following steps (VS2005):
(1) Create an MFC SDI project (support for ActiveX controls is enabled by default)
(2) Select Project->Add Class menu item and then choose (in the appeared dialog) MFC->MFC Class From ActiveX Control , finally click Add button.
(3) Select Calendar Control in the list of available Active X Controls (in the newly shown window), then select needed interfaces (Calendar Control has only one available), finally click finish button.
Now the class wizard creates a class wrapping the ActiveX Control , and you can use such class. Hence, in the view source code:
(4) Include the created class (for me was CCalendar ) header (again it was Calendar.h )
(5) Add a member variable to hold an instance of the class (I used CCalendar * m_pCalendar; )
(6) Override CView::OnInitialUpdate method and inside it create an instance of the class and the call its Create method, for instance, I made
m_pCalendar = new CCalendar();
RECT rc;
GetClientRect(&rc);
m_pCalendar->Create(_T("Calendar"), WS_VISIBLE, rc, this,100);
(7) Enjoy the calendar control (and don't forget cleanup)
I'm sure you're able to adapt the above scenario to your needs, but
please note this was a quick experimental attempt, maybe there are better ways to accomplish the task.
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.
[my articles]
|
|
|
|
|
Thanks for the help.
But, how the ocx should be created? Is there any design aspect to be taken care? Because, for some ocx, we can see only the ellipse/circle when we do like above. We are not getting the ocx component with all its functionality.
May be this is a stupid question...But, I dont understand how the ocx's are created to get show the component when we host in view.
|
|
|
|
|
Does your ActiveX work? I mean, if you put it, for instance, inside a very simple VB6 container, do you see all the GUI magic?
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.
[my articles]
|
|
|
|
|
I'm able to implement as per my requirement(with controls in the dialog).
Thanks a lot for your comments
|
|
|
|