|
sir,
i m at msc.final sem, an intrested dev & des a mpeg1 player. i made one by using directshow. i need 2 sep A/V & extract indv frames. how can i? plz send me som src code, becaz i m a newbe for directx. i need to subm this at my col as an assi. i m very much abt that. plz help me.
Ram
|
|
|
|
|
Hi All,
I am new to this site. And need help badly.
I want to Create and access Database(MSAccess) from Windows programming. Can someone please direct me .
Thanks
Valli
|
|
|
|
|
|
PJ Arends
Thank you soo much for your help.
Regards
Valli
|
|
|
|
|
Hi
I just switched from Visual C++ 6 to Visual C++ .NET and converted my old project (.dws) to a solution. Now, when I try to compile my program I get compiler errors I didn't get under VC++6:
CStringArray status;
status.Add("test");
...
cbei.pszText = status.GetAt(0).GetBuffer();
error:
error C2663: 'ATL::CSimpleStringT<BaseType,t_bMFCDLL>::GetBuffer' : 2 overloads have no legal conversion for 'this' pointer
with
[
BaseType=char,
t_bMFCDLL=true
]
what does that mean?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
What is cbei.pszText?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
It's a COMBOBOXEXITEM struct.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Call GetBuffer(0) which will give you a non-const pointer to whatever the current contents of the string are.
--Mike--
"Big handwavy generalizations made from a position of deep ignorance is one of the biggest wastes of time on the net today.
-- Joel Spolsky
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
I still get the same error. I can't understand what an error regarding 'ATL::CSimpleStringT<BaseType,t_bMFCDLL>::GetBuffer' : 2 overloads have no legal conversion for 'this' pointer has to do in context of a simple CStringArray
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How do i get a handle to the child edit window that currently has the focus (in another app)?
Kuniva
--------------------------------------------
|
|
|
|
|
GetForegroundWindow() should work for most controls.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
mm i thought that only got the parent window, but anyways, found a way around it already using keybd_event().
But now i came accross another problem: I'm trying to put text in the edit that has the focus using keybd_event() and sending the keycodes. I'm running XP and i'm doing something like this:
char* message = Hello!";
BYTE scan=0;
DWORD flags=0,info=0;
Sleep(5000); // Sleep for 5 seconds so i can switch windows and set focus to an edit
for(int i=0;i<sizeof(message);i++)
{
keybd_event((int)message[i],scan,flags,info);
}
Now the problem is that i don't get my message at all. Its like the codes shift and take on another value. So what i tried was changing the value of message[i] with a constant. I then found when i substracted 32 i got the lowercase letters to work right, but now my problem is, everything else still doesnt work! The capitals arent right and neither is anything else.. whats causing this?? I thought if u specify a char like that it gives the value from 0 to 255 and its the right ASCII code?? How do i fix this?
Many thanks
Kuniva
--------------------------------------------
|
|
|
|
|
Kuniva wrote:
I thought if u specify a char like that it gives the value from 0 to 255 and its the right ASCII code??
No. keybd_event() takes the virtual-key code of the key. On a keyboard, the lower-case and upper-case letters are produced with the same key. To produce an upper-case key, you have to simulate the shift key being pressed as well. Similarly for an exclamation mark (shift-1). Also, you'll need to simulate the keys being released as well as pressed. You'll have to do something like this:
keybd_event(VK_SHIFT, 0, 0);
keybd_event('H', 0, 0);
keybd_event('H', 0, KEYEVENTF_KEYUP);
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP);
keybd_event('E', 0, 0);
keybd_event('E', 0, KEYEVENTF_KEYUP);
keybd_event('L', 0, 0);
keybd_event('L', 0, KEYEVENTF_KEYUP);
keybd_event('L', 0, 0);
keybd_event('L', 0, KEYEVENTF_KEYUP);
keybd_event('O', 0, 0);
keybd_event('O', 0, KEYEVENTF_KEYUP);
keybd_event(VK_SHIFT, 0, 0);
keybd_event('1', 0, 0);
keybd_event('1', 0, KEYEVENTF_KEYUP);
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP); Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I want to use a SDI project that's derived from the CTreeView class. However, I have some code and specialty functions in a couple of classes already derived from CTreeCtrl. Is it possible to link the CTreeView in the SDI to my classes or derive it's tree control from the classes I have?
|
|
|
|
|
No. It's going to take some work. I would recommend that you look on CodeGuru as Zafir wrote some articles on doing this sort of thing a few years ago. Try the treeview section. If that doesn't work, I know he did it in the listview section. That will just mean more work in terms of figuring out how to make it work for the treeview.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
Maybe it would be easier to put your CTreeCtrl-derived control on a CFormWnd derived class and have it resize the CTreeCtrl to fill the FormWnd completely?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
How would one go about doing that?
|
|
|
|
|
A CFormView (sorry - I gave the wrong class name in the previous post) is
"essentially a view that contains controls.
These controls are laid out based on a dialog-template resource."
<small>(from the MSDN entry <code>CFormView</code>)</small>.
You insert it with the wizard into your project. Place a CTreeCtrl on it.
Now your program should compile and link and the view shows an empty tree.
If you resize the tree, it will probably fill only parts of the view or the view will show scroll bars.
In your View class, override the handler for the message WM_SIZE to resize the TreeCtrl to the entire pane. That does mean, in your OnSize()-function, you call m_TreeCtrl.MoveWnd() with the new dimensions as received as parameters.
Now the TreeCtrl should follow the resizing of your View.
As the last step you can replace the CTreeCtrl with your own derived class. That is done without wizard help, simply by find-and-replace. If you miss one CTreeCtrl, you will get all sorts of funny errors. Just go around and replace the missing CTreeCtrl-occurences in your code.
Sorry if this sounds much, but it is not. The only thing that could be tricky is the OnSize() thing. Try it, and ask here again!
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Isn't the correct function MoveWindow?
How do I get the coordinates of the window into the RECT object. I forgot how to do that!
void CSacmanEditorView::OnSize(UINT nType, int cx, int cy) <br />
{<br />
CFormView::OnSize(nType, cx, cy);<br />
RECT window;<br />
<br />
this->m_ctrlEditorTree.MoveWindow(window);<br />
}
|
|
|
|
|
For getting the coordinates of the View you use GetParent()->GetClientRect(). (The Parent should be the View-pane).
I forgot whether you have to convert that with ClientToScreen().
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Hi, i need to close another applications receiving UDP socket. How would i do this? Do i need to use API hooking to hook the receive function??? or is there an easier way to close a UDP socket and stop the transfer of data??
Please help me, it is for a good purpose (an anti-crash)..
Kuniva
--------------------------------------------
|
|
|
|
|
Is it possible to make another applications TCP socket send some data as if the application sent it itself (so that for example, the sequence numbers would still be correct afterwards)?
Kuniva
--------------------------------------------
|
|
|
|
|
I don't know if an other app can do that, but a hook sure can . I don't know how to close sockets, not my field, sorry..
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
A question for the Thai programmers among us. I am after the MFC language resources that reside in the l.* directories, for building an application in Thai.
I would be most grateful if someone could point me in the right direction. I have searched the MSDN CDs we have here at work, but to no avail.
Happy programming!!
|
|
|
|
|
Just use Visual C++.NET.
Visual C++.Net (2002 or later) already support Thai Language. For Visual C++ 6.0, you need to buy a Thai version of Visual C++ 6.0 IF available I guess or probably Microsoft had provided a language pack.
To change to Thai version of RC (codepage) in Visual C++.Net. Just right click on your resource in the resource tab for eg. your dialog and change the language setting.
To learn to program your application in Thai. Just look for UNICODE string handling routines and tutorials which are available in CodeProjects.
Hope this helps.
|
|
|
|