|
Fantastic! It works perfectly.
Thanks a bunch.
|
|
|
|
|
I am so lost right now. I don't understand why I am getting the hard things to work and not the easy things but I need help with one simple thing. I have made a MFC project in vc++ 6.0 I am figuring I need to edit either the view.cpp/.h or the doc.cpp/.h but one way or the other, I can't figure out how to get a cursor in the document so that text can be typed, let alone saved and edited. Please help.
LOSTTWARE.com
|
|
|
|
|
BTW it is MDI if that helps.
LOSTTWARE.com
|
|
|
|
|
Well, I hate to sound rude or blunt, but I think your first step would be to learn C/C++
Then, try hunting down the functions on MSDN or in your Platform SDK documentation. If you don't know what I'm talking about, go to http://msdn.microsoft.com/ and do a search for Platform SDK.
Ja ne
Jenyka
-
|
|
|
|
|
|
hi,
i have the following scenarios, and i would like to know the solution of the professional developers like you...
with the developing experience you have, what would u do in such scenario's??
would really love to know your thoughts..
scanario1
Situation with customer
You have been briefed what is Automated Call Distribution System and how it integrates to a PBX through MS TAPI for Call Control and Reporting functions.
You have been briefed on the customer's purchase items and call flow.
Your job is to configure according to the call flow, test and train the users.
When you are showing the customer the call flow, the customer start having other ideas and place more requests. They insist it is part of the call flow because the call flow discussed earlier was not detailed enough.
How will you handle the situation.
scenario2
Remote access through dynamic ip
We have a new product requirement that needs 2 PCs on ADSL or 56k dialup (Dynamic IP) to access each other's data and communicate.
Security is required to stop unauthorized access and hacking.
What is your recommended solution?
What is the cost (licensing, development time, etc), limitation and resources required for your solution?
scenario3
VoIP using special voice card
We have a new product requirement that needs to have a call coming into a proprietary voice card connect to someone on the LAN whose PC is running NetMeeting.
The proprietary voice card has C sample codes to show you how to connect 2 person through 2 proprietary voice cards but not 1 card and 1 Netmeeting.
How will you approach the project?
What is the cost (licensing, development time, etc), limitation and resources required for your solution?
scaenario4
VoIP using modem
We have a new product requirement that needs to have a call coming into a voice modem connect to someone on the LAN whose PC is running NetMeeting.
What is your recommended solution?
What is the cost (licensing, development time, etc), limitation and resources required for your solution?
tks al ot for any comments...
really appreciate it...
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Joseph R. Thomas wrote:
Situation with customer
You have been briefed what is Automated Call Distribution System and how it integrates to a PBX through MS TAPI for Call Control and Reporting functions.
You have been briefed on the customer's purchase items and call flow.
Your job is to configure according to the call flow, test and train the users.
When you are showing the customer the call flow, the customer start having other ideas and place more requests. They insist it is part of the call flow because the call flow discussed earlier was not detailed enough.
How will you handle the situation.
Been there, done that
A lot depends on your contract with the customer. You should ensure that they have signed off on the call flow before you begin installation. It sounds like your business analyst has screwed up if you are in this situation. The best advice is to create a balance between what you the customer wants and what they have paid for. If you want repeat business from the client then it is a good idea to be a little flexible, especially when it comes to ACD installations. A customer may not always know what they want until they see/hear the system in operation. You have to weigh up the costs of the changes against future business. It's something that only comes with experience and not something you can learn whilst doing your homework.
Michael
'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space
|
|
|
|
|
is it possible to create a simple application and delete it while it is running?
ie:
run c:\mySimpleApp.exe
(the app. copies itself-mySimpleApp.exe to memory space with CMemFile ???)
delete c:\mySimpleApp.exe but process is still running
obviously the challenge is to overcome "the application is currently in use" dialog.
any ideas?
|
|
|
|
|
You cannot delete a file while it is being executed (access denied).
BTW CMemFile is just like CFile but it writes to and reads from memory instead of hard disk.
If you mean the Task manager by "the Application currently in use" then this is impossible, you cannot hide runnig processes from it.
Bunburry
|
|
|
|
|
Hello,
I am trying to add video capturing to my application using a USB webcam. My application is an MFC application. I am trying to use the 'capCreateCaptureWindow' function as I found stuff about this on the msdn library. However, I am fairly new to Visual C++ and MFC applications so I was wondering if anyone could possibly talk me through the process? There's lots of stuff about this on the msdn library but I'm getting confused.
I know I should somehow create a capture window of the AVICap window class and connect it to a video driver and then the capture window should be ready to capture data. But how do I do this in practice?
If anyone has time, could they please talk me through each step of this process?
Alternatively, if anyone knows any good tutorials on how to capture video, could you please send me a link?
Thank you for your time.
|
|
|
|
|
Make sure that your webcam supports video for windows.
From personal experience VFW can be a pain to develop with and isn't really supported as much anymore (although I'm willing to stand corrected on that point). Although it takes a while to learn, DirectShow is certainly worth the effort. If you go to DirectShow you have the benefit of the sample applications distributed with the DXSDK to help you get started. Some of which may require minimal effort of modify to suit your purpose.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Andrew,
do u still remember which sample in DXSDK is about capture screen or capture window? i can't find it.
thx.
includeh10
|
|
|
|
|
Look at the AMCap (?I think) sample to see how to render to a user specified location. Alternatively you could write your own renderer filter.
If all you want to do is capture a frame Microsoft provide a grabber sample to grab a sample from a running filtergraph.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I am doing a project where I use functions in C to create letters on the output screen. I need a function which outputs a slope of letters down the screen(examples are below):
1)AAAA 3) XXX XXX
AAAA XXX XXX
AAAA XXX XXX
AAAA XXX
2) AAAA 4) XXX
AAAA XXX XXX
AAAA XXX XXX
AAAA XXX XXX
If anyone could help with a c function which would print any of these outputs, it would be appreciated. Thanks.
|
|
|
|
|
I need help about how to use OpenSSL library.
Is there any sample on the Web I can use ?
|
|
|
|
|
What is it you are trying to do?
|
|
|
|
|
I want to write simple https client..
Is there any good tutorial you can point me to?
|
|
|
|
|
I was astounded when I saw how you program with longhorn, it was easy fast, flexible, AND VERY POWERFUL The user interface was really good looking and VERY EASY TO MANIPULATE. WinFx is very good since .net developers wont have to learn alot of additional stuff. Everything in winfx is CUSTOMIZABLE. As being a c++ programmer, I have seen the future , I will program in visual c++ 6 until probably after the year 2003 (next year) on the .net framework to get a little started. If anyone wants to see the light, go see 2 below movies,
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20031028LHORNDB/manifest.xml[^]http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20031107WINFXBA/manifest.xml[^]
The first one is about an hour long, though worth it, and the second one talks Very breifly about WinFX, about 10 minutes.
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Hello!
I'm making some kind of file viewer.
but I can't open "next file" in program....
I want to open files with NEXT or PREV button : like 'ACDsee'.
How can I do this?
I use OnOpenDocument for file open and use CDvApp::OnFileOpen().
first, I try CFileFind class to find files. but can not find current Dir and
that have only FindNextfile func.
following: using CFileDialog.
CFileDialog fileDlg(TRUE, NULL, NULL, OFN_HIDEREADONLY, szFilter);
if(IDOK == fileDlg.DoModal())
{
OpenDocumentFile(fileDlg.GetPathName());
POSITION pos = fileDlg.GetStartPosition();
((CDvMenu*)pMenu)->NextPath = fileDlg.GetNextPathName(pos);
}
in this, NextPath have not 'next'. It is same as current-opened file's.
Why this?
|
|
|
|
|
Analysis of the posted code:
The 'GetStartPosition' and 'GetNextPathName' methods are used to run through a list of selected file names. To enable this kind of behaviour, your FileDialog must sport the 'OFN_ALLOWMULTISELECT' style. Now, when the dialog is shown, you must select multiple files by holding CTRL or SHIFT down when clicking names.
After the call to DoModal returns (you click Ok), the file list is ready, and can be browsed through by using the above mentioned methods. Remember to check the return values of GetStartPosition and GetNextPathName. First one returns NULL if there is no file list, and the latter returns NULL if the list has ended.
From your description, however, I understood that you wanted to create a quick file preview/browser application. For this purpose, you should approach the problem from a bit different perspective: create a list of existing files in a directory, and move through this list when the user is clicking the buttons.
The MFC class CFileFind is perfect for this purpose: first use it to enumerate the file names in the current directory, and save these to e.g. a list of CString objects (CString strList[MAX_NUMBER]). Now, at the start of the browsing, initialize the position integer (iPos) to zero, and open the file pointed to by strList[0]. When user clicks 'prev' or 'next', increase or decrease the iPos value and re-open the file. Remember to close the currently open file first, though, or you might end up with a HUGE memory leak of open file handles.
Here is a code fragment to get you started. It will enumerate through the current directory, accepting all files. These file names are written to a static CString list. This list must be a member of your application class, so it doesn't go out of scope after the enumeration returns.
void EnumerateFiles(void)
{
int iPos = 0;
CFileFind cfFinder;
BOOL bContinue = cfFinder.FindFile("*.*");
while (bContinue)
{
bContinue = cfFinder.FindNextFile();
strList[iPos] = cfFinder.GetFileName();
iPos++;
}
cfFinder.CloseSearch();
return;
}
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I'm using the class wizard in Visual Studio 6 to create OnLButtonDown() and OnLButtonDBClick() handlers, searching for hits in the same region. How do I avoid executing my OnLButtonDown() handler for double clicks?
Jason
|
|
|
|
|
If you used the App Wizard to create the project for you, then go to your main window's (Frame window or dialog) PreCreateWindow override. If you don't have this override yet, create it by using Class Wizard.
In this override, you must register a new window class (AfxRegisterWndClass) with 'CS_DBLCLKS' class style, and place the return value of the registration call to the class name member of the CREATESTRUCT structure. Now, whenever user double-clicks the mouse over your window, a WM_LBUTTONDBLCLK / WM_RBUTTONDBLCLK message is generated for the window.
Here's a code fragment to help you out:
BOOL CMyDerivedCWnd::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS, NULL, NULL, NULL);<br />
<br />
return CWnd::PreCreateWindow(cs);<br />
}
The single-click and the double-click are seperate events. You create the first by clicking once, and you generate the second by clicking twice quickly. So, when you do a quick double-click, only the double-click event is sent, providing that your window class style supports double-click messages, as specified above.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hmm, I must be using the wrong messages. I tried adding the code frament suggested, however, I'm getting the same results. When I double click the region, the single click (WM_LBUTTONDOWN) event is handled first, followed by the double click (WM_LBUTTONDBCLK) event. In other words, both event handlers are being called. Are these the correct messages to use for this?
Jason
|
|
|
|
|
If you need to have specific, unconditionally seperate handlers for the single-click and the double-click, then I think you should consider a completely different approach: capture the mouse and monitor it's clicks. If a click is made, and another click is not made in the next 20-50 ms, then a custom WM_LBUTTONDOWN message is generated, otherwise, a custom WM_LBUTTONDBLCLK message is made.
Doing this MFC-way would mean resorting to a little more than an outright hack..
This means that in addition the standard WM_ handlers, you must create more UINTs for custom WM_ messages, such as WM_CUSTOM_L/RBUTTONDOWN and WM_CUSTOM_L/RBUTTONDBLCLK (this would mean four new UINTs), which your application then handles. In the standard handlers, you calculate the time span between clicks, and determine the custom message based on these calculations.
A bit more work, but doable, I think. For example, add two timers, both with a custom WM_CUSTOM_TIMER1/2 message applied, to your application, which you start and stop with the clicks. When a WM_L/RBUTTONDOWN message is received, the timer is started. If a new message of same type is received and the timer is still running, then the timer is stopped and a WM_CUSTOM_L/RBUTTONDBLCLK message is generated. If the timer is allowed to run to it's first 'WM_CUSTOM_TIMER1/2' handler, it generates the WM_CUSTOM_L/RBUTTONDOWN and stops itself.
In addition to this, you should override the WindowProc member function to get a direct access to the window procedure and message handling of your application. Alternatively, you can also write the required message map entries manually. Use ON_MESSAGE ( <Message ID>, <function name> ) entries in the map.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
When you double-click, three messages are generated
WM_LBUTTONDOWN<br />
WM_LBUTTONUP<br />
WM_LBUTTONDBLCLK
You can set a timer in the LBUTTONDOWN handler, then if the LBUTTONDBLCLK message arrives, kill the timer. Otherwise, when the timer fires, run your single-click code (and also kill the timer, so it only fires once).
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."
-- Paul Watson, Linux Zombie
|
|
|
|
|