|
Hi everyone!
I am in dire need of .ICO and .ICL (Icon Library) spec sheets. I haven't been able to find them anywhere. The main reason for this is the fact that LoadImage() has a bug when loading high-colour icons (though, i do need the .icl specs). fyi. it produces the following error (in debug mode):
HEAP[ZiTest.exe]: Heap block at 00137F20 modified at 00137F54 past requested size of 2c
|
|
|
|
|
I have added icons to the systray, but these icons only have
16 colors, so I want to know that if I can put icons 256 colors icon to the systray.
By the way can I put an CWnd to the systray?
|
|
|
|
|
Hi!
How can I create a application MDI (or SDI) with two panels CListView (like in Windows Commander), (created with CSplitterWnd class and CreateStatic and CreateView functions), with ToolBar (CToolBar or CToolBarCtrl) in CListView (up) and information panel (CStatusBar or CStatusBarCtrl) in CListView (down) in each panel (like in Windows Commander).
Thanks.
|
|
|
|
|
MFC, Win9x, VC6
I have an app the uses a simple hand coded offscreen buffer to animated real-time graphics via the Multimedia timer. I now want to add real-time sound to the app. I want the sound to mimic a Geiger counter. The tone has a fixed frequency, volume and play time of 180ms. On the low end, the tone plays every 1 second. At the other extreme, the high end, the tone plays every 180ms in succession. It is key that a want to change the sound in real-time to match the animation. I tried using the PlaySound() function with a variable pause but the low end pause interrupts my real-time animation. Any ideas? I am surprised at the small amount a code samples and explanation a have found. I am not using DirectX. All suggestions welcome and code samples greatly appreciated!
|
|
|
|
|
Hi all, I need to develop a little configuration program to configure a hardware I developed. I'd like to install the prog in the control panel, like the mouse setup program.
Does someone know how to drive an application to be placed in the control panel ????
Thanks very much...
Carlo.
|
|
|
|
|
|
Does anyone know how I can handle the onafterprint event of an html document that it is contained in a WebBrowser Control (as generated by ClassWizard in VC6)?
The control is on a CDialog-derived dialog. I would like to be able to handle this event in dialog in the same way as I handle OnNavigateComplete2.
|
|
|
|
|
Is there any fast function for sorting an array of strings alfabetically ?
Thanks in advance. Erik
|
|
|
|
|
I can't think of a single call you can make, but there are lots of 'points of interest'.
First tip, don't sort an array of strings - sort a contiguous array of pointers to the strings. This means whatever shifting you do just involves moving bits of the array around, not reallocating strings.
With that in place, there are standard sorting routines you can use. The venerable qsort from the C library works great, though it requires you to set up a 'global' callback. Maybe this could be a static member in C++ if you want to mix.
Inside the comparison callback, its up to you to decide what the order will be - retuning essentially what a strcmp or stricmp returns.
It turns out that there is more than one implementation for the string comparison functions in VC - there is straight C code, and there is much faster 286 code in the Crt\Intel include dir. (I say '286 code' because I think some of this could be even faster with the string ops of a 386 + proc when dealing with big strings).
If you've got control over what proc you are targeting, even a basic framework like this can be way fast, depending of course on the size and similarity of the strings.
STL gurus will probably flame me for this, but it is durn quick!
|
|
|
|
|
Hi,
(I hope this is right forum to ask this question. I didnt see dedicated MFC forum)
I have many modal dialogs, which are used for popups for data input. I'd like them to behave like popup menus, I mean, if user presses outside the dialog it closes. The problem is that I don't know how to catch a message which tells that user presses outside the window. wm_lbuttondown isn't send if user press the mouse outside the window.
Also, there are such many of those dialogs, that I would not want to use the technique some one suggested in his article (here at codeproject) describing the developer style property dialog functionality. And I want the dialogs to be modal.
Any suggestions are welcome... thanks
--memon
|
|
|
|
|
hi,
on the question:
1. generally you can monitor the message queue for lbutton message and do what you whant by using:
SetWindowsHookEx - look it up in the msdn , the windows hooks are a bit complicated...
inf fact i did it once.. but maybe i made a mystake because my program was quite slow... if you want a real working example.. download VNC source at http://www.uk.research.att.com/vnc/
but i think you do not want such a headache
2. (an idea) set the focus the the dialog then the user has two posibilites:
- to click inside the box... you can handle that
- to click outside the box... this means that it will loose the focus.. so you just need to monitor the focus..
3. this is the answer i think...
HWND SetCapture(
HWND hWnd // handle to window
);
msdn: The SetCapture function sets the mouse capture to the specified window belonging to the current thread. Once a window has captured the mouse, all mouse input is directed to that window, regardless of whether the cursor is within the borders of that window. Only one window at a time can capture the mouse.
dont forget to RElease capture
best regards
WarJo
|
|
|
|
|
i want to add some buttons to MS outlook (express) and MS Internet Explorer toolbars.. that can run my program...
i have seen several applications do so like Word and PGP...
if anyone has the knowledge please share it
best regards
WarJo
|
|
|
|
|
Hi,
Is there any short key to go to xxx.cpp if i am in xxx.h file and vice versa.
thanks,
|
|
|
|
|
there is no any standart command in VS for it.
but you can look for add-ins here
http://codeproject.com/macro/
|
|
|
|
|
Get WndTabs ( http://www.wndtabs.com ). It does this and more...
|
|
|
|
|
Ok, another relatively simple question that I just can't get my head around...
I am working on an HTML Editing program, that needs to get the source code for a document from the MSHTML Editor. I am using the following function to return the document object, and then what I thought would be the source code, in a CString. The problem is that the string always contains the text "[Object]" rather than the source code. What am I doing wrong? or what do I need to do to get the source as a string?
CString CMyView::GetText()
{
BSTR bStr = 0;
HRESULT hr = E_FAIL;
IHTMLDocument2* pDoc = NULL;
if (SUCCEEDED(HrGetDoc(&pDoc)))
{
IHTMLElementCollection* pElementCol = NULL;
hr = pDoc->get_all(&pElementCol);
if (SUCCEEDED(hr))
{
pElementCol->toString(&bStr);
pElementCol->Release();
}
pDoc->Release();
}
....
}
The function 'HrGetDoc(IHTMLDocument2 **ppDoc)' simply returns a pointer to the IHTMLDocument2 object. I know this is valid because I can use it elsewhere to update the document.
According to the MSDN documentation, 'IHTMLElementCollection::toString(**BSTR)' will return a string representation of the element collection - in this case the entire document. I also tried directly using 'IHTMLDocument2::toString(**BSTR)' but i still get the string "[object]" retuned.
What am I doing wrong. I suspect that I still need to do one more step before I can get the document, such as '[object].toString(...)' but how do I do this?
Again, any help you can give me will be appreciated.
David Wulff
Battleaxe Software
|
|
|
|
|
Hi
Enumerate the Element collection
and then use IHTMLElement::get_outerHTML to retrieve the HTML of the individual elements
Regardz
Colin Davies
|
|
|
|
|
Thanks, I have something 'kind of' working now . But I can only get the contents between the BODY tags. Even getting the content between the HTML tags would not be enough, as the user could have a comment before the start of the document (or not have HTML tags at all).
Any solutions?
Thanks again,
David Wulff
|
|
|
|
|
At a guess,
All the code should be between either the HEAD and BODY tags, or just the HTML tags So when you enumerate the Tags these are the only two you actually need to find.
If there are no HTML tags then it isn't HTML !
as HTML is a standard
Regardz
Colin Davies
|
|
|
|
|
I am trying to communicate with a RS-485 device through a serial port (COM1). Everything works okay via RS-232 or using a special converter which toggles the RTS line high while TX is active. I have tried using RTS_CONTROL_TOGGLE or EscapeCommFunction (SETRTS/CLRRTS) without success. I suspect that either the RTS line is not held high quick enough (thus character is not sent) or that the RTS line is held high too long (thus misses the echoed character).
Suggestions or experiences under this configuration?
|
|
|
|
|
Any one have any ideas on this problem that I sent off to msdn ?
http://msdn.microsoft.com/library/devprods/vs6/visualc/vclang/_iostream_a_streambuf_derivation_example.htm
C++ Visual Studio 6 with SP4 on Windows NT 4.0
There are contradictory examples of filebuf using the sync method and the fd accessor method(s). The C++ standard documents the methods and so does Microsoft, however MS's library doc's are full of examples of using features that they don't support and they do not show workarounds in fact the class filebuf is total unusable in buffered IO situations and has no way of working without manually changing your include files.
If this was a support question I could word it as ...
When using buffered IO with the filebuf class how does someone within the sync method pysically get the output to the disk as a buffer, usually this could be done by calling the base filebuf class sync but it does not implement buffering properly and only calls a flush function rather than checking for unbuffered == false then calling write then calling flush. Also I cannot compensate by getting the file descriptor and manually doing the write because the filebuf::fd is not supported!!!
Karl Mutch
|
|
|
|
|
Hello,
I'm currently trying to get a grip of the STL. All I could find so far is one (fairly poor) tutorial in the MSDN.
Does anybody know where to get some good tutorial for STL?
Thanks,
Matthias
|
|
|
|
|
Hi,
check this link:
http://www.sgi.com/Technology/STL/other_resources.html
The best solution is of course to buy a book with good examples.
Andreas
|
|
|
|
|
i began loving STL after reading:
"Thinking in C++ 2nd edition"
by Bruce Eckel
i think two or three of the chapters are dedicated to STL... and are full of examples...
hope this helps
warjo
|
|
|
|
|
Dear Sam.
With the Help of ur WFC Lib. we tried to interact with Tape Drive for Getting Header Info., Catalogging, and BackupRead....
but we failed in the first phase itself...(Getting Header Info..)
The method OPEN in CMIRCOSOFTTAPE fails to read the info.
Could u help us to overcome this problem.???
Any ideas and Suggestions would be welcome...
|
|
|
|