|
I don't know about your particular situation.
Sorry.
But I can point you at a DirectMusic timer I use
for my midi sequencer.
It might beat the standard multimedia timer...
Over at http://groups.yahoo.com/group/MidiDev/join/
You'll need to look thru the archive for
dmtimer.h
Sorry. That's all i got...
...Steve
|
|
|
|
|
We have a little bit of problem with this CreateDIBBitmap.
We have been trying to copy image into memory and pasted on
control we have created for display, but seems like everytime
we do this on win2000 server, we get the function fails
returning NULL. But except this machine we don't have that
same problem. For this machine, we've tested with ATI 64MB,
32MB, 16MB, GeForce128MB for video card.
any information is helpfull.
Thanks,
shinya
|
|
|
|
|
Hello,
I'm using the MFCGrid and I want my code to respond to the user editing a cell.
It's a dialog based application. Looking at the demo app, it's looks like I should create the following mapping:
ON_NOTIFY(GVN_ENDLABELEDIT, IDC_GRID, OnGridEndEdit)
However, I am creating the Grid control dynamically in the code using
m_pGridCtrl->Create(rect, this, 100);
instead of binding it to a Custom Control on the dialog, therefore I don't have the equivelent of IDC_GRID.
Is there another way to bind the WM_NOTIFY message to a instantiated variable of the control.
Thanks,
John
|
|
|
|
|
In effect the Create() has done the binding for you. All you have to do is put
ON_NOTIFY(GVN_ENDLABELEDIT, 100, OnGridEndEdit)
in the message map (maybe using "IDC_GRID" might be better than just "100").
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
OOPs, I didn't realise that the third parameter was the resource ID, I thought it was some combination of default flags.
Thanks very much!
|
|
|
|
|
Friends,
I've two projects in a workspace. The main project is a dialog based application. The second project is a Win32 static library.
In the second project i include an *.rc file to add resouces in the project. Then i add a dialog box in the resource.
Now, i want to initiate the dialog box of my "static library project" from my main project. i.e if i click the OK button of my main application dialog, i want the modal dialog box that is present in the resource of static library project.
As such i am getting debug assertion failure. Can anyone tell me whats the reason. I am using Visual C++ 6.0
|
|
|
|
|
<edit>
Yes, i've set all the dependencies of projects
|
|
|
|
|
Resources must be put in modules (exe's or dll's).
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Shah Shehpori wrote:
As such i am getting debug assertion failure.
And that would be ???
|
|
|
|
|
DavidCrow wrote:
And that would be ???
Probably the one that says "Hey! Where's the dialog template???"
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Okay.
I gotta read in some xml files.
I've checked out the xml parsers from apache (xerces) and oracle (xdk).
I don't see why I can't just parse the dang xml files myself.
I mean, it sure doesn't seem to ME that parsin these things would be hard.
(ignoring unknown tags, etc).
Anybody got any warnings for me about why I -should- use one of these
things? They seem to add to the code pile and not give ya much in return.
Any help?
Thanks!
Steve.
|
|
|
|
|
An incomplete XML parser, ie one that does not validate, would be easy enough. In fact there are 2 lightweight parsers on Codeproject, one of them (PugXML) is free.
A full implementation is an massive Job, hence the enormous footprints of XML libs.
Ryan.
|
|
|
|
|
Steve,
You're probably right to be skeptical. Most XML parsers pull in huge amounts of code, to do very little. CMarkup is a very lightweight class that's easy to use and is ideal for "read-only" XML apps.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
In my experience with using the MS XML parser, the results were fairly close to what you described (added to the code pile) plus giving my users the added benefit of extra time to go get that cup of coffee they need while my code plods through a 3MB XML file. Parsing the file manually speeds things up dramatically. To date I have not found an efficient parser, but that's mainly because all the good parsers have a lot of overhead while they make sure everything is kosher. In our situations we can probably make some assumptions about the particular file we're parsing, which can add to efficiency.
-ar
|
|
|
|
|
Are these comments all about DOM?
I found that using SAX was harder work, but was quite a lot faster, since it does the basic recognition for you. Typically, we're handling XML in excess of 100Mb in a couple of minutes.
Of course, processing (as opposed to loading) takes a bit longer
Steve S
|
|
|
|
|
I create a CWnd object on a view. I process event or command in the CWnd object. But i found that all menu commands that processed in the object are disabled. Could you help me? Thank you very much.
|
|
|
|
|
In the message map of your CWnd object you need to have an entry for each of the ID_* in your menu. For example,
ON_COMMAND(ID_COLLAPSE_ALL, OnCollapseAll)
. The function OnCollapseAll() is prototyped as
afx_msg void OnCollapseAll();
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Hello!
I use the MS FlexGrid ActiveX in a dialog box (just the grid and a OK button). But I need it to be automatically resized so the grid fits perfectly in the control. I need then to resize the dialog.
The problem is that the height and width of the grid are expressed in twips. So I have some difficulties to convert them to use for MoveWindow (control & Dialog).
Any idea ?
|
|
|
|
|
Hi,
i have to write a Dialog which should has a banner (bmp) on the top (not in the title bar) and under this banner there has to be a PropertySheet or a CTabCtrl. Don't ask why it has to look like this!
Here's the problem:
1) if i use CPropertySheet i can't display the PropertySheet in my dialog, because it has it's own. Is there a way to display the propertysheet in MY dialog ?
2) if i try to use CTabCtrl, there is no chance to put stuff like edit controls, list controls etc. in it. Does CTabCtrl make sense at all. Why does this f***ing Class exist ????
I need help!
Thanks!
|
|
|
|
|
You can embed a property sheet in a dialog. Just use CPropertySheet::Create() , specify a non-NULL parent window, and specify WS_CHILD as one of the window styles:
BOOL CMyDialog::OnInitDialog()
{
m_PropSheet.Create(this, WS_CHILD | WS_VISIBLE);
} You'll have to resize the property sheet so it uses the correct amount of space as well.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Well, well! I works. Thanks Ryan!
hph
|
|
|
|
|
You're welcome
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi!
I'm trying to make serialization to work, I tried this:
try
{
CFile file(_T("SerialTest.dat"), CFile::modeWrite | CFile::modeCreate);
CArchive ar(&file, CArchive::store);
int a = 3,b = 5;
CString str(_T("Hello"));
if( ar.IsStoring() )
{
ar<<a<<b<<str;
}
="" file.close();
="" }
="" catch(cfileexception*="" e)
="" {
="" e-="">ReportError();
e->Delete();
}
The file is created, but is empty..
any ideas?
thanks
Mykel
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Try
if( ar.IsStoring() )
{
ar<<a<<b<<str;
ar.Flush();
}
rechi
|
|
|
|
|
Close the archive before closing the file:
ar.Close();
file.Close();
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|