|
Programming in W98 I use _inp() and _outp() in my code to read and write the single bit on parallel port (0x0378-0x037f).
Now in W2000 (or NT system) this code create an error.
How I can move the single bit, or read it, in W2000.
Is it necessary to make a driver?
Now I'm using driver same GiveIO or UserPort but Is this the only solution?
What is the simplest way?
Thanke you, Andrea.
|
|
|
|
|
use CreateFile to create a filehandle to LPT1 and use
WriteFile to write to the port.
|
|
|
|
|
I try to do it, but my question is: how I can write/read the 8 bit of the "status register 0x379" or "control register 0x037a".
In W98 I use _inp(0x378,xx) or _outp(0xo37a,yy) and I can move the single bit of the registers... but now with CreateFile, WriteFile and ReadFile how I can to direct singles resgisters?
Ciao, Andrea.
|
|
|
|
|
Hi, can anyone tell me how to set the path to open a file when do Archive->Open?
Thanks
|
|
|
|
|
First you must tell us what "Archive->Open" is. I've not seen it before so I don't know if it's a third-party program, or something related to your project.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry, I want to say File->Open.
|
|
|
|
|
You'll need to override CDocManager::DoPromptFileName() , which requires you to derive a class from CDocManager .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
My company recently switched over from Vis 6.0 (thank the holy of holies..), but there is an odd corruption which occurs when a change occurs to the resources in the project. Multiple errors occur such as "STRINGTABLE not found" and other identifier-missing-type errors when compiling the newly changed .RC . Of particularly interesting note - in the current .RC file there exists an .MDB file, which if taken out of project prior to changing a resource, and compiling, will not cause such errors. I have NO IDEA what dependency might be linked to that - its pretty crazy... If anyone has a CLUE as to what I can do to keep this from happening, I would give my first child at this point...
-- Lost And Lonely in Resource Land
|
|
|
|
|
I have an application MS Visual Studio.Net, written in C++. I want to monitor memory as I allocate and deallocate memory. How can I do this?
Thanks.
Jerry
|
|
|
|
|
Override new and delete operators
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
How to not ower-paint others child windows in CDialog?
One CStatic child window is owner Drawn,
and paints self in OnPaint() handler.
But it always paints self over others child windows,
is there method to paint it under other child windows?
Tab-order not works?
Thanks
|
|
|
|
|
Tha
vgrigor wrote:
But it always paints self over others child windows,
that is because the static control is over the other window.
I dont know what you are trying to do, but putting two controls over each other is not the right way to design any UI.
If you want to push the static control behind the other contorl then change the tab order of the control.
|
|
|
|
|
Design goal may different,
and not all you may understand before known,
to reject.
I made tab-oreder first for CStatic,
but it again stays on the top.
|
|
|
|
|
First of all you are in a problem and you dont know how to use the dialog editor to place the item on the screen properly and plus you have this attitude.
I did not reject ur design, All i said is the design is not proper and therefore not efficient and now you know why.
|
|
|
|
|
|
Why my editor doesn't paste newlines from clipboard when I copy from IE?And why a CEdit control pastes the newlines?
Thank you.
|
|
|
|
|
You want to look at your editor for the problem. I quickly fired up notepad, and it handled the
newlines when pasting from IE. Similarly, VC++6 handles them fine too.
If you've written your own editor, look at the code which handles the pasting. It may be that
IE just gives newlines, and you are expecting CR-LF (Carriage return / Line feed, or \r\n) pairs.
Iain.
|
|
|
|
|
My apologies. I didn't read your subject line.
I added a rich text control to a dialog, and experienced the same problem as you.
You need to set the ES_MULTILINE style. Either manually, or by ticking the
"Multi Line" option on the Styles property page for the control.
Iain.
|
|
|
|
|
Hi all,
Explanation :
1. I add a new record to an Access table;
CMyTable test;
test.Open();
test.AddNew();
...
test.Update();
test.Close();
2. then, I want to fill a ListCtrl with ALL the record from this table
--> problem, the new record isn't present !
if I wait a little with a loop :
for(long i=0; i<1000000; i++); )
then the new record is here.
Is there another thing better ?
How can I do to be sure that the new Recordset will contain the new record ?
|
|
|
|
|
Without seeing the actual code, it's very hard to tell. Assuming your code is correct, it sounds like it might be a caching problem. Use
CDatabase db;
CMyTable test(&db);
TRY
{
test.Open();
test.AddNew();
...
if (test.Update() != FALSE)
{
test.Requery();
test.MoveFirst();
while (! test.IsEOF())
test.MoveNext();
}
}
CATCH(CDBException, pDBException)
{
AfxMessageBox(pDBException->m_strError);
}
END_CATCH
test.Close(); to see if any DB exceptions are lying in wait.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I do something like this, but there is no CException generated; it's just that the last Record isn't in the Recordset when I re-open it.
CMyRecordset MyRecord;
try
{
MyRecord.Open();
MyRecord.AddNew();
...
MyRecord.Close();
// then I call a function to fill a ListCtrl with all the data from the table
MyRecord.Open();
while(MyRecord.IsEOF() == FALSE)
{
MyListCtrl.Add();
MyRecord.MoveNext();
}
MyRecord.Close();
}
catch(CException *e)
{
...
}
--> I have to do a loop before I re-open the Recordset in the FillListCtrl() function otherwise the new Record isn't in the Recordset !
???
BrutalDeath0
|
|
|
|
|
Set a breakpoint on the MyRecord.Open() statement. Then open the .mdb file and see if the record has been added. Otherwise, see if either of these MSDN articles help:
Q153491
Q153046
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi,
I've been working on a project with two documents types (one controlling a pair of cameras & their capture, one for DIBs). Implementation of the first document type (cameras) seemed to go smoothly, with its own;
- menu
- icon
- string table entry
- CDocument derived class
- CView derived class
- CMDIChildWnd derived class
This class also handles one message from a button on the toolbar. I've also set-up all aspects of the second document type (apart from it uses a standard ChildWnd at the mo) but as soon as I add it to the document template neither document type will start up. i.e. I'm not presented with an dialog option for which document type I want to start with. Has anyone got any ideas why this might be?? does it sound like I've put in dodgy string table entries or is it likely to be something else??
Cheers for any help
Dave
|
|
|
|
|
Dont worry about answering this post. I've found that the quickest & simplest way to fix the problem in my case was to just start again and re-import all the classes I've created. I'm gonna put it down to me messing with the string table entries and 'resource.h' but if I find a more specific reason will post it here.
|
|
|
|
|
I have the following code, which causes a problem on some mashines where I tried to install and run the program which uses it:
CColorDialog dlg;
COLORREF selectedColor;
if (dlg.DoModal() == IDOK) {
selectedColor = dlg.GetColor();
//..
}
//..
Now, the problem occours while the ColorDialog is modaly opened. On some installations it will cause various part pallets and error messages relating to a "missing resource", at which point the system tends to lock up and Ctrl/alt/del is the only way out.
I do use the MFC Library in a shared DLL. My first guess was that it may be because of that, but I do not think so now.
I do not know which step to go next!?
Thanks for any help!
Miki
|
|
|
|