|
hiya, how do u tab from one edit box to another edit box on a dialog program, by pressing the 'return (enter) key'??
thanks,
grahamoj.
|
|
|
|
|
you can use GetNextDlgTabItem to find the next control in the tab order. so, override OnKeyDown, when you get a VK_RETURN, find the CWnd for the control that currently has focus, then use GetNextDlgTabItem to find the 'next' control.
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
BOOL CYourDialog::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN)
{
CWnd *pWnd = GetFocus() ;
CEdit *pEdit = static_cast<CEdit*>(pWnd) ;
if (pEdit != NULL)
pMsg->wParam = VK_TAB ;
}
return CDialog::PreTranslateMessage(pMsg);
}
Roger Allen
Sonork 100.10016
In case you're worried about what's going to become of the younger generation, it's going to grow up and start worrying about the younger generation. - Roger Allen, but not me!
|
|
|
|
|
I'm trying to insert an object from a file into a document. How does the filename get passed to the ole server to open it up to display into the container application.
thanks
|
|
|
|
|
help me for program that a non rectangular splash screen class with Alpha blending (Article discussions)
|
|
|
|
|
The way to do this is to pop up a dialog that is not a regular shape. There are plenty of articles on the web for how to do that.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
If i for example have this string: "192,168,135,97,51,156" is it possible to split that into 6 integers containing the values delimited by the comma?
thanks all
|
|
|
|
|
strtok should do the thing ...
also, could do it by hand with CString ( and/or std::string )
Max.
|
|
|
|
|
strtok is the one, but be careful if you have "blank" tokens e.g. "1,2,3,,5".
strtok will say there are 4 values here rather than 5 (4 numbers and one blank token).
Dave.
|
|
|
|
|
Yes strtok
Cheers
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
Be aware that strtok is destructive to the original string
|
|
|
|
|
Hi everybody,
How to OpenPrinter(...) for network-printer or print-server, which connected directly to lan????
Thanks,
iLYA
http://www.printsniffer.com
|
|
|
|
|
hi everyone,
how do you delete a node from a treeview control? i had a sdi, based on treeivew, and i bind double click to the node deletion command.. i tried double click on my program, but nothing happens. if i reload my program, the previously double clicked node is gone.. does treeview refreshes by itself after i ran DeleteItem() function? i've also tried running UpdateAllViews(NULL), but it causes my program to crash for some reason..
this is how i coded my OnDoubleclick()
void CmyView::OnDoubleclick(NMHDR *pNMHDR, LRESULT *pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*) pNMHDR;
GetTreeCtrl().DeleteItem(pNMTreeView->itemNew.hItem);
UpdateAllViews(NULL); // this line causes my program to crash
*pResult = 0;
}
|
|
|
|
|
UpdateAllViews doesn't have anything to do with your tree control not updating, so you can remove that line.
It's possible the tree control doesn't expect you to delete the node you double-clicked on in the handler for the double click notification. You could try posting a user-defined message to your view in the double click handler, and then delete the item in the handler for the user-defined message.
Software Zen: delete this;
|
|
|
|
|
hi, how do u add an item to start menu?
norm
|
|
|
|
|
The start menu is just a directory. Just put files in it example in win2000 is : /Documents and Settings/UserName/Start Menu/
|
|
|
|
|
thanks, got that one working
norm
|
|
|
|
|
Why don't you just ask "u" instead of posting a question here? I mean, how would we know what "u" does and how he/she/it does it?
|
|
|
|
|
what's yr problem mike
norm
|
|
|
|
|
what's yr problem mike
Huh? What's "yr"?
I tell you what my problem is: It's kids that abuse the english language in writing in areas it's not suitable.
If you write "u" or "yr" or whatever your favorite shorthand is in an SMS or any other place where you target a very limited audience I don't care.
But when this crap is sneaking its way into serious discussions I feel I have to react before it's too late. If you want to communicate with people from all over the world in writing and in the english language, please use the english language.
Now learn to spell or piss off.
|
|
|
|
|
chill
norm
|
|
|
|
|
spell
|
|
|
|
|
hi, i have set up a CListCtrl which enable in place editing by drawing an edit box around the cell that's selected.
http://www.codeproject.com/listctrl/editing_subitems_in_listcontrol.asp
the trouble is, the user must hit ENTER (that triggers OnOK) before leaving the cell. I improved the situation a little by capturing CMyDlg::OnKillfocusEdit1(). Just as OnOK, the handler transfer what's entered into the editbox to the CListCtrl.
however, that's insufficient. i wish that the user can use the arrow key to move around.
norm
|
|
|
|
|
I am trying to place one of those cool hyperlink controls into my application, and I can't get it to work. I have VC++ .Net, and all of those instructions for adding the class to the static control don't work. In the resource editor, I right-click on the static control and the "add variable" option is grayed, yet on all the hyperlink control examples, the option is availible. Is there a way to add the hyperlink control without using the Class Wizard? Or is there anyone out there who knows how to use the new VC++ .Net Class Wizard?
-- Steve
|
|
|
|
|
What would cause a window to lose focus when a common dialog appears but the parent window stays on top so the dialog is behind where it can't be selected?
Thanks
Jeff Patterson
Programmers speak in Code.
http://www.anti-dmca.org[^]
|
|
|
|