|
It is probably best if you leave the 'UpdateData ' stuff alone, declare a control variable (thats of type CEdit for a editbox and CStatic for static text) and use SetWindowText / GetWindowText on it.
This way you have the fuill control over when and what is written to your dialog.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Hi everyone,
I'm writing a program that deals with packet routing. My problem is, when my application exits, I need to renew (by using IpRenewAddress) all interfaces so that I can restore the adapters to the way it was before my program took over. This process doesn't take long UNLESS u have things like network bridges. These virtual adapters are not renewable and when my application tries to renew them, it takes forever. Is there a way for me to determine which adapter is actually renewable and which is not?
Thanks!
|
|
|
|
|
Hello All,
I'm a newbie on VC++ and i'm writing an application that able to open/close explorer.exe on the desktop. is there any method to do this??
I've done a little bit research, is it prossible to use WIN32 APIs like 'GetWindow()', 'FindWindow()' and 'DestroyWindow()' , if so, how to obtain the explorer's handle . Or other easier way to do it .
Thanks in advance.
|
|
|
|
|
|
|
ShellExecute(handle, "explore", <fully_qualified_path_to_folder>, NULL, NULL, SW_SHOWNORMAL);
will open it for you
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
|
If you want to Open and then Close explorer you can use
CreateProcess to Open
which will return a HANDLE
using that handle you can close the explorer
using TerminateProcess
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Thx your suggestion, but i want to Close all explorer before the application update something and then open the explorer again.
i followed Bryce's suggestion and i can open the explorer but this is after. now i'm trying to get the handle/s of those windows explorer on the desktop and than close it.
i'm trying to use 'FindWindow()' and 'GetWindowText()' but with no luck. do you have any comments or suggestions.
thanks in advance.
|
|
|
|
|
How can i set a bitmap image as the background of a list box so that on scrolling, the listbox's background image remains still?
|
|
|
|
|
Derive a class from listbox and handle
OnEraseBackground
and paint the BMP
might work
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
hey thanks for your idea it works but all the items in the list box draw again and agin and it produces a flicker.
|
|
|
|
|
How can i send a file from one application to other?
|
|
|
|
|
If you are writing both applications, you might want to look at DDE, which was designed specificaly to solve this problem.
INTP
|
|
|
|
|
|
I am trying to get an '&' character into the text of a button control, I can do this from the resource editor ok using "&&" but not programatically, i.e.
btn.SetWindowText("Save && Exit");
doesn't work?! (nor does using just a single &)
|
|
|
|
|
Try this:
CString csTemp;
csTemp.Format(_T("Save \x26 Exit"));
btn.SetWindowTexct(&csTemp);
INTP
|
|
|
|
|
Never mind I found the problem... it does actually work using "&&" in the string if you use a standard button control, but the custom button control I am using apparently is not handling the & correctly.
thanks anyway.
|
|
|
|
|
Hello,
I developed an ActiveX control for Internet Explorer. I need that control to call JavaScript / VBScript functions on its hosting HTML page.
I looked for information about this in the internet, but haven't come up with something truly useful so far.
Any pointers?
Thanks in advance!
|
|
|
|
|
Search MSDN for "VBScript ActiveX accessing" you should find approximatly 162 aticles. The article ActiveX (partial book) looks like it might provide the answer you are looking for.
INTP
|
|
|
|
|
Thanks for the reply!
Unfortunately, I couldn't find any entry that resembles "ActiveX (partial book)". Can you please give me a direct link?
Thanks!
|
|
|
|
|
It should be on the MSDN CD, I dought that it could be found via the internet.
INTP
|
|
|
|
|
Hello,
Just after adding a new class CDailyListView based on the CListView class, I get the following errors... this one has me stumped, but I'm sure it's some simple and stupid solution. I've tried rebuilding all files to no avail. Another working program I have doesn't have any #includes at the top (to find the CListView class in MFC). Thanks! JennyP
<br />
DailyListView.cpp<br />
c:\documents and settings\mahafjp\my documents\programming\goals1\dailylistview.h(14) : error C2504: 'CListView' : base class undefined<br />
c:\documents and settings\mahafjp\my documents\programming\goals1\dailylistview.cpp(17) : error C2440: 'return' : cannot convert from 'class CDailyListView *' to 'class CObject *'<br />
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast<br />
c:\documents and settings\mahafjp\my documents\programming\goals1\dailylistview.cpp(17) : error C2653: 'CListView' : is not a class or namespace name.<br />
etc....
Here's the code:
<br />
#if _MSC_VER > 1000<br />
#pragma once<br />
#endif // _MSC_VER > 1000<br />
<br />
<br />
class CDailyListView : public CListView<br />
{<br />
protected:<br />
CDailyListView();
DECLARE_DYNCREATE(CDailyListView)<br />
<br />
public:<br />
<br />
public:<br />
<br />
etc.....
|
|
|
|
|
I am not quite sure if this will fix your problem but is afxcview.h included anywhere in your project? If not, try including it in your stdafx.h file.
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
I can think of 3 possibilities: 1) you included CDailyListView.h before stdafx.h, 2) your source file did not include stdafx.h, or 3) AfxCView.h is not included for some reason.
Possible solutions:
1) Make sure stdafx.h is the first file included at the top of the source file.
2) Since it is some times difficult to determine all the headers files included indirectly thru other header files, you could manualy add AfxCView.h to the stdafx.h. (recomended)
3) You could include AfxCView.h in your header file before the class definition.
INTP
|
|
|
|