|
I want to load all images from a folder. I can used CFineFile to search all the files in the folder. But the CImage.Load function does not read the directory function, so I have to change the current working directory before loading the image.
|
|
|
|
|
either use full path name by merging the directory name with the filename, or you can use BOOL SetCurrentDirectory( LPCTSTR lpPathName); to change the current working folder
the first method is preferable.
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Do you need to GetCurrentDirectory and SetCurrentDirectory or you need to FindFirstFile for read files
|
|
|
|
|
I did check all the functions yesterday but I just couldn't find the SetCurrentDirectory. Anyway, it works today. Thank you all guys.
|
|
|
|
|
SetCurrentDirectory might be confusing to the user. Consider using PathCombine to get an absolute, rather than relative, path.
|
|
|
|
|
|
why am i getin error when declaring control variables through ddx
|
|
|
|
|
arshadkc wrote: why am i getin error when declaring control variables through ddx
what error?
How are you going along with the declaration of variables?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Error is Memory could not be read
I'm tryin to declare variable for a button through class wizard
|
|
|
|
|
You get this error on all your projects or in this project
|
|
|
|
|
ya most time i am getin this error in my other projects also
but when i'm not declaring variable through ddx i am not getin error here
|
|
|
|
|
show off a piece of the code you wrote...
|
|
|
|
|
In debug mode i am getin error as unhandled exception and accec violation at statement
lResult = pWnd->WindowProc(nMsg, wParam, lParam);
in funtion AfxCallWndProc
|
|
|
|
|
What error (e.g., compiler, linker, exception, assertion)? What does the DDX statement look like? Is the variable present in the class' definition?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
// Dialog Data
//{{AFX_DATA(CGCU)
enum { IDD = IDD_DIALOG_GCUAPP };
CButton m_ImuRecord;
CString m_ImuAzimuth;
//}}AFX_DATA
void CGCU::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGCU)
DDX_Control(pDX, IDC_BUTTON_IMU_REC, m_ImuRecord);
DDX_Text(pDX, IDC_EDIT_IMU_AZ, m_ImuAzimuth);
//}}AFX_DATA_MAP
}
there is no error when i declare a ddx_Text only for controls i'm getin error
|
|
|
|
|
I think the 11-year sunspot cycle is nearing its most active point right now...
|
|
|
|
|
I want to handle Desktop menu context, the menu is shown when you rightclick on every blank point on the Desktop. Could you tell me how to do that please?
Thank you in advance!
|
|
|
|
|
|
Yes, thank you very much! I admire you and your work!
By the way, I want to ask for one thing more. I have a dialog. When I right click on that, I want to show Desktop menu context as well as add my own menu item. Could you be kind enough to help me please? Thank you very much!
Have a nice day!
|
|
|
|
|
Check out Raymond Chen's series of posts on hosting a context menu, starting here[^]
|
|
|
|
|
Many thanks to you. I will read it. Have a nice weekend!
|
|
|
|
|
Hi there,
I would like to know if I can call the destuctor explicitly in case of
containership.
Lets consider an example:
class A
{
public:
~A()
{
cout <<"~A()"<
|
|
|
|
|
There's no need of calling the destructor of A explicitly. Since the object of class A is being created in B, after the destructor of B get's called the destructor of class A is also called.
#include <iostream>
using namespace std;
class A
{
public:
~A()
{
cout <<"~A()"<<endl;
}
};
class b
{
a="" a;
public:
~b()
{
="" cout="" <<="" "~b()"="" endl;
="" a.~a();="" try="" uncommenting="" this="" line
="" please="" pay="" extra="" concentration="" here..
}
b()
{
="" cout<<"b's="" constructor\n";
}
};
void="" main()
{
="" b="" b1;
="" *b="new" b();
="" do="" something="" here
="" delete="" b;
}=""
=""
<div="" class="ForumSig">Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Raj Prathap wrote: In the above case should the destructor of A be called explictly? If I dont call, the destructor for A is never called.
Thanks in advance,
Pratap Reddy
No, It will be called before B's d'tor.
|
|
|
|