|
If you're using XP there's the included "Windows Movie Maker" which seems to let me put BMPs into the video timeline. Tried that?
|
|
|
|
|
The standard interfaces for soundcards (waveIO, DirectSound) only offer limited functionality (e.g. enumerating capabilities - sampling frequencies only enumerated up to 44k, or enabling the digital loopback that most cards offer)
Are there any other general/quasi-standard API's, or stuff for individual soundcards? Am I missing any?
Peter
Flirt harder, I'm a Coder
mlog || Agile Programming | doxygen
|
|
|
|
|
Well if you want to further down then i guess Createfile, writefile, and apis related to that is ur answer, For this i believe you need to know the specification of the Sound card that you intend to program.
Regards. "When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Hi.
I'm having some troble overriding the HyperLink function in CHtmlEditCtrl.
In what format am I supposed to have my URL that I send into the Hyperlink function?
I've tried with http://www.bla.com
and some variations but it won't accept them, and I don't want to use the auto dialog for adding a link, I wan't to make my own. But then I have to know how to format the LPCTSTR correct.
Anyone who can help me?
Thanks in advance...
/Markus
|
|
|
|
|
I have developing over microsoft platform from the past 3 years. I am quiet a bit stucked in a task, which I would like to discusss with you.
Problem:
1)Read any .exe created on the microsoft platform using File IO operation
2)Store in in a buffer
3)Execute it from the bufffer
4) We donot have the option of writing this buffer to a file and then
execute it. The requirement is to run the executable in the buffer. i.e we cannot use shell commands like ShellExecute, Execv etc.
How do we go about it...? ) It appears to me that asking this question is like runnign a program
for which you may not have the valid permissions or for which you dont
want to leave any trace in the system logs about the file creation. but .. thats just my guess
Hope to see reply soon from forum people
Sincerest Regard's
Imran A. Baset
Imran A. Baset
|
|
|
|
|
Imran Abdul Baset wrote:
How do we go about it...?
You can't.
If the data already exists as a file, why bother reading it into a buffer? It's an EXE, so run it!
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
You can't. The EXE that starts a process must be on disk, because the OS loader uses the memory-mapped file APIs to get the contents of the EXE into memory.
And besides, if you could do what you're suggesting, how would the code in the buffer execute? Each EXE has its own process space.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
If my rhyme was a drug, I'd sell it by the gram.
|
|
|
|
|
I dont think any proper design of any software wants to do what you are looking for... Except you want to do what the operating system wants to do i.e first step towards writing a virus.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Didn't try it myself (and honestly don't see a need for that, creating temp file should work), but here is an idea.
You probably will need to use native api and repeat the steps the OS doing.
Look at ZwCreateSection (create pagefile backed section, map it, write you data there), ZwCreateProcess or NtCreateProcess, NtCreateThread... + some initialization.
The main problem here is the lack of documentation.
How the CreateProcess works:
http://www.microsoft.com/mspress/books/sampchap/4354a.asp
Or you can try to call CreateProcess and by hooking ZwCreateSection and ZwMapViewOfSection trick it into initializaing and executing executing the code in you buffer
Edward
|
|
|
|
|
I do as following:
Why not work?
>code>
HBRUSH cWaitDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// Create a hollow brush used in making static controls transparent
//Transparent static:
if( CTLCOLOR_STATIC == nCtlColor )
{
hbr = (HBRUSH)GetStockObject( HOLLOW_BRUSH );
pDC->SetBkMode( TRANSPARENT );
}
else //PROGRESS --???????? is not
if(pWnd->GetDlgCtrlID() == IDC_PROGRESS_BISY)
{
hbr = (HBRUSH)GetStockObject( HOLLOW_BRUSH );
pDC->SetBkMode( TRANSPARENT );
}
else
{
hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}
return hbr;
}
thanks
|
|
|
|
|
What part of the progress bad do you want to make it transparent, its quite transparent already rite ?
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Progress usually has just same background as
dialog,
but if drawn myself backgrounf of dialog,
I need to make Progress transparent "really".
that's what is need.
|
|
|
|
|
Is it possible to change the bitmap used by a button in the toolbar? I've had a look and it seems the Toolbar bitmap is made out of each of the button bitmaps, but I can't see how to change it during run time for an individual button.
Am I being stupid? Thanks for any help.
Cheers,
Ali
|
|
|
|
|
Use CToolBar::LoadBitmap() to load the toolbar bitmap and CToolBar::SetButtonInfo() to set index in the toolbar bitmap, which points to desired image.
Robert-Antonio
Love, truth and electric traction must gain victory over hate, lie
and diesel traction.
|
|
|
|
|
Thank you for taking the time to help me - at least now I've got a starting point .
I've looked at SetButtonInfo() and that seems to be the right direction to go in. I added it to the OnUpdate handler for the button like this:-
void CMainFrame::OnUpdateButtonModLevel(CCmdUI* pCmdUI) <br />
{<br />
UNREFERENCED_PARAMETER(pCmdUI);<br />
m_wndToolBar.SetButtonInfo(9, ID_BUTTON_MOD_LEVEL, TBBS_BUTTON, IDB_BITMAP_DOWN_ARROW );<br />
<br />
}
I'm definitely on the right lines because now the button is blank!
I think it maybe the last parameter that I've got wrong, the help says "New index for the button’s image within the bitmap." What I've put in is the ID of the bitmap.
Or perhaps I've put the code in the wrong place.
I'll keep trying, any ideas appreciated.
Thanks again.
Ali
|
|
|
|
|
u put the index of the image within the imagelist ... i guess if its a single image image list then use 0
"there is no spoon" biz stuff about me
|
|
|
|
|
I know the use of ShellExecuteEx to show the properties of one item.
It is all nice and handy but what about selecting and showing the properties of multiple files as in windows explorer?
The SHELLEXECUTEINFO lpFile field can only accept one path and I could not find anything about multiple files with ShellExecuteEx in MS documentation.
please help if you have any idea.
Thanks.
avivhal
|
|
|
|
|
I'm trying to create a push button such that when it's clicked on the text on the button changes and the button is depressed. If the button is clicked on again then it gets back to its original state.
Here's the code that I've written:
if(BM_CLICK)
{
//if button depressed return to original state
if(SendMessage(hwnd[ID_BUTTON_START], BM_GETSTATE, 0, 0) == BST_PUSHED)
{
SendMessage(hwnd[ID_BUTTON_START], BM_SETSTATE, 0, 0);
SetWindowText(hwnd[ID_BUTTON_START], TEXT("start"));
}
//else depress button and change button text
else
{
SendMessage(hwnd[ID_BUTTON_START], BM_SETSTATE,1 , 0);
SetWindowText(hwnd[ID_BUTTON_START], TEXT("Pause"));
}
}
My problem is that I can't get the button to get to it's original state. What am I doing wrong here?
|
|
|
|
|
Hi,
Take a CheckBox and set under the properties the 'Push-like' style and try:
void CMyProject::OnMyCheckBox()<br />
{<br />
m_bPushed = !m_bPushed;<br />
if(m_bPushed)<br />
GetDlgItem(IDC_CHECK_BTN)->SetWindowText(_T("Pause"));<br />
else<br />
GetDlgItem(IDC_CHECK_BTN)->SetWindowText(_T("Start"));<br />
}
Hope its helpful
P.
|
|
|
|
|
Thanks for the reply. I got it to work
|
|
|
|
|
I have a rtf editor in a dialog based app and while somebody seaches on the net and copy the information needed he wants not to switch between apps and not to press Ctrl+V , but when he selects and copy he wants the text to be pasted into my rtf editor. I did this but the text is pasted over and over and over again. How can I paste the text, img, text+img just one single time?
When I copy from other app than IE the text is pasted one single time but when I copy from IE the text is pasted over and over again.
The code is the following:
void CMyRtfDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if ( nIDEvent < 900)
{
COleDataObject oleTarget;
oleTarget.AttachClipboard ();
if(oleTarget.IsDataAvailable(CF_TEXT) || oleTarget.IsDataAvailable(cfRTF))
{
if ( MyChangeClip() )
{
PasteText ();
UpdateData();
InsLineBreak();
}
}
CDialog::OnTimer(nIDEvent);
}
bool CMyRtfDlg::MyChangeClip()
{
int nValue;
bool bContent;
// Test to see if we can open the clipboard first.
if (OpenClipboard())
{
// Retrieve the Clipboard data (specifying that
// we want ANSI text (via the CF_TEXT value).
HANDLE hClipboardData = GetClipboardData(CF_TEXT | cfRTF);
// Call GlobalLock so that to retrieve a pointer
// to the data associated with the handle returned
// from GetClipboardData.
char *pchData = (char*)GlobalLock(hClipboardData);
// Set a local CString variable to the data
// and then update the dialog with the Clipboard data
strFromClipboard = pchData;
// Unlock the global memory.
GlobalUnlock(hClipboardData);
// Finally, when finished I simply close the Clipboard
// which has the effect of unlocking it so that other
// applications can examine or modify its contents.
CloseClipboard();
}//end open clipboard
else
{
AfxMessageBox("Can't open the clipboard!!!");
//return true;
}
// -1 if the substring or character is not found
// this means that clipboard content has changed
m_rtf.GetWindowText(m_strFromRtf);
//AfxMessageBox(m_strFromRtf);
nValue = m_strFromRtf.Find(strFromClipboard);
if ( nValue == -1 )
bContent=true;
else
bContent=false;
return bContent;
}
nValue is always -1 when I paste from IE.Can anyone tell me why?
And other question : How can I paste img from Word?
Thank you,
Adriana
|
|
|
|
|
Hello,
I am a beginner in the world of Embedded VC++ programming and am confronted with the following problem:
I have a PDA (iPAQ, Win CE OS) connected to my Laptop. I have to implement a program such that i can write data to the COM port which the PDA has to read and display.Now, I can write seperate read and write programs, but how can I run it simultaneously?Moreover, if the port is open for writing by one program can I open it for reading by another program at the same time?Any pointers in clearing the above queries is most welcome.
Thanks a lot for your time,
Deepa.
|
|
|
|
|
Deepa Gopal wrote:
if the port is open for writing by one program can I open it for reading by another program at the same time?
From my undestanding, since the two programs are running on different machines (laptop and PDA), you just have to make sure both sides have opened the same port using the same settings (e.g. Parity, Flow Control..etc). Have the PDA continously reading any incoming data (ReaadFile()) and the laptop to send the data whenever you like.
Hope it helps in some way.
|
|
|
|
|
hi everyone,
I have a question here and need your help.
I'am writing an program to capture screen real time and by which to generate avi video.
My problem is that I want to get the size of the avi file while writing new frames into it, in order that the user can have an clear idea about how the process is going (the current size of the avi file).
Since the avi file is being opened and written that I can not get a handle to the avi file by "CreateFile" and use it in "GetFileSize".
I think maybe I should calculate the approximate avi file size by "frame size * frame number". But because the avi file maybe in compressed format that I don't know how to decide the size of a frame.
Moreover, if one particular frame is being repeated 100 times in the avi file should I count it for one time or for 100 times ?
Anyway, any information about calculate avi file size while creating it is appreciated.
Thanking you in advance.
------------------
Memory either forgets things when you don't want it to, or remembers things long after they're better forgotten.
|
|
|
|
|
I found no replys to my question.
But I wish that there are somebody that can help me.
Thanks for your reading.
------------------
Memory either forgets things when you don't want it to, or remembers things long after they're better forgotten.
|
|
|
|