|
Start debugging from yor dll project: open your project and press F5. VC will ask you to provide the path to the executable that uses your dll. Be carfull that the dll which is used by your exe (so, probably in the same dir as the exe) is the same as the dll you built.
|
|
|
|
|
If you want to debug your dll than open your dll workspace and use client application as an executable file.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hello,
Thanks for the replies
I tried debugging the dll but I get the following message.
"This application has failed to start because BaseClassesDLL.dll was not found."
I have the dll in the directory where I mentioned in my Settings for the client program.
Pritha
|
|
|
|
|
Is the path of DLL that you build and the DLL that is used by client application is same? Please check it.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
|
Thanks
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi,
There are many dialog boxes in my project. I want to know that which one is active at a certain time. For example;
CDlg1 * dlg1;
dlg1= new CDlg1;
dlg1->Create(IDD_DIALOG1,this);
CWnd * wnd;
wnd = (CDialog*)GetActiveWindow();
if(wnd == dlg1)
wnd->DestroyWindow();
I wrote this code to close the window. How can I know that which wnidow is active?
Thanks
|
|
|
|
|
You can use GetFocus() Or GetForeGroundWindow() functions.
Regards,
Sandip.
|
|
|
|
|
These are not working in my situations.I think the problem is not about GetActiveWindow(). The problem is that when I want to know if this window (active window) is the same window with the dialog box that I created before, it couldn't compare them. This part has problem I think;
if(dlg == wnd)
|
|
|
|
|
iayd wrote: CDlg1 * dlg1; // A global object for the dialog box.
dlg1= new CDlg1;
dlg1->Create(IDD_DIALOG1,this);
Since you're creating your child dialogs by passing your main dialog as parent, call GetTopWindow() by passing parent window handle . It will give you the top most window of your application.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks. That solved the problem.
|
|
|
|
|
iayd wrote: if(wnd == dlg1)
Use window handles instead of MFC objects to compare. Since MFC window objects are just wrappers around window handles.
if( wnd.GetSafeHwnd() == dlg1.GetSafeHwnd() )
;;//...
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
I am using Standard SDK 500 and EVC++ to develop my UI application.
I have added an edit box to input barcode in my main dialog window.
I want to show soft input panel on my dialog when my cursor hovers over the edit box
to input barcode .
How do I do that?
Ema
|
|
|
|
|
I have a class as...
class Log
{public:
Log(string);
void InitializeLog(string);
...
class Initialize
{ public:
Initialize(string);
void ReadPropfile(string);
....
};
};<pre>
next I am doin this...
<pre>void Log::InitializeLog(string p_path_name)
{
Initialize obj(p_path_name);
obj.ReadPropfile(p_path_name);
}
void Log::Initialize::ReadPropfile(string log_path)
{....}
From the main I call...
Log obj(path);
obj.InitializeLog(path);
...
When I compile I get the following error. How do I get rid of this
test_utility.obj :error LNK2001: unresolved external symbol "public: __thiscall Log::Log(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >)" (??0Log@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@
@std@@@Z)
properties.obj : error LNK2001: unresolved external symbol "public: __thiscall Log::Initialize::Initialize(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >)" (??0Initialize@Log@@QAE@V?$basic_string@DU?$char_tra
its@D@std@@V?$allocator@D@2@@std@@@Z)
THANKS
|
|
|
|
|
pl_kode wrote: class Log
{public:
Log(string);
forget to implement constructor for Log? Log::Log(string) ?
pl_kode wrote: class Initialize
{ public:
Initialize(string);
And Initialize::Initialize(string) too?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
how can I get data from edit control in a integer?
|
|
|
|
|
You can use GetDlgItemInt(IDC_EDIT1) function.
Regards,
Sandip.
|
|
|
|
|
Actually this is double value
|
|
|
|
|
What does that mean?
|
|
|
|
|
Then as toxcct said
You take entire string using GetDlgItemText()
and use atof(),... functions depending on your value type whatever you wanna use.
or
Using Class wizard add the data member variable for that control with appropriate data type.
and call UpdateData().
Regards,
Sandip.
|
|
|
|
|
Use atof() for converting string to double.
CString csValue;
GetDlgItem(IDC_EDIT1)->GetWindowText( csValue );
double dValue = atof( csValue );
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote: CString csValue;GetDlgItem(IDC_EDIT1)->GetWindowText( csValue );double dValue = atof( csValue );
The above code gives me error :
error C2440: 'type cast' : cannot convert from 'class CString' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
in eVc++4.
How do I solve this error.
Thanks
Terry
|
|
|
|
|
Try this.
double dValue = atof((LPCTSTR)csValue );
The previous code snippet compiles perfectly in Visual Studio 6.0. Might be you got the error because of eVc++4.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote: double dValue = atof((LPCTSTR)csValue );
Redundant cast.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
On trying you code you provided, I get :
Jijo raj wrote: double dValue = atof((LPCTSTR)csValue );
: error C2664: 'atoi' : cannot convert parameter 1 from 'const unsigned short *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
I am working with eVC++4 on WinCE MFC application. Hope to find some alternative to the problem.
Thanks
Terry
|
|
|
|