|
Marcus2001 wrote:
where can I find the docs on how to use other tags
In the VC forum FAQ
--Mike--
My really out-of-date homepage
"Hey, you wanna go to the Espresso Pump and get sugared up on mochas?"
-- Willow Rosenberg
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Use the <pre> tags!
this is between two 'pre' tags
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I am trying to see if the "enter" key is hit when some object has the focus. I have tried many things and all other keys are gotten except for the "enter."
Thanks.
|
|
|
|
|
over-ride PreTranslateMessage
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
As nish says, PreTranslate message is the way to go,
if (pMsg->message == WM_KEYDOWN)
{
if (GetFocus() != GetDlgItem(IDC_ASSAY) && pMsg->wParam == VK_ENTER)
{
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
|
|
|
|
|
I have a simple CListCtrl that allows the user to edit the item (0). To do this the user needs to click on the item once or twice to get into "Edit" mode.
Is there a way to allow the user other ways to get into edit mode? Like pressing the right arrow key (VK_RIGHT) or something?
-kg
Ken Goguen
|
|
|
|
|
Sure, you can use something like this in the appropriate handler:
int nItem=m_list.GetNextItem(-1,LVNI_SELECTED);
if(nItem>=0){
GotoDlgCtrl(&m_list);
m_list.EditLabel(nItem);
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Sometimes we over look the simple things. Thanks.
-kg
Ken Goguen
|
|
|
|
|
I have a DLL that contains a COM object. Can anybody give me some pointers on how to create an instance of that object and call one of its methods from a Win32 C++ program. The object was originally written using Visual Basic but HAS to be used in a program written in C++ using just Win32 API not MFC. I have full access to the Visual Basic source and a small understanding of COM.
Thanks in advance for any help you can give.
Steve.
|
|
|
|
|
If you know the CLSID and the IID, you can use CoCreateInstance. Do a search on MSDN for it. I can't remember if the #import works on DLL's but it does make life easier.
Michael
|
|
|
|
|
You can use my XYDispDriver class to access the com object. Or if you are comfortable with ATL, use the #import directive.
Good luck.
|
|
|
|
|
Hi Folks,
What the proper way of creating fonts so that their size don't change during a zoom in/out printing preview?
Cheers,
- xico -
|
|
|
|
|
Hi all,
I'm looking at creating one of those explorer bars in ie. Not done anything like this before, more of an MFC person up to now.
First question is, what am I trying to do? COM? COM+? ActiveX ? there are too many different terms and i'm not sure which one is relevant!
secondly, what books are a good starting point for the above?
Thanks
Jon
PS.. I've read the related articles on CP already, but still want a book.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
|
Hi,
I am trying to activate a CView derived MDI window from a CControlBar containing an image list of view thumbnails. When I double click on the thumb I want to activate the view, i.e. bring it to the top. I cannot seem to get the SendCommand message right. Can someone help me with this.
::SendMessage(???,WM_MDIACTIVATE,(WPARAM)pTheViewToActivate,0);
Where do I need to send the message to for it to process the MDI activate message? MSDN also seems to be confused about the lparam, is it needed or not?
Many thanks
Matthew
|
|
|
|
|
(WPARAM)pTheViewToActivate looks like you're trying to send a CView pointer as the wParam. You should be sending an hWnd (window handle) instead.
But that's besides the point, because i think that CMDIChildWnd::MDIActivate() does exactly what you want.
jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Ooops, i meant CMDIFrameWnd::MDIActivate()
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Thanks for the pointer. It was a little more involved for me due to my requirements but it all resulted in a call to
CMDIChildWnd::MDIActivate
thanks again
Matthew
|
|
|
|
|
Hi,
I´m running MS Word embedded ( I mean like if it where an standalone application), and I want to show the Ms Word window at the left side of a window of my application ( just one view with some buttons to add some tables and that stuff).
I have seen that from the Application object word has two methods, "Move" and "Resize", but the problem that I found is that the coordinates seems not be in Pixels, do you know which coordinate system uses Word for that ?
( and how can I convert from Pixels to word thing coordinates... )
Thanks, Bye !
Braulio
|
|
|
|
|
Hi !
Which style ( or which things override) I have to modify to avoid that my window is resized ( I have a frame and sometimes when some reasons occurs I want to keep fixed the size of the frame).
Thanks, Bye !
Braulio
|
|
|
|
|
Put this line in CMainFrame::PreCreateWindow
cs.style &= ~WS_THICKFRAME;
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Thanks Nish !
One more thing.... I would like that the user could not resize Horizontally but vertically yes, is that possible ?, Thanks !
Braulio
|
|
|
|
|
Yes. Override OnSizing. Not OnSize but OnSizing.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Hi,
I have found out something that works fine and is:
ModifyStyle( WS_THICKFRAME, 0);
But... I would like to allow the user resize vertical but not horiz., how can I do that ?
Thanks, Bye !
Braulio
|
|
|
|
|
You can try doing a hit test for non-client areas of a window and then based on the hit param decide on whether to allow resize or not.
Hope this helps
Cheers
Kannan
|
|
|
|