|
|
|
The 22-Nov entry in this blog[^] may provide an answer.
Btw, I hate to do this to you, but my ISP just upped my standard broadband connection (downloads) to 3Mb/sec (about 400 KB/sec).
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
OK, you got me where it hurts. You know I live on ham and cheese sandwiches, while you casually gorge yourself on wondrous delights that for me are but a distant memory. I'd kill for a medhu wada soaked in spicy sambar...
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi!
How do make a counter that starts with zero and then counts up til the program is finished?
I will have misçroseconds precision. I have used struct timeval to get microseconds and it counts p till 999999 microseconds. Then it starts again at 0, but it do not add number 1 for one seconds has gone. In other words it doesn't show 1000000, instead only 0.
Thankful for your help
|
|
|
|
|
Is counter a varible or related with one register of 8254?
If it is a varible to store a value you can work well by "%"
My Family & myself wish you &
yours a very
Merry Christmas & a Happy & Safe New Year.
|
|
|
|
|
lookup QueryPerformanceFrequency and QueryPerformanceCounter if you do a QueryPerformanceCounter at the beginning of your program and on the end, the difference is the amount of time spent.
|
|
|
|
|
I have a project which is a SDI Application,I want to create a button in the StatusBar,So I made a New class
(CMyStatusBar),and write some codes like this:
int CMyStatusBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CStatusBar::OnCreate(lpCreateStruct) == -1)
return -1;
CRect rect;
GetItemRect(CommandToIndex(ID_MYBAR),&rect);
int ret=m_button.Create("test",WS_VISIBLE|WS_CHILD|WS_BORDER,rect,this,ID_MYBAR);
m_button.MoveWindow(rect,TRUE);
return 0;
}
but why i can't see my button :ID_MYBUTTON?????
thanks!
|
|
|
|
|
who can help me? thank you ....
|
|
|
|
|
try
ShowWindow(SW_SHOW)
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Thank you, i add this code:
ShowWindow(SW_SHOW)
but i can not see button also.......
|
|
|
|
|
1. Do you derive your statusbar from CStatusBar or CStatusBarCtrl ?
2. What coords of rectangle rc did you obtain from GetItemRect() ?
|
|
|
|
|
And another problem that has me completely floored:
In a Windows Installer DLL, it is necessary for me to get and adjust the commandline, write it into RunOnce and reboot the machine.
I've never used GetCommandLine before because I've always had access to the WinMain arguments, so it has never been necessary but in this case there is no other way to access it.
On Windows 9X, I have no problem. I use _tcscpy( szRunOnce, GetCommandLine() ); and szRunOnce is populated with "C:\WINDOWS\SYSTEM\msiexec.exe" /i "E:\MyFolder\MyInstaller.msi" /l*v C:\msilog.txt . That's exactly what I expect.
On Windows 2000, I get something else entirely - something like: C:\WINNT\System32\MsiExec.exe -Embedding 03E11881F81557A4CAAAA7C7B6ADDFBB
This is no use to me whatsoever, as far as I can see.
Is this Windows Installer doing this to me or GetCommandLine? If the latter then is there a good way of building the string that I'm really looking for?
Paul
|
|
|
|
|
Okay, I give up. Can anyone here help me with this:
According to the MSDN docs for RegSaveKey:
"Windows 95/98/Me: RegSaveKey does not support long file names. To save a registry hive to a file with a long file name, first save the hive to a short file name, then rename the resulting file to its long file name."
And sure enough this seems to be the case, so I need to convert the filename to a short path. But when I call GetShortPathName, I get the error: The system cannot find the file specified.
Well, obviously it can't find it, I'm about to create it.
If I create the file to get the short path name then I need to remove it again before calling RegSaveKey, which doesn't seem to support overwriting existing files.
So as far as I can gather, the only solution is to create a file, get it's short path name, delete the file and then call RegSaveKey. This seems very convoluted; does anyone have a better way that works?
OR... have I completely missed the point here? I do notice that the long path name I'm trying to shorten has a double-backslash in it.
C:\WINDOWS\TEMP\\{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}\MyFolder\MyExtract.reg
I didn't put it there, it's a Windows Installer API problem. It creates a support folder for installations ("[TEMPFOLDER]\[Product Code GUID]") and when you ask it for the path, you get it with the double-backslash.
It hasn't caused me any issues up until this point, but I suppose it could cause the error from GetShortPathName. I don't know.
Anybody?
Paul
|
|
|
|
|
Okay. I discounted the idea that the double-backslash was the problem by using a different folder.
Then I realised that I could use GetShortPathName to get the name of the container folder and make sure the file names were 8.3 format when I added them.
Problem soved. Doh!
Paul
|
|
|
|
|
I have an MDI application with a CDialogBar. Immediately after I have created the dialogbar, I can access the controls on it with GetDlgItem, but when I try to to access them at a later stage, GetDlgItem fails and I get a failed assertion for ASSERT(::IsWindow(m_hWnd)), where m_hWnd is the window handle of the dialogbar. Looking in the debug locals window I can see that CDialogBar::m_hWnd is now NULL. Yet I can still see it fine on the screen.
Why would it lose its HWND? How does it work without it? How can I access the controls on it? Thanks.
|
|
|
|
|
did you do this ?
hDlgWnd = m_wndDialogbar.m_hWnd;
instead do this
hDlgWnd = m_wndDialogBar.GetSafeHwnd();
MFC clears its temp map and the entry goes in permanent map if you do this GetSafeHWnd()
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I was just calling CDialogBar::GetDlgItem and letting it sort out its own window handle. I've tried GetSafeHwnd() and I still get 0xCDCDCDCD
|
|
|
|
|
such situations can arise in multithreaded environment , are there any threads ?
did you use SPY ++ to see the windows handle
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
I gave up on this prob for about a month there but now I really really want to get it sorted. Its a single threaded MDI app in VC7. I can't find anyway to access the controls on the dialogbar after it has been created. I've tried DDX_Control, GetDlgItem, creating everything on the heap and everytime I get failed asserts like ASSERT(::IsWindow(m_hWnd)) from GetDlgItem etc
Any help very much appreciated
|
|
|
|
|
hi all i am a student in Computer science engineering 1st year..new guy in the field of programming..i am asked to make a program that runs its own type of video files...
ex: i have a *.AVI file i must convert to a type of my own like *.itp for example then this file is not runnable on any player except my own one..
can anyone help me with how to edit header for the video and how to render it using my program
|
|
|
|
|
You could use the old Win32 AVIFile functions, or the newer DirectShow objects.
The old AVIFiles are really easy to use if you just want to grab individual frames from a video, without sound, but they don't work with new formats like DV. Look for AVIFileInit in MSDN.
DirectShow is a bit trickier as its all COM objects, but its very powerfull, and allows you to create your own media player with relatively little code if you want. You'll need IMediaDet if you want to grab individual frames.
Good luck!
|
|
|
|
|
wow that is soe project for a first year guy
video files of own format !
you can simply put series of images in a file and display them you won't get a good fps but good for learning
or use directshow or AVIapi to display avi files but that's not what you want right
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
sure it is big for me to do..can you please tell my teacher that information.....so he may discard me from this project...
so if you please can you help me...with some more technical information for a beginner....thanks
|
|
|
|