|
xkrja wrote: Is there code available for this kind of communication
Lots of. What you need first is the description of your LCD device. Google for API or your display name and C++, you'll find a lib that wraps the serial port for talking with it.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Thanks for your answer. I've searched for hours after libraries but haven't found any. Are there really libs for such small displays (for example 16x2 characters)?
Thanks again!
|
|
|
|
|
You have to find the documentation for the display. Then you can write a program that uses the Serial or Parallel Port API's to send signals that the display understands.
Your best bet is to try an amateur robotics website like http://www.seattlerobotics.org/[^]
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Most such displays are serial devices, and are easily programmed. As such there is no real need for a library.
The pixel based devices are often somewhat harder to program, but not by much. For those you'll have to render text yourself (preferably to a back buffer which you transfer to the display - in full or partial updates if speed is of concern).
--
A Stern Warning of Things to Come
|
|
|
|
|
Ok, thanks for your answer!
|
|
|
|
|
With Windows98 I could set the paper size and everything was ok. After I install WindowsXP my settings are ignored.
This is the code that works on Windows98:
.....
CPrintDialog *printDlg =new CPrintDialog(FALSE, PD_ALLPAGES | PD_RETURNDC, NULL);
// Initialize some of the fields in PRINTDLG structure.
printDlg->m_pd.nMinPage = printDlg->m_pd.nMaxPage = 1;
printDlg->m_pd.nFromPage = printDlg->m_pd.nToPage = 1;
// Display Windows print dialog box.
if (printDlg->DoModal() != IDOK)
return;
LPDEVMODE lp = (LPDEVMODE) ::GlobalLock(printDlg->m_pd.hDevMode);
ASSERT(lp);
lp->dmPaperSize = 256;
lp->dmPaperLength = 3050;
lp->dmPaperWidth = 2970;
::GlobalUnlock(printDlg->m_pd.hDevMode);
HDC hdc = printDlg->CreatePrinterDC();
CDC *pDC = new CDC;
pDC->Attach (hdc); // attach a printer DC
pDC->StartDoc("test");
......
|
|
|
|
|
Hi,
I wonder if anybody knows which is the control used by the Microsoft Visual Studio .NET in the properties window. I mean the one you can group by categories (and toggle the category expansion) or alphabetically.
Thanks in advance.
|
|
|
|
|
i want to create a dialog base application.
and i put one button in a dialog . i create one more dialog and in this i want to add icons with text as one control(and i want to work it as button)how can i do it?.
then in by clicking the button in main dialog this dialog will be displayed as menu..just as attaching to button i want to diaplay it form down to up.
|
|
|
|
|
kiranin wrote: Display Dialog as Menu
Why don't you create a pop up menu that has icons and text?
That would be much more easier and efficiently done.You can show the menu when you click on the button.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yeah but i want the look similar to, when we click the start button in Windows .
|
|
|
|
|
the start menu do IS a menu, not a dialog...
|
|
|
|
|
kiranin wrote: click the start button in Windows
Yes so you can always customize a menu keeping it's style as popup and showing bitmaps etc where you want alongwith the text. There are a lot of articles on CP that would help you build on this
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Do you want to create a button with icon and text?
|
|
|
|
|
Yaa i want button with text and icon
|
|
|
|
|
|
Hallo,
trying to rebuild or clean a project results in error PRJ0008:
Could not delete file 'e:\Projekte7\common\bin\debug\english'
with the "file" being my output folder. I'd like to know how I can stop Visual Studio from trying to remove the folder itself - of course it can't be removed because it's the output folder for several projects and is usually not empty after cleaning a single project.
In the project settings I found an entry "Extensions to delete on clean" where "$(TargetPath)" had been entered magically by the Visual Studio god. Unluckily simply removing this was far too obvious and didn't change anything, still rebuilding will fail when trying to delete my output folder.
Does anybody know what makes Studio trying to remove the output folder itself? It seems to be a minor problem which can be worked around with an extra mouse click, but I can't rebuild larger solutions due to this behaviour and have to do it all step-by-step.
Thanks for any hint.
Rita
|
|
|
|
|
Hi all,
I am creating a Edit Box Dynamically in CDialog Box. And when i Right Click on the Edit Box what i have created i want to show a Menu.
//===========================================================================
//Source for Creating the Edit Box when mouse is clicked.
CEdit *ptr = new CEdit;
ptr->Create(WS_VISIBLE|WS_CHILD|WS_BORDER|WS_TABSTOP|ES_AUTOHSCROLL,CRect(point.x,point.y,point.x +100, point.y +20),this,NULL);
//===========================================================================
Now i am not able to handle an event to this dynamically created Edit Box. I want to Handle the RButtonDown Event for every Dyanmically Created Edit Box. i Mean when ever i Right Click on the EditBox what i have Created i want to Populate a Menu using TrackPopUpMenu(...) Api.
please help me out.
Uday kiran
|
|
|
|
|
uday kiran janaswamy wrote: want to Handle the RButtonDown Event for every Dyanmically Created Edit Box
Refer ON_COMMAND_RANGE[^] macro..
Do your Duty and Don't expect the Result
|
|
|
|
|
hi appu,
The Function ON_COMMAND_RANGE(id1, id2, memberFxn )
Which is only the Command Range.
this used to specify the idientifier1 to indentifiern a Member Function.
But my doubt when ever i click the mouse lbutton then i will create a EditBox.
When I click the RButton of the Created EditBox then a Menu must be Populated.
please give me correct solution.
Uday kiran
|
|
|
|
|
Since you are dynamically creating Buttons you cant have specific handlers for each button...
uday kiran janaswamy wrote: ON_COMMAND_RANGE(id1, id2, memberFxn )
Have one variable which hold the next ID of the button, keep incrementing the variable after creating each button ..
say 100 is the ID of the first button then ..
ON_COMMAND_RANGE(100, 200, Fnc)
This will notify the wm_command to the Fnc with the button ID ranges from 100 to 200..
But the RClick in button i didn't try yet.. i hope to catch the RClick you have to write your own custom button..
or handle the RClick on the parent Dialog or View and try to get the button from the current cursor position (but i don't know exactly if the RClick will be passed to its parent)
Do your Duty and Don't expect the Result
|
|
|
|
|
uday kiran janaswamy wrote: CEdit *ptr = new CEdit;
ptr->Create(WS_VISIBLE|WS_CHILD|WS_BORDER|WS_TABSTOP|ES_AUTOHSCROLL,CRect(point.x,point.y,point.x +100, point.y +20),this,NULL);
Last parameter here, you can assign unique control Id, lets say 100.
you can use it to handle notifications using that like
ON_EN_SETFOCUS(100, OnSetfocusEdit1)
I'm not sure about other notification messages. But this would give you a hint.
|
|
|
|
|
Hi I am developing a dialog based application.
I require an HTML Control in which i can show the content by passing the html code in string form.
I searched and found one, but it doesnt compile on Visual Studio 8.
Can anyone point me to any such existing application here.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Search for the excellent "SimpleBrowser" here on CP.
|
|
|
|
|
Thanks Maximilien,
I had tried that.. but it doesnt compile on VS 8.
Any idea, if there is any modified version of the same.
Thanks.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
you can try fixing the error and submit a patch to the author, I'm certain he will be happy that you contributed to his project.
If it's the same for VS8 as it is for VS.net 2003, I think you need to comment out the CStreamOnCString class definition and declaration.
|
|
|
|