|
I am using URLDownloadToFile to download a url, but default download manager like DAP intercepting the download. Is there a way to make it downloadable without using default download manager.
|
|
|
|
|
Does anyone know how you can add an effect over a timeline track, with a lower priority over a transition applied on the same track using DirectShow Editing Services?
I have 2 video tracks with a transition between them, the first track contains green colored areas (0, 255, 0) and the second track is applied over the first using a key transition over the green areas. I want to add an effect over the first track (e.g. Grayscale)... now the problem is that the effect applies itself before the transition, thus changing the key transition color, and the second track doesn't appear anymore.
Is there anyway to apply the effect after the transition?
Thank you!
|
|
|
|
|
Do you people ever come across problem that this does not work?
HBITMAP hBmp = ::LoadBitmap(NULL, MAKEINTRESOURCE(IDB_BITMAP2));
I got 0 returned by the above func. Why? I am always in a bit of struggle with bitmap as I have not done much with it. Anyone can shed some light?
My bitmap is created in dev studio.
|
|
|
|
|
You have to pass the handle to the application instance as first parameter function.
|
|
|
|
|
The code is from Msdn website. I just mangaged to get it work:
BOOL CMFCPlayingPenDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
.....<br />
DWORD dwStyle = WS_CHILD|WS_VISIBLE|SS_BITMAP|SS_CENTERIMAGE;<br />
m_staticX.ModifyStyleEx(0, dwStyle);<br />
HBITMAP hBmp = ::LoadBitmap(0, MAKEINTRESOURCE (IDB_BITMAP1));<br />
m_staticX.SetBitmap(hBmp);<br />
}
The strange thing is that I did not change much but this time bitmap was loaded. However, the bitmap does not appear on my static ctrl...
|
|
|
|
|
Is that working if you pass the handle of the application instance as first parameter as I suggested in my first post ?
Laffis wrote:
The strange thing is that I did not change much
Laffis wrote:
HBITMAP hBmp = ::LoadBitmap(0, MAKEINTRESOURCE (IDB_BITMAP1));
What did you change EXACTLY at this line of code (post what was shown on the MSDN website).
|
|
|
|
|
I tried to ::AfxGetInstanceHandle() and passed it replace 0 with the instance handle. Bitmap still gets no-shown.
cedric moonen wrote:
What did you change EXACTLY at this line of code (post what was shown on the MSDN website).
I played about the static ctrl the bitmap is supposed to attach to. I may have modified style, and later create a derived class off CStatic, that's about it. The CStaticX class does nothing special inside apart from the code generated by Wizzard.
|
|
|
|
|
Hello guys,
Hope you can help me ....
I wrote a Dialog MFc Application, I use a TreeControl for displaying hiearachical item.
I want to use a contextmenu for each item (Actually I put the menu on the dialog OnInitMenuPopup() event) but the menu is not display !!!
Only a little band on the writeis display ? What can i do for getting a working context menu ??
Thanks in advance
|
|
|
|
|
There is an event for the TreeCtrl.
NM_RCLICK
You need to handle this notification message.
To show the context menu on it:
CMenu m;<br />
CMenu* p;<br />
m.LoadMenu(IDR_MENU1);
p = m.GetSubMenu(0);<br />
CPoint pt;<br />
GetCursorPos(&pt);<br />
p->TrackPopupMenu(0,pt.x,pt.y,this,NULL);
this is this.
|
|
|
|
|
|
Hello,
I would like my MDI application to start without any doc/view window. How do I do that? I've tried to override OnCreateClient in ChildFrm but that only generates a message box that says "Failed to create empty document".
Thanks...
|
|
|
|
|
Change your CWinApp::InitInstance function.
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;
if (!ProcessShellCommand(cmdInfo))
return FALSE;
Insert line in bold in code before ProcessShellCommand
|
|
|
|
|
If you mean that you dont want
any intial window that appears
in a MFC project generated by wizard.
then add this code to your applicaton.cpp file in InitInsatance function.
CXyzApp::InitInstance()
{
// CG: The following block was added by the Splash Screen component.
\
{
....
....
.....
....
...
....
....
// create main MDI Frame window
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_APPMENU))
return FALSE;
//->---------------no empty document window on startup------------------------
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
//->--------------------------------------------------------------------------
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
.....
.....
....
}
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Thank you,
everything works perfect now.
/Toomas
|
|
|
|
|
Hello, lets take a look at the STL.
We have
<br />
std::multimap<sth*, sth*> pairs;<br />
<br />
void remove(sth* s1, sth* s2)<br />
{<br />
std::multimap<sth*, sth*>::iterator i;<br />
if ((i = std::find(pairs.lower_bound(s1), pairs.upper_bound(s1), std::make_pair(s1, s2))) != pairs.end())<br />
pairs.erase(i);<br />
}<br />
Well that doesn't work. I get MANY template compile errors (really hard to read, and rearly make any sense). I'll give you a small sample:
<br />
f:\Microsoft Visual Studio .NET 2003\Vc7\include\algorithm(31): error C2784: 'bool std::operator ==(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Ax> &' from 'std::allocator<_Ty>::value_type'<br />
with<br />
[<br />
_Ty=std::pair<sth *const ,sth *><br />
]<br />
<br />
f:\Microsoft Visual Studio .NET 2003\Vc7\include\algorithm(31): error C2784: 'bool std::operator ==(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'std::allocator<_Ty>::value_type'<br />
with<br />
[<br />
_Ty=std::pair<sth *const ,sth *><br />
]<br />
<br />
f:\Microsoft Visual Studio .NET 2003\Vc7\include\algorithm(31): error C2784: 'bool std::operator ==(const std::list<_Ty,_Alloc> &,const std::list<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'std::allocator<_Ty>::value_type'<br />
with<br />
[<br />
_Ty=std::pair<sth *const ,sth *><br />
]<br />
I think you get the idea. All the compile errors point inside std::find() where the arrow points:
<br />
template<class _InIt,<br />
class _Ty> inline<br />
_InIt find(_InIt _First, _InIt _Last, const _Ty& _Val)<br />
{
for (; _First != _Last; ++_First)<br />
----> if (*_First == _Val)<br />
break;<br />
return (_First);<br />
}<br />
I just can't understand where the problem is. Everythink looks fine to me, but obviously it isn't.
Anyother idea how am I supposed to erase a single pair from a std::multimap()? I can only find functions that erase all <key_value, mapped_value=""> pairs for a specified key but I just need to erase one of those pairs given a specified mapped_value.
That all,
Themis
PS - std::remove() also doesn't work as it relies on std::find() (at least in VS .NET 2003 implementation)
-- modified at 6:08 Friday 23rd September, 2005
PS2 - I don't know if you are already aware of that but the code tags of the forum are not rendered properly with the Firefox Browser.
|
|
|
|
|
Themis wrote:
PS2 - I don't know if you are already aware of that but the code tags of the forum are not rendered properly with the Firefox Browser.
I haven't noticed anything wrong with the code tags. Are you sure your HTML is correct?
|
|
|
|
|
Yes I just read my message in firefox (browser I use) and then reloaded it in IE (just because of curiosity) and saw that in IE code blocks are printed red and the rest black. However in firefox everything is printed in black until a code block begins, then everything below that point prints in red, even after the code block end. Anyway that just a note.
Themis
|
|
|
|
|
Hi all
I am using IImnAccountManager interface for outlook express email accounts.
This interface requires imnact.h header file I downloaded this file from link
http://ftp.teklynx.fr/online//31-%20IDEAM/PPCSDK2000/Program%20Files/INCLUDE/IMNACT.h
I am writing this code
<br />
IImnAccountManager m_pImnAccountManager;
<br />
m_pImnAccountManager = NULL;<br />
<br />
HRESULT hr = CoInitialize(0);<br />
if(FAILED(hr)) <br />
{<br />
MessageBox(_T("Error CoInitialize."));<br />
<br />
}<br />
<br />
hr = CoCreateInstance(CLSID_ImnAccountManager, <br />
NULL,<br />
CLSCTX_SERVER, <br />
IID_IImnAccountManager,<br />
(LPVOID*) &m_pImnAccountManager);<br />
<br />
if(FAILED(hr)) <br />
{<br />
MessageBox(_T("Error creating OE Accounts."));<br />
<br />
}<br />
<br />
hr = m_pImnAccountManager->Init(pAdviseMigrateServer);<br />
if(FAILED(hr)) <br />
{<br />
MessageBox(_T("Error initializing OE Accounts."));<br />
m_pImnAccountManager->Release();<br />
<br />
}<br />
<br />
m_MailList.ResetContent();<br />
<br />
<br />
return TRUE;
}<br />
<br />
when I use this code then it gives errors
/*-------------------------------------------
Linking...
OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _CLSID_ImnAccountManager
OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _IID_IImnAccountManager
Debug/OutlookAccount.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
OutlookAccount.exe - 3 error(s), 0 warning(s)
/*-------------------------------------------------
Though I have included imnact.h file.
Please suggest me.
Thanks
|
|
|
|
|
rajeevktripathi wrote:
http://ftp.teklynx.fr/online//31-%20IDEAM/PPCSDK2000/Program%20Files/INCLUDE/IMNACT.h
you forget to download corressponding _i.c and _p_c
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
You use the tlb or idl files to extract the objects information..
You can do this by using #import<..>
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
After making my Visual c++ program where I use SQl server 2000 database, How can I make a package of my .exe file and database so that I can install it in others Pcs without installing the database program used.
I learn my self
|
|
|
|
|
|
for primitive data type, i am able to initialize them in static scope:
class x {
public:
static int var[];
};
/* We are able to have var initialize before x object being instance. */
int x::var[] = {1, 2, 3};
However, for a stl map, how i can have elements inserted into it in static scope too?
class x {
private:
static map<int, int=""> var;
};
/* The below code will generate compile error. */
/* I wish to have elements to be inserted into map before x is instanced. How I can do so? */
map<int, int=""> x::map = {
{1, 2},
{3, 4}
};
Thanks!
cheok
-- modified at 5:11 Friday 23rd September, 2005
|
|
|
|
|
where did you see you could access a private member from outside the class like that ?
second point : did you have a look at how a map was working ?
<font color=blue>class</font> x {
<font color=blue>private</font>:
<font color=blue>static</font> std::map<your_key_type, your_value_type> var;
<font color=blue>public</font>:
x();
<font color=blue>void</font> InsertInMap(your_key_type k, your_value_type v);
};
x::x() {
<font color=green>
}
<font color=blue>void</font> x::InsertInMap(your_key_type k, your_value_type v) {
x::var[k] = v;
}
<font color=blue>void main</font>(<font color=blue>void</font>) {
x myX;
x.InsertInMap(1, 2);
x.InsertInMap(3, 4);
}
next time, read the docs...
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 5:26 Friday 23rd September, 2005
|
|
|
|
|
Mmmh, I think you read his post a little bit too fast
toxcct wrote:
where did you see you could access a private member from outside the class like that
That's the way of initializing static member variables. This is done in the cpp file in that way:
int X::MyVar = 0;
Otherwise you will have a linkking error if you don't do it.
toxcct wrote:
second point : did you have a look at how a map was working ?
He was asking how to fill the static map with data the same way you initiliaze the static variable. But unfortunately, I don't know if it's possible.
toxcct wrote:
next time, read the docs...
next time, read the post... ;P (just for kidding of course )
|
|
|
|