|
AfxGetApp()->m_pMainWnd->SetWindowText
|
|
|
|
|
AfxGetMainWindow ( from memory, could be AfxGetMainWnd() ) would do the same thing, but I can't imagine why someone 1 voted you for that....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
yes AfxGetMainWindow i wanted to wrote it but do you know why after four minutes i cant use from codeproject.
I imagine if you write it you get 5 vote
|
|
|
|
|
I got error at
ASSERT(::IsWindow(m_hWnd)); if debug i got unhandled eception
is there any other way?
|
|
|
|
|
Where you use this code and what application type?
|
|
|
|
|
I used it in CMainFrame::OnCreate()
And my Application type is SDI
|
|
|
|
|
You can use this function in your form class(for example if you have CFormView class) now is your problem solve
|
|
|
|
|
Hi Everybody,
I have been doing an application which displays the files and folders in a tree control similar to the left view of the windows explorer .How can we rename and delete the existing folders in the system directory from the application itself.
Thanks in advance,
Radhika.
|
|
|
|
|
radhika28 wrote: How can we rename
Use rename() / _wrename()
radhika28 wrote: How can we delete
To delete the file you can use
RemoveDirectory() or SHFileOperation()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
radhika28 wrote: How can we rename and delete
use SHFileOperation() for deleting or renaming a folder
nave
|
|
|
|
|
|
Hi,
Is there any article based on the above requirements.
Thanks in advance,
Radhika.
|
|
|
|
|
You dont need to any article you can see MSDN
|
|
|
|
|
Hi,
I am trying on that.But one more problem what i am having is i am getting an assertion error when i click the particular button to display the directory tree in my tree control.When i click ignore 4 times the tree is displayed in the tree control.I am trying for this since 4 days.Can any one help me on this.
Radhika.
|
|
|
|
|
I think its a new problem and does this error is after remove file/folder?also what error ?
|
|
|
|
|
Hi,
This problem is from the starting.I am trying for this for the past 4 days.It is occuring during the loading of the directory tree into the system drive.When i debug the error is coming at the following line,
if ( m_tree.SubclassDlgItem( IDC_TREE1, this ) )
Radhika.
|
|
|
|
|
SubclassDlgItem subclass your control that created and attach it to CWnd (and a thing did you trace to trace your app and what is it?)
|
|
|
|
|
This is what I like to achieve:
1. Copy the selected text from active window such as notepad
2. Modify the text
3. Send back modified text to the active window and replace the selected text in that window.
step 1 can be achieved by monitor the clipboard while user
copy the selected text into the clipboard. But not sure how to paste back the modified text into that window again.
Any ideas will be appreciated.
www.sqlparser.com
|
|
|
|
|
Do you want to send a text to notepad?
|
|
|
|
|
|
<br />
ShellExecute(NULL,"open","notepad.exe",NULL,NULL,SW_SHOWNORMAL); <br />
HWND hNoteWnd=::FindWindow("Notepad",NULL); <br />
::SetWindowText(hNoteWnd,"TEST");<br />
|
|
|
|
|
the case of GOLF playing, i want to trace the Golf Ball dynamically. can you please help me to send the path finding Algorithem or any source code?
thanks
arifreza007@yahoo.com
Arif
|
|
|
|
|
What exactly do you want to do? A path finding algorithm will find the shortest path between two points, usually around obstacles or through a maze. This doesn't really apply to a golf ball since it will always go in a straight line.
|
|
|
|
|
There are two c types, one is:
if(...)
{
...
}
else
{
...
}
the other is:
if(...){
...
...
}else{
...
...
}
Witch one do you prefer? And why?
Hi guys. I'm a very man. Do you like fat men?
|
|
|
|
|
We prefer the following because it has got more readability than the other
if(...)
{
...
}
else
{
...
}
Rinu Raj
|
|
|
|