|
how can i make my own custom class wizard for vs.net 2003?
thanks and greets from austria
|
|
|
|
|
Erm..
I don't quite understand what you mean.. The VS.Net 2003 has a class wizard, though it is somewhat different from the ones which ship with VS version 6. The new wizard, I think, is vastly more powerful..
But, the only thing I am aware of is writing new application wizards. I don't know if you can replace the original Class Wizard in any way.. Perhaps there's another way to accomplish what you're after ?
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I have created a socket using WSASocket function with the last parameter as Overlapped flag ie overlapped socket.
Then i have registered it for async. notification of the incoming connection using WSAAsyncSocket fn.(FD_ACCEPT). I am getting notification of the same. After accepting socket connection, i am making the accepted socket non-blocking using ioctlsocket fn. The last parameter specified is unsigned long int with the value as 1. Also i have registered for FD_WRITE notification using WSAAsyncSocket fn. which also make the socket as non-blocking socket. Now when i am pumping data on the accepted socket it is getting blocked if the client app. is reading the data slowly .. i have used WSASend fn to send the data on the network. The last two parameters of the fn is NULL. I should get WSAEWOULDBLOCK error if the send buffer of the transport layer is full but rather it is getting blocked .. i didn't understand why it is getting blocked ??
|
|
|
|
|
So everything works correctly if the client reads the data at normal speed?
I am not familiar with WSAAsyncSocket. Under non-blocking I/O model that utilizes OVERLAPPED I/O such as WSAEventSelect and IOCP, windows updates the process on the size of the actual buffer that has been sent to the remote system.
Kuphryn
|
|
|
|
|
In the debug mode i am restricting the client to read any data. The client is not reading any data but it receives the data at a very fast speed. I have specified NULL for the last two parameter of the WSASend fn.
|
|
|
|
|
hi,
i have an mdb file that i use in my mfc application. i access it thru odbc data source name. i would like to create this datasource name at install time or when i configure the program.
i tried SQLConfigDataSource, it creates the DSN but when i access with kmy app, gives an error.
can someone lead me to the right code?
|
|
|
|
|
SQLConfigDataSource() is the right function. How are you using it? What value does it return? What is the difference between the DSN that it creates and one that you create manually?
bmvbab wrote:
...but when i access with kmy app, gives an error.
What's the error?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
hy, i didnt found out, how i can do this. none of the classes i know, can
load a .avi movie and then get a certain frame as a bitmap, does anybody
has an idea, how i could do this?
thanx a lot!
|
|
|
|
|
Look in the MSDN for "AVIview: Read/Write APIs in AVIfile" for the example prog AviView.
I actually use AviView as a tool to look at individaul frames within an AVI file.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
|
|
|
|
|
hy, sorry, but i didnt found anything with this search string(not on the net and also not in the MSDN)!
and i also didnt found the sample prog AviView.
could you give me more details or an exact link?
thanx
|
|
|
|
|
Well it is on my MSDN! Honest
I found this link http://www.banasoft.net/Links.htm[^]
Or I can email to you it is c. 58 KB zipped including the exe file, I would suggest I email as the link could be wrong, let me know.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
|
|
|
|
|
hy, thanx a lot, i could download it.
the code seems quite complicated, could you maby tell me shortly, how i
can grabb a picture from an avi?
for instance load an avi, and get the 4th bitmap of the movie and store it
in a CBitmap object.
thanx a lot!
|
|
|
|
|
in aviview.c have a look at
lpbi = AVIStreamGetFrame(gapgf[giFirstVideo], 0);<br />
DrawDibBegin(ghdd[giFirstVideo], NULL,lpbi->biWidth, . . .
All drawing to the screen is done via the DrawDib functions, so add your code here to save the data to disk.
I would not say this code is very easy to follow but the concepts are straight forward, it will take a while for you to figure it out though!
Of course the new way to do this is to use DirectX but that is a different storey, the concept is the same just read the AVI frame by frame or jump to the frame you want then read/save it.
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
|
|
|
|
|
hy, the samplecode worked, and it could do what i wanted, but i am sure
there is a easier way, isnt it?
arent there any MFC classes, or tricks, to do this easyer?
thanx andreas
|
|
|
|
|
There are a few wrapper classes on CP, but I did not like any of them! But that is my personal opinion! so search CP for AVI, I came up with these.
I never said the API was easy to follow! After a few months you will realise it is straight forward, it took me ages to figure it out, and I could not really explain to anyone now how it works it is just so badly documented.
http://www.codeproject.com/useritems/aviutil_.asp[^]
http://www.codeproject.com/audio/avigenerator.asp[^]
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
|
|
|
|
|
We would like to find some sample Code source to drive USB port.
Could you help us?
Thanks.;)
|
|
|
|
|
This link (PDF)[^] will give you a headstart by granting some insight on how the USB works.
USB is not a serial port. Having said that, you can't just 'write' into it. You must have a device, which you then open, and to which you then send/receive data. The device driver is the key essential here: it will worry about interfacing your USB device through the bus into your computer's I/O space.
If you don't have a suitable device driver, you need to create one yourself. Writing a USB driver for a device is very tedious. I would suggest you get the Microsoft Driver Development Kit CD from somewhere and first read it's documentation.
Here is another link to a site I've found useful: http://www.beyondlogic.org/usb/usbdevdrvs.htm. It contains some examples and more specifically, the technical details of how a USB port works. Understanding them is a key essential in writing USB device drivers.
Currently, I am not aware if there is a freely distributed raw-access USB port driver available, that is, a device driver that you can open and close like a COM port. I doubt it, though, because of the way USB works: you can plug in any device and it should work properly. Allowing one device driver complete access over the USB would truly devastate it's purpose.
If possible, consider using a serial or pareller port in interfacing your device. If you really must use USB, see the above-mentioned documentations for a start.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I have a simple MFC-Container app (just wizard code). I can add MS Word document.
When I save the document, I get an OLE2 compound document with the embedded word docuemnt.
How can I save the word document by it self, as a *.doc document?
Thank's Tom
|
|
|
|
|
How to implement a callback function in MFC or how to enumerate Process in MFC
|
|
|
|
|
Callback functions are implemented in MFC just as they are implemented in Win32: you create your own function that follows the guidelines specified by the documentation (function return value & parameters), then give this function's address (it's name) as a parameter for the routine that starts the enumeration.
The routine will call your function with the appropriate parameters for each object or instance it finds. In the case of process enumeration, these objects/instances are the different processes running in the system.
The PS API offers an alternative way: it fills a specified DWORD array with the process identifiers. See this page[^] for an example.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
SiddharthAtw wrote:
...how to enumerate Process in MFC
See if Process32First() and Process32Next() help.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
i'd like to update an article that i have posted.
Once there was a 'modify this article' link. Now ,it's gone.
How do i update my article?
|
|
|
|
|
You can only update if it has not been edited by an editor. Otherwise, you need to get hte updated HTML and files and send them in to submit@codeproject.com
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Roger Allen wrote:
submit@codeproject.com
Isn't it webmaster@codeproject.com? This link[^] appears to be confusing...
rechi
|
|
|
|
|
Though not serious, it's most annoying.
I call CTreeCtrl::CreateEx with the WS_POPUP flag specified. (This is why I use CreateEx instead of Create .) Each time there is an assertion failure. When digging into MFC code, one can see the reason. CTreeCtrl::CreateEx is dumbly redirected to CTreeCtrl::Create that does not accept the WS_POPUP flag. If CTreeCtrl::CreateEx called CWnd::CreateEx directy instead then everything would be fine.
Am I right?
And: how to make Microsoft to fix this issue?
|
|
|
|