|
How to decode MPEG video and audio?
Is there any source code?
Thanks!
|
|
|
|
|
what exactly is your need in mpeg layer??
if its mpeg1 layer3 then i could help you in case of audio.
|
|
|
|
|
Hello!
I am a absolute beginner!
I found a source here about HOOK - realized with DLL. I use it in my app to wait for key_down. But I have problem. I want my app to come to the top, when the CALLBACK-procedure has identified a key press. How can I do it easily?
My code in the DLL:
<br />
HWND g_hWndMain;<br />
<br />
LRESULT CALLBACK Keyboard( int code, WPARAM wParam, LPARAM lParam )<br />
{<br />
if (code==HC_ACTION) <br />
{<br />
LPEVENTMSG lpEvent= (LPEVENTMSG)lParam; <br />
if( lpEvent->message == WM_KEYDOWN && LOBYTE(lpEvent->paramL) == VK_F1 )
{<br />
MessageBox( NULL, "CTRL + F1 pressed!", NULL, NULL );<br />
SetForegroundWindow(g_hWndMain);
}<br />
}<br />
return ::CallNextHookEx(g_hHkKeyboard, code, wParam, lParam);<br />
}<br />
<br />
__declspec(dllexport) BOOL IdleTrackerInit(HWND hWnd)<br />
{<br />
if (g_hHkKb == NULL) <br />
{<br />
g_hHkKb= SetWindowsHookEx( WH_KEYBOARD, KeyboardTracker, g_hInstance, 0 );<br />
<br />
}<br />
<br />
<br />
_ASSERT(g_hHkKb); <br />
<br />
if (!g_hHkKb)<br />
{<br />
return FALSE;<br />
}<br />
else <br />
{<br />
g_hWndMain = hWnd;
I don't know if the code line:
SetForegroundWindow(g_hWndMain); // set the main window to the top
is right or wrong!
If it is ok, how can I give the main window to the parameter HWND hWnd ????
|
|
|
|
|
can some please tell me it the HOURS seem right for these estimates for a bejeweled concept game. thank you. game graghics provided by client.
Activity........................................stimated hours........Hourly Fee......Price
Application design...........................................60...........17.1.......1026
Java class BeJeweled and algorithm for playing....160...........13.7.......2192
Graphic images for Jewels and other elements........0............13.7............0
Special sparks effect (dispalyed time intervals).....30............13.7.........411
Special effect on mouse over...........................20..............13.7........274
Special effect on mouse click...........................20...............13.7........274
Special effect on score...................................20...............13.7........274
Special effect on moving pieces........................60...............13.7........822
Special effect on Bonus..................................20...............13.7........274
New Game/Simple/Timed/Mute buttons...............4................13.7........55
Pause game..................................................8................13.7........110
Music.........................................................16................8.2.........131
User help....................................................12................8.2.........98
Testing ......................................................24...............8.2.........197
Installation & instructions...............................12..............8.2...........98
Total price.................................................................................6236
1st Time Buyer Discount.................................................................374
Price after discount......................................................................5862
dee
|
|
|
|
|
|
Hello
I have a dialog and on this dialog there is a editbox(say m_edit1) and a button. When I enter some text in this editbox(m_edit1) and push the button, I want this action(buttons onclick event) to create a popup window on which there is an editbox(say m_edit2) to be filled with the information(text, string whatever) received from the parent dialog(the info provided thru m_edit1).
What should I do ?
Should I declare m_edit1 public, private or what ?
Should I include first class's header file in the popup window ?
What should I write to pass the m_edit1's text into popup's m_edit2.text ?
Thank you for your help
Nice Özgürce
|
|
|
|
|
Let CPopDlg is PopUp Window for your Dialog class with Dialog Template(IDD_POPUP ), make a EditBox on that Popup and Make it Variable Public viz. m_strPopupEdit (type CString );
now onCLick Event of Button on Dialog Box
this->UpdateData();
CPopDlg dlg;
<code>dlg.m_strPopupEdit=this->m_edit1</code>
dlg.Create(IDD_POPUP, this);
dlg.ShowWindow(SW_SHOW);
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
i'm trying to enumerate the same application that appear on the ALT-TAB or on the Applications Tab of the TaskManager.
but as you know the EnumDesktopWindows "give" me more windows than the ones i need.
the problem is that i am having a hard time filtering the windows
does anyone know the way to filter (discard) the windows that i get in order to have only the ones in ALT-TAB?
"There is no sin in making an error - we all do, and that's how we learn. Sin lies in letting stand an error, once we discover it, without correcting it." Roger Wright
|
|
|
|
|
After You get Handle Of Desktop Window Use Api IsWindowVisible api to determine that Window is Visible on Desktop or NOT.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Dear all,
What is the fastest way to locate the focused item in CListCtrl object?
BRs
|
|
|
|
|
GetSelectionMark().
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Thanks Tom,
While waiting for your replies, I found a solution. That is GetNextItem(-1, LVIS_FOCUSED)
Thanks anyway.
BRs
|
|
|
|
|
Just wandering why the CListCtrl::GetFirstSelectedItemPosition() is not good enough ?
|
|
|
|
|
Because I wanted to find the focused item, not selected item. By using GetNextItem(), I can directly locate the focused item and that's what I needed.
BRs
|
|
|
|
|
hi
Does anyone know how to create html file from a c++ program (MFC)? I am working on a program where i have to generate a report from some database and should be able to print it. so i was thinking of creating report in html file which will be easier to format and print too. but i looked everywhere for some tutorials or any articles... no luck ..
have anyone done something similar? can someone help???
links for tuts or projects anything
thanks
zlich
|
|
|
|
|
The most basic way is to open a text file, write out HTML to it, and close it. If you don't know how to write HTML though, this isn't going to be too easy... but then, neither is anything else i could suggest. Some reporting packages will output to HTML, but if you're using a reporting package then you already have formatting/printing built-in.
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades.
I don't know what you thought; I'm not your astronaut...
|
|
|
|
|
that.s not a very big task,just create the file name by using the .htm or .html extension,n then everything is as simple as creating a html page.for html you could check any site(lots of examples are available).
|
|
|
|
|
I'm trying to convert a Ctring that I read from an edit box into a float.
Here's the code I've got;
CString result;<br />
double d1;<br />
<br />
GetDlgItemText(IDC_EDIT1, result);<br />
char *txt = (char *) (LPCTSTR) result;<br />
d1 = atof(txt);<br />
When I display txt I do see the correct decimal number, unfortunately d1 is truncated after to the first digit. I.e. if I enter 26.5 in the edit box (IDC_EDIT1), txt is 26.5 but d1 is only 2.
What I am doing wrong here?
Is there any easier way of reading a float from an edit box?
Cheers,
Pat.
|
|
|
|
|
Try something along the lines of
sscanf(txt, "%f", d1);
txt is your string, d is your floating point.
|
|
|
|
|
Well you could always set a member variable for IDC_EDIT1 to a value as float. Thne no conversions would need to be made.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Thanks! I had done it originally but completely forgot to update the data, so it wouldn't work. It does now!!!
Cheers,
Pat.
|
|
|
|
|
Just for the sake of completness, I decided to throw this in after so many weeks:
Boost.org has its lexical cast http://www.boost.org/libs/conversion/lexical_cast.htm[^] which comes in handy whenever you are tempted to use those grizzled and outdated old C-library functions.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
i personally prefers sscanf_s function,its more reliable
|
|
|
|
|
How would I go about tracking mouse movement outside the window?
Currently OnMouseMove would only track the mouse within the windows.
|
|
|
|
|
- call GetCursorPos() in a loop (easy, but very bad idea)
- write a hook
- use DirectInput
there should be other possibilities, but those are the ones I remember right now.
modified 12-Sep-18 21:01pm.
|
|
|
|