|
I am currently try to do a dialog based application using the serial port to communicate and control some equipment. However, i find that the behaviour of the windows dialog based application is different from the win32 console application which i written. The win32 application was able to send all instructions and read all the recieved transmission without error. However, when i used back the same functions and write back an almost similar program for my dialog based application, some of the instructions were not sent properly thru the serial port and the recieved transmissions were not read properly. I managed to solve the program of reading the recieved transmission by purging the port before i send an instruction that expect the feedback. However, the dialog based application still causes the equipment to act with a delay, unlike its win32 counter part.
My quesitons are:
1) Why is it for the dialog based application i need to purge the port before i expect a feedback in order to read my feedback properly (but i dont have to do so for the win32 app) ?
2) Is there a difference in using serial port for win32 console apps and dialog based apps ?
|
|
|
|
|
First, win32 console applications doesn't exist. It is either a console application or either a win32 application.
Second, there will be no difference between how the serial port is handled in both cases. You probably did something wrong. Maybe post some code and explai us what exactly the problem is.
|
|
|
|
|
|
But it is still a console app. It is not because you make calls to some functionalities of the Win32 API that your application becomes a WIN32 application.
Or am I wrong ?
|
|
|
|
|
i have to show multiple images on a dialog and move these images as marque in HTML.
so please guide me what i have to do first for this.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Bankey Khandelwal wrote: i have to show multiple images on a dialog and move these images as marque in HTML.
Change the X and Y co-ordinates of these images hence they will appear as moving.
Another option:
Show these images in static controls and move these controls using MoveWindow(...)
Nibu thomas
Software Developer
|
|
|
|
|
can you give me link where i can saw one example for this
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Hello all,
I am new to Windows programming and VStudio.Net.
I am just trying to assess COM1 by writing a simple win32 console project using VS.Net. I built an empty console project and add the files from the MSDN MTTTY example.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp
but I have the following error while compiling:
Linking...
Init.obj : error LNK2019: unresolved external symbol __imp__InitCommonControls@0 referenced in function _GlobalInitialize
Transfer.obj : error LNK2019: unresolved external symbol __imp__timeSetEvent@20 referenced in function _TransferRepeatCreate
Transfer.obj : error LNK2019: unresolved external symbol __imp__timeKillEvent@4 referenced in function _TransferRepeatDestroy
LIBCD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
Debug/Serial_win32.exe : fatal error LNK1120: 4 unresolved externals
Did I miss anything here? How can I get these 4 error fixed?
Besides, I just want to assess the COM ports using DOS style programs and not GUIs, should I must learn win32 API programming?
Thanks very much!
|
|
|
|
|
Hi All,
I have a Exe which needs to be converted into Dll...
I dont know how to proceed on this..Any help please..
Thanks,
Nithya
|
|
|
|
|
i don't think it is possible. Better u create a new Dll workspace and copy paste the function or class u want to export.
nave
|
|
|
|
|
how can i show images on window
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Bankey Khandelwal wrote: how can i show images on window
What kind of window?
Take a look at BitBlt(...)
Nibu thomas
Software Developer
|
|
|
|
|
its easy to show a bitmap on the widnow.
just place a picture control.
create a member variable for that control.
Load the bitmap using the API LoadImage()
Pass the handle obtained from the LoadImage fuction to the SetBitmap() function of the picture control
nave
|
|
|
|
|
This way is not very good but it's a draw image
for draw image use WM_PAINT
Like this
CBitmap m_Bmp;
CBrush *m_brush;
m_Bmp.LoadBitmap('FileName');
//for other formats graphic use OleLoadPicture or cimage
m_brush=new CBrush(&m_Bmp);
m_Bmp.Detach();
HBRUSH CMyCpp::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
//if((pWnd->==this)
hbr = (HBRUSH)m_brush->m_hObject;
return hbr;
}
WM_PAINT is good for draw I suggestion WM_PAINT
OnPaint
First
/*
m_dcSource.CreateCompatibleDC(GetDC());
Bmp.CreateCompatibleBitmap(GetDC(),x,y);
m_dcSource.SelectObject(&Bmp);
then Load bmp file
and ....
*/
CPaint dc(this)
dc.BitBlt(0,0,800,600,m_dcSource,0,0,SRCCOPY)
or
dc.StretchBlt()
dc is destination for draw And m_dcSource is source
|
|
|
|
|
my project title is walking robot vision ...
the purpose of this project is to detect obstacle( develop software). we assume that the obstacle are not moving like chair, table and box. only the web cam that move.
so now i'm looking for any source code that can detect non moving obstacle (camera moving). I've tried run source code that i got, but it not work ...
thanks ...
|
|
|
|
|
since the camera is moving u r unable to identify that wheater it is a camera
movement / object movement.
Right !!
Grab 3 t 5 image in specific intervel of time, see to that the u need to set the time intervel so that , u will not have any motion in the camera with in this interval(THE CAMERA SHOULD BE MOTION LESS WITH WITH THIS INTERVEL ), and u apply some pattern reco./ and also check the size to the stable object,
(but u need to thing over for the very very slow motion obstacles)
ok any how try it , first , it will not be a major problem
Hope u got the LOGIG
and also to forget to inform how far u sucecceded
ALL THE BEST
|
|
|
|
|
what we can do with NAT API?
JAYARAJ
|
|
|
|
|
What do you want to do? Only the Server OS's have a NAT service (Windows 98 and later have Internet Connection Sharing, which has a very primitive NAT implementation), and I don't think it can be configured by other applications.
If you're talking about client-side NAT (using a NAT-enabled firewall), there's no reason to do so - it's completely transparent to your computer.
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"
|
|
|
|
|
The Network Address Translation (NAT) Traversal API provides applications with the ability to configure port mappings on a remote Internet Gateway Device (IGD) that uses NAT. The IGD could be a personal computer running Windows XP with Internet Connection Sharing and Internet Connection Firewall (ICS/ICF) enabled, a personal computer running software that provides NAT, or it could be a dedicated hardware device.
I got these information from MSDN 2003.
JAYARAJ
|
|
|
|
|
i have to do object tracking(vehicle tracking) i.e like a security system.can anyone give me hint how can i do that.
|
|
|
|
|
while interfacing oscilloscope with pc,can i plot real time display of oscilloscope in pc using vc++?
where do i refer?
please do reply..
with warm regards
nimmy
|
|
|
|
|
It depends of what you mean exactly by 'real time' ? What is the accuracy needed ?
|
|
|
|
|
what i am doing actually is z-scan experimetnt to analyze a sample.each sample ll give a unique signature..while doing the experiment,a window should be opened so that the user can input the necessary data.. and with the data energy versus position graph should be plotted..
now it is being done using xmgrace in linux..
my project is to switch it to windows..so i have to find a graph plot software in windows.. can i do it in visual basic or something like that? other interfacing part is written in c.. so i have to call the graph plot part from c..
with warm regards
nimmy
|
|
|
|
|
You can do it in C++ but you'll have to use a win32 app at least (MFC is better because it will be easier). Do you have any experience with the MFC ?
If you want, there are some plot controls on this website. I developped also a chart control that can be used for real-time data (what I did, was to plot a point approx every 30 msec). This was working fine on a PDA so it will work even better on a computer.
If you are interested, I can find the sources and send them to you (I have to search a little for that). But unfortunately there is no real documentation with it.
|
|
|
|
|
i have no previous experiance with MFC..
it would be very helpful,if u can send it.
thanks
with warm regards
nimmy
|
|
|
|