|
Check this out and see if this helps
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cwnd.3a3a.onkeyup.asp
|
|
|
|
|
From vc++ wizard, you can create OnKeyDown function.
|
|
|
|
|
i want to write a translator from English to a vernicular language. Any ideas as to how should go about going it?
my translator should be integrated with another application software, eg MS Word.
|
|
|
|
|
This[^] would be a good place to start. If you want to make use of an existing translation service from within your app, see my Google translator example in this[^] article.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello all,
I quick question .. I have been programming Windows Apps for some time, but heretofore have not had to display and allow selection (with the mouse) of simple graphics in a CView derived class.
It is standard for Windows Apps to allow the user to select a graphic (a line, a rectangle, ... ) with a left button click, and when so clicked, to display selection rectangles around the graphic. On a line, these selection rectangles (small filled rectangles) are typically on the end points.
I surmise that either MFC or the Windows API has already coded this functionality, but for the life of me, even tracing throuhg MSDN supplied sample code (such as drawcli), I can not determine how the system is alerted that this shape should display selection rectangles.
Can anyone enlighten me?
TIA
|
|
|
|
|
|
Hello,
Why is it that anytime I right-click on a local variable inside a function and select “go to definition”, it always replies “The symbol ____ is not defined.”? How can I get .net to allow me to browse local symbols? (It finds the global symbols just fine.)
thanks,
JennyP
|
|
|
|
|
Is there a way to add new rows to a MS FlexGrid in VC++ 6.0? If there is, then it will be a great help if someone can let me know how to do it.
log live the dEvIL
|
|
|
|
|
void CFlexGridDlg::OnNew()
{
COleVariant vIndex;
vIndex.lVal = 1;
m_ctlFlexGrid.AddItem( "Hallo", vIndex);
}
|
|
|
|
|
Thanx for the prompt reply. This way of doing it helps in adding rows, but with just a single column. I need to add multiple columned rows to the grid, which I am fetching from an Access database. How to do that? Please help.
log live the dEvIL
|
|
|
|
|
To add multiple strings (for multiple columns in the row), use the tab character (char x = 9) to separate each string.
m_ctlFlexGrid.AddItem( "Hallo1\tHello2\tHello3...", vIndex);
|
|
|
|
|
Only one problem left!
Unable to add to fixed rows error. I need to have one row and a column fixed. How to?
long live the dEvIL
|
|
|
|
|
In OnInitDialog() put in :
m_FlexGrid1.SetCols(NUM_COLS);
m_FlexGrid1.SetRows(NUM_ROWS); // open Grid with two empty rows
// need to add new rows (error)
// select number of fixed rows and colons
m_FlexGrid1.SetFixedRows(1);
m_FlexGrid1.SetFixedCols(1);
// example to fill out 1 fixed rows:
m_FlexGrid1.SetRowHeight(0, m_FlexGrid1.GetRowHeight(0) * 2);
m_FlexGrid1.SetTextArray(0, "");
m_FlexGrid1.SetTextArray(1, "Heading Text One");
m_FlexGrid1.SetTextArray(2, "Heading Text Two");
m_FlexGrid1.SetTextArray(3, "Heading Text Three");
// function to add new row
long r = m_FlexGrid1.GetRows()-1;
m_FlexGrid1.AddItem(str, COleVariant(r));
// you have one empty row. delete this empty row after added new row
m_FlexGrid1.RemoveItem(1);
|
|
|
|
|
A CDialog Object is a member of my application class and is displayed via Dlg.DoModal.
I want to handle the event that the dialog is closed. I tried the functions OnClose (wasn't called) ,OnDestroy (wasn't called because the object isn't destroyed).
Now my solution is :
OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)
{
CDialog::OnActivate(nState, pWndOther, bMinimized);
if ( nState == WA_INACTIVE && pWndOther)
{
// Dialog is closed
}
}
Is it correct or does anyone know a better solution like the opposite of InitDialog which is called everytime the dialog is displayed via DoModal?
|
|
|
|
|
Override OnOK() and/or OnCancel() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I would like to be able to read the text in the comments of a website. The problem I am having is that the site I want to be able to parse has comments before the HTML tag. Using the IHTMLDocument2, I haven't been able to do this because it seems to strip comments out. Any help would be apprecaiated. Is there any way to just get a string of the source code, and parse that? Thanks!
|
|
|
|
|
Yes, see this[^] article to parse the contents of a url.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thanks for the link. Unfortunately, that won't work either. The problem is that we output a comment that contains the actual server name that you are on (our farm has over 150 boxes) into the comment. Using your method, the server sees the application as not supporting javascript, so it creates an error page saying that. Any other ideas? Thanks!
|
|
|
|
|
Is it possible to open up dialogboxes as many numbers as an user wishes and specifies at run time? If possible then how?
How can I make a bitmap resource clickable so that a new dialog box appears when it is clicked ,in which there may contain the same bitmap resource along with the upper said clickable criterion???
|
|
|
|
|
joy007 wrote:
Is it possible to open up dialogboxes as many numbers as an user wishes and specifies at run time?
I don't understand this question. If you mean, is it possible to have multiple dialog boxes open at the same time, the answer is yes, if you make them modeless dialogs.
joy007 wrote:
How can I make a bitmap resource clickable so that a new dialog box appears when it is clicked
See this[^] article to create a bitmap button that displays as a static control (i.e. without the button border). Display your dialoig in the button's handler.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
If you mean, is it possible to have multiple dialog boxes open at the same time, the answer is yes, if you make them modeless dialogs.
Whether they are modal or modeless, multiple dialogs can be open simultaneously.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I understood "open" to mean "accept user input".
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
It was not an intuitive question no matter how you sliced it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
yes.
just do something like :
...
CYourDialog* p = new CYourDialog( ID_OF_THE_BITMAP_YOU_JUST_CLICKED_ON );
p->Create( ... );
p->ShowWindow( SW_TRUW );
...
You will need to keep track of the dialogs so you can delete them eventually.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|