|
It is probably the KeyUp message which is causing the beep. ie. It is going to the Menu. Have you tried using NM_RETURN instead. Failing that you could add a PeekMessage loop and wait for the KeyUp message before calling TrackPopupMenu.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Has anyone else tried the new CHTMLEditView class in MFC 7.0?? I have been trying to use its method GetDocumentHTML(), which basically takes the HTML of the browser document and puts it in a CString. I find I get access violation errors when I use the method, especially when I have previously pasted in a large amount of text.
I thought it must be me, but I then went to look at the sample Microsoft includes with Visual C++ .Net Standard, called HTMLEdit. I was able to reproduce the same error there, erroring on the one call there is to GetDocumentHTML().
I would be interested in knowing if anyone else has had this problem. How does one notify Microsoft about such an issue??
Paul Trimming
|
|
|
|
|
trimtrom wrote:
I find I get access violation errors when I use the method,
Me too. Navigating URLs often throws such exceptions. I am not sure about it at that point, but I believe that's because of IE being used as an ActiveX instead of a stand alone app. There are a lot of other known side effects too.
|
|
|
|
|
Thanks for your reply. I am relieved that you get the same error!
Have you got any suggestions for curing the problem, or is it beyond help?
Hopefully,
trimtrom
|
|
|
|
|
I am trying to write an application that takes an input of .ppm files and filters the image according to RGB values. The CBitmap class provided by C++ doesn't account for the different displays on different computers, so when I open a .ppm file on my application, the colors in the pictures are wrong. Is there some sort of routine which can take into account of all the different types of display format on the computer screen (eg. 16 bit color, 8 bit color, true color etc)?
|
|
|
|
|
M Lai wrote:
. Is there some sort of routine which can take into account of all the different types of display format on the computer screen
Yes, and IIRC it's called ICM (Installable Color Mapping I believe). It's not something you want to casually do, but it seems you need it.
Note: You'd obviously need minimum 24-bpp displays for this. If not, you could just use plain windows color mapping, of which there are numerous MSDN and Win32 SDK examples).
|
|
|
|
|
Sorry, but I am a bit lost on this. What part of the library are the ICM routines, and how would I use it?
|
|
|
|
|
Sorry, but I am a bit lost on this. What part of the library are the ICM routines, and how would I use it?
|
|
|
|
|
Hi,
I want my MyView to appear at x,y = 1,20 and be 1280
pixels wide and 800 high when it initially appears.
I believe this is the code to move and size it ...
<br />
CFrameWnd* pParentFrame = GetParentFrame();<br />
ASSERT_VALID( pParentFrame ); <br />
pParentFrame->MoveWindow( 1, 20, 1280, 800 );<br />
... but what method should I put this code in?
If I put in MyView::OnDraw everytime the View
needs to be re-drawn it moves and resizes. I
just want it start and 1,20 initially.
|
|
|
|
|
You can set the initial size/position in PreCreateWindow() .
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
ok i'd like to do either one of the following:
1) have like 4 or 5 different views (an text view should be able to be splitted in 1 or 2 or 4 panes or such) and be able to switch between those views
this i have done except for the splitter, and since splitterwnd isn't a View, i can't AddView it, and since the insidep views of the splitter ARE views, i dont know how to handle those, can someone help??
2) have one splitter which can split 1, 2 or 4 panes, and be able to change between a text view and a couple of other views... this seems easier but then again, i have a button bar control that changes the views, and i'd like if anyone could help me figure out how to manage that
also the problem is that there's a lot more views now, and i'm a complete mess with figuring out how to deal with those
really, im in search of an example of view-switching w/ splitters or an MFC pro to give me some help w/ figuring out how to manage the views in some of these cases
and i have already tried various MSDN samples, the two SwitchToView examples on CodeProject, etc. but have had no luck because of the splitter
- Roman -
|
|
|
|
|
Hello,
How can i get the list of files from a path ?
for example: C:\Ali
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
In MFC you can use CFileFind class to fill the list using FindFile, FindNextFile methods.
In WIN32 use the API functions FindFile and FindNextFile.
Pavel
Sonork 100.15206
|
|
|
|
|
Thanks alooot
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I have list of a big object.The approximate elements of this list is expected to the tune of 10,000,000-99,000,000.
Now if I have to use only part of this big list in another object.
Would it be advisable to use a list of pointers to this list section or use a list of the index values of the section?
It sounds confusing !!
Inshort how much memory does a pointer takes? Is it dependent on the size of the object being pointed to?
How much memory does a pointer need? like an integer needs 1 byte etc....
|
|
|
|
|
Anonymous wrote:
how much memory does a pointer takes?
in Win32, the pointer itself takes 4 bytes (32 bits).
I'm not the droid you're looking for.
|
|
|
|
|
How big are the instances?
Needs this big list to be whole in memory?
Have you considered using a database?
Will be the elements deleted or reordered at runtime (the pointers or indexes could become invalid by concurrent access)?
The indexes would be unefficient if you implent the list as a linked one.
Anonymous wrote:
Inshort how much memory does a pointer takes?
It depends on HW platform - on Intel's IA32 it's 4 bytes.
Anonymous wrote:
Is it dependent on the size of the object being pointed to?
No, it's only adress in memory.
Anonymous wrote:
How much memory does a pointer need? like an integer needs 1 byte etc....
size of an integer depends on platform and type. Size of int type depends on platform. You can use types as BYTE, WORD, DWORD ... of deterministic size.
|
|
|
|
|
In 32-bit windows (Win95+) an int takes 4 bytes (32 bits), and in the same environment a pointer also takes 4 bytes. (a pointer is nothing more than an unsigned int pointing to a memory address)
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Anonymous wrote:
I have list of a big object.The approximate elements of this list is expected to the tune of 10,000,000-99,000,000.
If this was to be "I have a list of big objects", and not "a big object", it means the object(s) at hand can only be (on avg) less than 20 bytes (incl. overhead the object can probably be no larger than 12-16 bytes). That's not such a large object.
However, it seems you have a devilish large number of instances of such objects!
Now if I have to use only part of this big list in another object.
Would it be advisable to use a list of pointers to this list section or use a list of the index values of the section?
In Win32 it wouldn't matter, since you'd need a 32-bit entity to express an index>64K, and that's the size needed to express a 32-bit pointer (where are you from to not know this?).
In reality, in Win32, it wouldn't matter at all what you did - you'd be out of memory (address space) before you could do anything sensible with that amount of data.
My suggestion is you either memory-map it in smaller units, or use a computer architecture designed to handle this amount of data (SGI, Cray and Tandem comes to mind).
|
|
|
|
|
I have an ClistCtrl in my dialog.How can I get the texts of item an its subitem when user click on an item?I overriden NM_DBLCLK but I can't get the texts of them!
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Why do you even mention duouble-click when you say you only want the selection? How about selchange (or similar)?
|
|
|
|
|
Nope,I want when user double click on an item.Whats the way for that?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
From what I can understand from MSDN Library, loadXML of IXMLDOMDocument return a S_FALSE (I think it was) if the load failed, but it also has a VARIANT_BOOL varible as a parameter which also return FALSE if the load failed. I'm confused...
What is the difference between the HRESULT value and the VARIANT_BOOL value?
Which one should I check?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
A VARIANT_BOOL is the Automation version of bool . Its possible values are VARIANT_TRUE and VARIANT_FALSE . In the case of loadXML() , the bool tells you whether the load succeeded or failed. If you need to know why it failed, then you can check the HRESULT .
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|