|
No...i don't have any member for the child one.
So thank u once again Mr.Yaron
ajeesh
yours faithfully
|
|
|
|
|
Why are you attaching it to the this class?
You can simply call pWnd->PostMessage( WM_CLOSE );
I wonder how it is working!
- NS -
|
|
|
|
|
If you are creating a child dialog you would be creating the pointer for that for that child dialog in Parent class.
So use hat pointer and call DestroyWindow()
Cheers
"Peace of mind through Technology"
|
|
|
|
|
No...i don't have any member for the child one.
So thank u once again Mr.Yaron
ajeesh
|
|
|
|
|
so can you explain how you are creating the child dialog
Cheers
"Peace of mind through Technology"
|
|
|
|
|
hi
how can i know which running process holds how much physical memory
right now.how can i write the code which will detect the memory amount
of a running process.please help me.
thanks in advance
nirmal
|
|
|
|
|
Please take a look at GlobalMemoryStatus in the documentation.
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I need to know the memory status of indivisual process
nirmal
|
|
|
|
|
ok, look at GetProcessMemoryInfo
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
|
i am trying to create a method in Visual studio C++ / MFC, i have been playing around with it for a few months now and never needed to create a new method to call untill now.
i tryed looking at C# to get a few ideas ( yes i know the are different )
i have looked a few places on this site and through google and still can not find what i need ..
to be exact on what i need i have a combobox that when the selectedIndex is chosen then it will call a calculation method
in C# would be like this ( i know C# better, and makes it easy for me to show an example what i am trying to do )
//Calculation Method
private void Calculation()
{
//calcuate the information
}
private void combobox_SelectedIndexChanged(Object sender, System.EventArgs, e)
{
//calling the calculation method
Calculation();
}
Thank you for your time!
Nate
|
|
|
|
|
Double-click on the ComboBox control on the dialog box editor, the wizard will generate you an event handler function.
And then right-click on that ComboBox control again on the dialog box editor, choose Add variable on the context menu, and the Class Wizard pops up for you to name your variable, say m_ctrlCombo for example.
Now back to the event handler,
void CMyDialog::OnMyComboClicked(...)<br />
{<br />
int iSelection = m_ctrlCombo.GetCurSel();<br />
if(CB_ERR != iSelection) {<br />
Calculation();<br />
}<br />
}
Maxwell Chen
|
|
|
|
|
simple implement the message CBN_SELCHANGE (look in the documentation)
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
i have all the of that, my combobox is all set up what i need is to create a custom method and within this custom methed will be some calculations. and when ever i need the the calculations i can just call that method instead of repeating the same calculations over and over.
thank you for your time
I asked for a mission, and for my sins they gave me one.
|
|
|
|
|
I have a problem with using function poiter. My program has two parts:
part 1: mydll.dll
typedef BOOL (*SpeakFunc)(const CString s);
#define DLL_EXPORT __declspec(dllexport)
BOOL DLL_EXPORT Init(HWND hwnd,SpeakFunc func)
{
...
}
part 2: adding the mydll.lib of the part 1 into the project of the part 2
in the test.cpp file of the "Test" class
typedef BOOL (*SpeakFunc)(const CString str);
extern BOOL Init(HWND hwnd,SpeakFunc func);
BOOL CTest::Speak(const CString)
{
...
}
void CTest::TestMethod()
{
...
Init (NULL,&CTest::Speak) ; // the compiler notices an error here
...
}
The error message like below:
"error C2440: 'initializing' : cannot convert from 'int (__thiscall CTest::*)(const class CString)' to 'int (__cdecl *)(const class CString)'
There is no context in which this conversion is possible"
please help me...Thanks a lot.
|
|
|
|
|
In "part 1" you declare SpeakFunc as a global function but in "part 2" you attempt to pass a pointer to a member function.
Steve
|
|
|
|
|
|
Hai
How Can Run a Batch file ? as We can do with ShellExecute()/CreateProcess()/System()is there any method
so i can run a batch file .
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
system() is ok if you don't want to keep track it till the end of the tasks in the batch file.
Otherwise you had better choose other approaches.
Maxwell Chen
|
|
|
|
|
You can run a batch file exactly like any other executable...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
ShellExecute() is probably the best way, since it will automatically look up the .bat association and run cmd.exe or whatever your command processor is.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I am trying to get my program to accept the data from an internet source, like a webpage or a java applet. Can somebody refer me to a tutorial? I don't even know where to begin!
Thanx...
Aurora
|
|
|
|
|
Do you need to download file
|
|
|
|
|
Please look at CHttpFile in the documentation
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
You can use IHTMLDocument2 Interface to read the file content in the HTML form
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|