|
Yeah.
I modified the original question. Is there now enough information to solve the problem?
Thanks to Tomasz for paying attention.
paanane
|
|
|
|
|
m_list.InsertItem(0, text1) inserts item at the zero index - at the very top of the list. Change this to m_list.InsertItem(m_list.GetItemCount(), text). I'm assuming that your list does not have LVS_SORTxxx style set.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I enumerate the encoders registered on my computer(such as:Cinepak Codec by
Radius, MJPEG Compressor,DivX MPEG-4 Fast-Motion...).Then how can I select one
of them (Such as DivX MPEG-4 Fast-Motion) to compress the timeline using
DirectShow
filters?
Note:
These encoder have the same CLSID(CLSID_AVIC0),only FccHandler and ridenlyName
are different.How to select one of them?
Thanks
.
|
|
|
|
|
How do I have my combo box add certain strings in red, others in blue,etc.
I would appreciate something simple, that I should call right before I call AddString() and then to reset before my next call to AddString()
|
|
|
|
|
you have to implement an owner-draw combobox ... look on the relevant section here to find one or some clues
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Isn't there some way to overwrite the dialogs OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) method and to get at each item in the combo box and at the Cedit and set the brush while it's drawing that item????????????
|
|
|
|
|
in essence that is what owner draw is
check it out and you will find it isnt too difficult to do
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
i created my own button class, using CWnd as base class. and by using the AfxRegisterWndClass function, i registered this button class with the hCursor parameter set to NULL. and then, within the button class' OnSetCursor member handler function, i change the default mouse cursor with the cursor i loaded thru LoadCursor by using the SetCursor function. so within my program, whenever the mouse pointer is on top of a button, the mouse cursor changes to the cursor i've set, but the problem is, the mouse cursor flickers. the flickering stops when the mouse pointer is not on top of the button and the mouse cursor returns to the normal arrow cursor.
i don't know what the problem is. can someone please explain.
|
|
|
|
|
Hmmm... what is the return value of your OnSetCursor member? it should be TRUE, if its not I think Windows is probably re-setting the cursor right after you set yours -- thus the flicker.
Have a good one,
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
i explicitly return the value TRUE.
by the way, thanks for the reply.
|
|
|
|
|
The it could be a drawing problem with the button you created.
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
Try using SetCapture when the mouse is over the button.
Don't forget to relese the capture when you are done.
|
|
|
|
|
I use VFP98 open a database named abc.dbf,only spend 5 second include show all the data in database.
But,when I use ODBC API (VC++6.0)open the abc.dbf,and show all the data ,It spend much more times,and make the computer shutdown!!(There is not enough memory!!)
Thanks!
hi
|
|
|
|
|
I have this Date and Time display in my window. Im using the Ontimer() / SetTimer() routine to update it... but the problem is the "second" display's interval is not consistent. It is not actually noticeable but when you compare it with the computers clock you can see it ticking ahead sometimes. what can i do to solve this?
Hope you can help me guys.
Thank You!
Rachel Sy
|
|
|
|
|
How about a second thread that uses Sleep() or SleepEx() instead.
Then every, let's say, 15 seconds, you could do a sync with the computer clock, checking the clock, and checking that your thread is on the right time...
Anyway, just an idea, there may be smarter ways...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Don't rely on intervals between WM_TIMER messages that your program receives. They're just a chance for your program to update date/time display - you should call ::GetSystemTime or CTime/COleDataTime methods in the handler, then output the text if string representing current time changes.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
here is what my program looks like
LONG xxxxxx::OnPageChange(UINT lPageNo, LONG lValue)
{
.
.
//Timer
SetTimer(1, 400, NULL);
.
.
}
void xxxxxx::OnTimer(UINT nIDEvent)
{
TimeDisplay();
CWnd::OnTimer(nIDEvent);
}
void xxxxxx::TimeDisplay()
{
SYSTEMTIME osTime;
GetLocalTime(&osTime);
//YEAR
.
.
//MONTH
.
.
//DAY
//HOUR
//MINUTE
//SECOND
if(oldtime[5] != osTime.wSecond){
oldtime[5] = osTime.wSecond;
//Display second here//
}
}
i tried making a new thread and call TimeDisplay(). But created a while loop inside the TimeDisplay because i dont know a way to update the clock(since i cant use the WM_TIMER here or i can?) i just dont know how....
whats the problem with my program? thanks to everyone who replied to this question. sorry for takign your time... i really appreciate your help....
Rachel
|
|
|
|
|
You can't rely on WM_TIMER messages arriving at exactly the interval you ask for. That's just how PC hardware works. Also, if a WM_TIMER message is in your queue, and the timer expires again, another WM_TIMER message is not placed in your queue. So if, say, you start formatting a floppy, or open Word and Excel so your system suddenly starts swapping, that will hog CPU time and may prevent WM_TIMER message from being sent to you for the reason I just stated.
So, whenever you get WM_TIMER, you pretty much need to reread the system time. You can't just increment a counter by 1 sec.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
It's not the hardware. It's the fact that WM_TIMER messages are the lowest priority messsage, and there's a chance they can get ignored on an otherwise busy machine. Using a separate thread to run a timer that is *not* based on WM_TIMER is a better course of action than what he's already tried.
|
|
|
|
|
Hi folks,
I'm having problems when using the _execl() and _spawnl() functions - the compiler/linker can't find their definitions (undeclared identifier, i.e. not seeing the function prototype). Basically, what I hope to do is to run a simple DOS application via my app without having the MS-DOS prompt popping up.
I've looked in the MSDN help and have included all the correct headers (process.h and errno.h). As far as I can tell I'm doing it correctly.
My application is an MFC App (for an OpenGL app) running on Windows 98.
Hope you can help and thanks for your time.
Cheers,
Stephen McGeown.
|
|
|
|
|
It works on my machine (VC6 SP5). Check if your include paths are set correctly. BTW: you may want to call ::CreateProcess instead of exec/spawn if you don't want visible console window - this call gives you much more control over child process. exec/spawn are implemented using CreateProcess.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks for your help Tomasz. I'm *pretty* sure my include paths are correct. Just wondering whether it makes a difference because it's a *.cpp file, not *.c ?
Anyway, the CreateProcess call looks better so I'll give it a bash.
Cheers!
|
|
|
|
|
hi..i have a question.
How to set the focus back to the formview(main windows??) when its focus is on a textbox on the toolbar????
Thx
|
|
|
|
|
I am developing a activex control in Visual C++ that manages the windows
sound with the apis mm. I use the file mmsystem.h (#include mmsystem.h) and
in the Settings section of my project makes a link to the file winmm.lib.
All works well in Windows NT 4.0.
My problem is that this control doesn't work correctly in Windows 2000 and
in Windows 98 because the file winmm.dll (in the system directory) possesses
different numbers of versions in these.
Windows 2000: 5.0.2161.1
Windows 98: 4.03.1998
Windows NT: 4.0.1371.1
Is somebody able to tell me how to solve this?
Thanks in advance and Best Regards
|
|
|
|
|
Different version numbers of DLLs on different platforms are *normal* thing. What exactly does not work? Are you using some functions that are not present on older Windows versions?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|