|
By using escapecomm function we can set DTR but it the goes off after the insruction execute. Is there any other method to set it permanantly on and checking DSR other than using loop.
|
|
|
|
|
U can, u have to set the DCB. In order to stop looping u have to wait for event notification, then go check the serial by getmodemstatus
A usefull class:
http://www.codeproject.com/system/cserialport.asp
Papa
Murex Co.
|
|
|
|
|
Also you have to open your serial port in overlapped mode.
|
|
|
|
|
Hi!
I need to know the structure of the library (.lib), and to understand when and how it is created. Can somebody point me to the right direction. The "LIB Reference" of MSDN is too less than enough.
Thanks in advance.
Regards,
Gennady
|
|
|
|
|
*.lib files are library files that may contain functions and or classes. A static lib is one which can be linked with an executable such that the exe is appended with the entire library. For dynamic libs, the lib files only contain the definitions and some meta information. When the exe is run, the exe will load the required dll that corresponds to the lib file and call the functions.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
Hi, Nish!
I know what it is the .lib in common. This "some meta" is exactly of my interest. For example: how the call to the DLL exported functions implemented in the export lib? Is ordinal used here, may I manage this and how?
Sure there is a lot of info concerning this issue. I don't want to annoy the community with online questionnaire, so I've asked for references.
Thank you anyway.
Regarads,
Gennady
|
|
|
|
|
Try searching MSDN for DumpCOFFLibFile . It's inside an article written by Matt Pietrek and should at least give you a starting point.
|
|
|
|
|
please answer me at this wenpage if you know,
i need to use that programming in windows 98 now,
past, i try but cannot compile windows 2000 code in this
O/S.
|
|
|
|
|
Win2K API calls that were not present in 98 WILL NOT work on Win 98! Don't even attempt it. If you want to create an app that runs on 98/NT/2K etc. use only those calls that are valid on a Windows 98 machine!
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
You must elimate the errors.;)
Don´t call these functions under win98 -> change the code: if( !bwin98 )
Another way it to load the dll dynamic and if it doesen´t you can´t do that.
|
|
|
|
|
I am working on a project.The problem is that I want to make a control which connects to the database and shows the contents as a display in moving form i.e a moving text display.I am not surte whether to use a CStatic class.If yes how to display a moving text in it.If not what to do??
|
|
|
|
|
How about a simple window redrawing the text with the help
of a timer ??
|
|
|
|
|
The project I am trying to make is in ATL.More over the effect should of a moving banner.
The data to be displayed will be coming from the database and constantly changing.
How do I redraw the text?? There is no WM_PAINT in ATL
|
|
|
|
|
|
As above,
is there any thing i need to follow in order for it to work?
Sometime it works sometime it does'nt.
Thanxs
|
|
|
|
|
Get Visual Assist from www.wholetomato.com. It fixes and enhances it.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Thanxs. it's really a good addon for visual c++.
Thanxs again!
P.S. I think i'm getting spoilt by Visual Assist
|
|
|
|
|
Hi,
I have the problem with the ListControl printing. I can print out the contents of the ListControl but I "can not print" the Header Column titles. I can read the them and print as text, but the Font, size, tab and spacing are too hard for matching with the ListControl contents (because the ListControl frame can be position differently and print out (Client) also different method! Here is my print out the ListControl program
==========================================================================
void CNewDlg::OnBntPrint()
{
CPrintDialog dlg (FALSE);
RECT rc;
DIBSECTION ds;
if (dlg.DoModal() == IDOK)
{
HDC hdc = dlg.GetPrinterDC();
CDC dc;
SaveDC(hdc);
DOCINFO docinfo;
memset(&docinfo, 0, sizeof(docinfo));
docinfo.cbSize = sizeof(docinfo);
docinfo.lpszDocName = _T("CDC::StartDoc() Code Fragment");
dc.Attach(hdc);
if (dc.StartDoc(&docinfo) < 0)
{
MessageBox(_T("Printer wouldn't initalize"));
}
else
{
if (dc.StartPage() < 0)
{
MessageBox(_T("Could not start page"));
dc.AbortDoc();
}
else // ***> actually do some printing
{
int oldMapMode = dc.SetMapMode(MM_ISOTROPIC);
CSize ptOldWinOrg = dc.SetWindowOrg(-30, -30);
CSize ptOldWinExt = dc.SetWindowExt(1, 1);
CSize ptOldViewportExt = dc.SetViewportExt(4, 4);
m_report.Print(&dc, PRF_OWNED);
m_report.Print(&dc, PRF_CHILDREN);
m_report.Print(&dc, PRF_NONCLIENT);
m_report.Print(&dc, PRF_CHECKVISIBLE);
m_report.Print(&dc, PRF_CLIENT); // print the ListControl contents!
}
dc.EndPage();
dc.EndDoc();
RestoreDC(hdc,0);
}
}
}
==============================================================================
Is there any way to print the Header Column titles? Did I miss some thing here?
Thanks for all advices,
ThanhChau
|
|
|
|
|
I've never tried doing this, so i can only guess, but - have you tried calling m_report.Print(&dc, PRF_CHILDREN); after the call m_report.Print(&dc, PRF_CLIENT); ?
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Hi Shog,
I did and the result is the same, for now it prints like this:
- ListControl frame including Horizontal scroll bar (without the Header column frame)
- Whatever contents inside the ControlList Dialog (print inside the ListControl frame)
Thanks, might be you have any other suggestions,
|
|
|
|
|
So you see the frame, then a space where the header should be, and then the list contents?
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Hi Shog,
Not like you said: Imaging you see the ListControl on the Monitor Screen with its Header Columns & its contents (as it is supposed to be)! Then when I print, it printed just like that ... except there is no Header columns
Hints: If you use in MFC a ListControl dialog, then goto its property, select Style --> Select View --> Select "Report"! Then you should see a ListControl with a Header Column (default title "Color")
***> If in the Style property, you check "No Header column" option then that Header column row ("color") disappeared!
My print out just do like that (even I "did not" check the "No Header column" option!
I hope this Hint will explain what is my problem!
Thanks,
|
|
|
|
|
Replace all the print lines you have now with one that combines the flags:
{
int oldMapMode = dc.SetMapMode(MM_ISOTROPIC);
CSize ptOldWinOrg = dc.SetWindowOrg(-30, -30);
CSize ptOldWinExt = dc.SetWindowExt(1, 1);
CSize ptOldViewportExt = dc.SetViewportExt(4, 4);
m_report.Print(&dc, PRF_NONCLIENT|PRF_CLIENT|PRF_CHILDREN);
}
This will work. BTW: you may want to play with your size calculations a bit - the list prints fairly small...
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Whats the best way to keep track of any number of regions at one time so that I can move them when ever I need to? The number of regions I'm dealing with can be any number.
|
|
|
|
|
That's sort of a broad question... You could use an array, a list, a map... It really depends on what your needs are in storing and retrieving them.
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|