|
I write a view from CHtmlView to display a html file. But the file is very large. I should pagedown many times to the end.
My problem is how can the view remember the line I read last time? Next time I open the view it should goto the line I read last time.
|
|
|
|
|
Create an anchor <a name="..."> in your html file.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Hi, Is there any way of retrieving the process/module version through the PSAPI?
Thanks in advance
Black ghost
|
|
|
|
|
No, PSAPI is not meant for that.
Once you've got the process name, just use the ::GetFileVersionInfo to get what you're looking for.
Note : you will have to include <winver.h> in your code, and link with version.lib.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Hi. I've read that the "MS Shell Dlg" font refers to the system-wide font used in menus, edit boxes, etc. How do I create a CFont object for that font? I'm trying to dynamically create a CEdit control which uses the basic "MS Shell Dlg" font.
Thanks,
Dave
|
|
|
|
|
Daaave wrote:
How do I create a CFont object for that font?
You can't. "MS Shell Dlg" is not a real font; it is a special name recognized only by the OS code that parses dialog templates. To get the font used for dialogs, call GetStockObject(DEFAULT_GUI_FONT)
--Mike--
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Sweet thanks man
|
|
|
|
|
I have a Web Browser control and want to download external files like images, *.css, *.js and etc.
The SRC attribute of <IMG> <LINK> <SCRIPT> can contains absolute and relative URLs. How to correctly obtain full URL for these files? May be there is a ready system function to download such files? I tried URLDownloadToFile, may be I must try URL monikers?
Thanks!
|
|
|
|
|
window.location.href is the actual URL. Just parse this, and add your resource name.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Well, I finally got a hold of Visual Studio .NET and now I'm trying to rebuild my DLLs which contain a bunch of MFC-based classes. I'm getting tons of errors, the first of which I don't have a solution for.
I have a string class which derives from CString and uses the old m_pchData protected member from 6.0. So now since apparently it's no longer in CString, I get a 'm_pchData' : undeclared identifier error.
What should I do? My class needs the equivalent of this member variable.
Thanks,
Alvaro
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|
|
|
Unfortunately the MFC7 CString uses STL : typedef ATL::CStringT< TCHAR, StrTraitMFC< TCHAR > > CString; .
You may just as well extract the CString implementation from the MFC6 classes.
(afx.h + strcore.cpp)
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
why were you trying to use a protected member?
for read, CString has an LPCTSTR operator, and for write you can GetBuffer() to get an LPTSTR pointer. You should use those, because that is the designed interface of CString.
Signature space for rent. Apply by email to....
|
|
|
|
|
Hi,
I've got direct CD installed on an SOE environment, and I would like to automate the formatting of CDRW's using the tool provided, but it looks like it's a shell extension.
Has anyone got any snippets of code which demonstrate the capture of a shell extensions function??
OR .
Is there a better way to format these discs.. I've looks at the UDF article here, but the app just doesn't seem to want to work with these disks/writers.
Please help
|
|
|
|
|
hey all, in my message map i catch and process ON_MESSAGE(WM_SETCURSOR, onSetCursor) and all the onSetCursor does is this:
if (waitCursor)
SetCursor(LoadCursor(NULL, IDC_APPSTARTING));
else
SetCursor(LoadCursor(NULL, IDC_ARROW));
when compiled in debug version everything works fine, but when compiled in release mode whenever the mouse goes over the app, therefor calling WM_SETCURSOR the program just crashes. Anyone got any ideas on how to fix this? thanks
Luke.
|
|
|
|
|
Sorry i forgot to mention that when i comment out ON_MESSAGE(WM_SETCURSOR, onSetCursor) release mode works fine and that why i'm pretty sure that it is that stuffing it up.
Luke.
|
|
|
|
|
Change ON_MESSAGE to ON_WM_SETCURSOR. The OnSetCursor handler must have the prototype BOOL OnSetCursor(CWnd*, UINT, UINT), whereas ON_MESSAGE describes a handler that has a prototype LRESULT MyHandler(WPARAM, LPARAM).
When the function is called, it is expecting a different number of parameters, and so the stack is getting screwed up - because of the different ways that the stack is managed in debug and release modes, this generally only shows up in a release build.
Dave
|
|
|
|
|
thanks that stoped it from crashing at startup, but now it works fine but when i exit the program then it brings up the this program has crashed message. any ideas?
Luke.
|
|
|
|
|
I know you can sort listboxes ascending with the LBS_SORT style but is there anyway to sort them descending?
Thanks.
- monrobot13
|
|
|
|
|
There's a "descending" style you can use. Not sure what it is, but you can find it out by selecting "descending" in the resource editor and looking at the .rc file.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
As far as what I've seen (I just checked the resource editor) you can only select a descending order in a CListCtrl , but I haven't seen anything for a CListBox . If there isn't one that's just fine but if there is that would be great.
- monrobot13
|
|
|
|
|
Argh! I need more sleep! Sorry, I was thinking CListCtrl . Hmm, now that it's been mentioned, why not use it instead of CListBox ?
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Hmm, now that it's been mentioned, why not use it instead of CListBox?
To tell the truth I'm not really sure of the difference between the two so I just chose the listbox since all I need to do is display a list of items.
- monrobot13
|
|
|
|
|
A CListCtrl is a much more powerful form of CListBox . I prefer it over the circa Windows 3.1 list box implementation.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Alright I guess I'll switch the conrol over to a CListCtrl
Thanks!
- monrobot13
|
|
|
|