|
Steps :
- get the current document (IHTMLDocument2)
- then get the document.forms collection
- for each IHTMLFormElement, retrieve the target IHTMLInputElement edit box by going through the .elements collection (edit box are usually identified by their names : IHTMLInputElement::get_name(BSTR* p);)
- set/get the appropriate value with IHTMLInputElement::put_value(BSTR v);
And I swallow a small raisin.
|
|
|
|
|
Hi Mr Rodriguez,
Thanks for your reply. But I guess this method is a bit tedious and also it won't solve all my purpose. So I have figured out a different approach. Can u help me in modifying the url to navigate. I have sinked the BeforNavigate2 event in my CHtmlview class. I have read in an article that I can modify the navigation by sinking event BeforeNavigate2. I have to modify the url. Pls help me with code fragment to achieve the same. I ahve seen an article in MSDN periodicals but it has a vb example. Pls help me
Regards,
Onkar
|
|
|
|
|
I want a ComboBox that doesn't accept the user typing in some data.
I'm pretty sure this is just a flag to be set on creation, WM_EX_NOINPUT or something but I can't remember which one.
Can anyone help?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Apply the CBS_DROPDOWNLIST style.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Bugger...
I had applied that style but to the ToolBar and not the ComboBox !!??!!
must have been late at night.
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
How can I add tooltip control to picture control...Because there is only one default message handler(BN_CLICKED) no WM_MOUSEMOVE...what to do?
please help me.
Prateeti
|
|
|
|
|
Niek Albers' CHoverButton [^] provides tooltips for a CButton -derived class. Maybe you can cut & paste the code to your control.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Set the notify style of the picture control. You can then add a tool tip for the control by doing th following:
call EnableToolTips()
in messge map
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
in header file
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR * pNMHDR, LRESULT * pResult);
in .cpp file
BOOL CSamplesFloat::OnToolTipNotify(UINT /*id*/, NMHDR *pNMHDR, LRESULT * /*pResult*/)
{
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
if (pTTT->uFlags & TTF_IDISHWND)
{
// idFrom is actually the HWND of the tool
UINT nID = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
pTTT->lpszText = "";
switch (nID)
{
case IDC_PICTURE_CONTROL :
pTTT->lpszText = "My picture control" ;
break ;
case IDC_METHODDETAILS :
pTTT->lpszText = "The selected methods details" ;
break ;
}
if (pTTT->lpszText[0] != '\0')
{
pTTT->hinst = AfxGetResourceHandle();
return TRUE ;
}
}
return FALSE ;
}
In fact this can add a tolltip for any control in a dialog/view/floating window etc that you do this for.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Good day everyone,
I would like to know how to prevent a child window from moving from its original position when interecting with a mouse/keyboard. A good example of this would be Microsoft Visual Basic (6.0) form editor. The form in the designer window allows the user to change the width or height of the window but not the X/Y psoition at 0,0 or close to it.
|
|
|
|
|
try handling WM_MOVE and simply not passing it on to the controls window procedure
|
|
|
|
|
Actualy tried that and it still allowed it to move. What I did try and seem to work is handling the WM_WINDOWPOSCHANGING and provided the X and Y attibutes a constant value.
Thanks for your reply.
|
|
|
|
|
Hi all,
How can i add a Menu Bar to my dialog based application?.
Hope that anyone will help me.
With regards
Shibu
|
|
|
|
|
Create the menu, open dialog template in the resource editor and select menu from dropdown list on 'General' page.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
or you can create the menu manually and call SetMenu() from within the dialogs OnInitDialog() handler.
this is useful if you intend to dynamically modify the top level menu items.
ps. whenever you call SetMenu() , msdn says you must follow up with a call to DrawMenuBar()
|
|
|
|
|
Hi all,
How can i detect mouse over a particular button say (IDC_BUTTON) programatically?
With regards
|
|
|
|
|
Handle WM_MOUSEMOVE .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Use subclass.
Have a look to http://www.codeproject.com/miscctrl/subclassdemo.asp
from our codemate Maunder.
regards.
|
|
|
|
|
I use internet sdk function to write a multi-threads program.
But I find only two or three threads can download http data,other threads is waitting.I want to know what limit the max download threads?The server or the client?
Hi
|
|
|
|
|
To the best of my knowledge, it is the bandwidth of your connection that is limiting the number of threads that are able to download data (actually, all of them are trying, so you can expect all the threads to complete their operations as the first ones stop consuming bandwidth). To prove this point, try using a server in your own LAN (which will provide much more bandwidth) or even within your local machine.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I am writting some code to add new buttons in a toolbar at runtime.
My problem:
When i create a new button, the toolbar is not big enough and the last one is no visible anymore. If i move the toolbar to another position in the window (manually, with the mouse), it resize itself automatically and all the buttons become visible again.
How to get the toolbar with the right size automatically , just after adding a new button ?
I try adding Invalidate() and AutoResize(), but it doesn't work.
void CMyAppView::OnAddNewModule()
{
CToolBarCtrl* pToolBarCtrl;
pToolBarCtrl = &(((CMainFrame*)GetParentFrame())->GetToolbar())->GetToolBarCtrl();
TBBUTTON tbButton;
tbButton.iBitmap = pToolBarCtrl->AddBitmap(1, IDB_MY_RUNTIME_ID);
tbButton.idCommand = MY_NEW_COMMAND;
tbButton.fsState = TBSTATE_ENABLED;
tbButton.fsStyle = TBSTYLE_BUTTON;
tbButton.dwData = NULL;
tbButton.iString = NULL;
if (tbButton.iBitmap==-1)
TRACE("I couldn't load the button image");
if (!pToolBarCtrl->InsertButton(1, &tbButton))
TRACE("I couldn't create the new button");
pToolBarCtrl->AutoSize();
} Thanks !
PD: I use ON_COMMAND_RANGE handler, to catch the new event with my predefined ID, thanks Saurwein
|
|
|
|
|
try calling ((CMainFrame*)GetParentFrame())->RecalcLayout();
i'm not sure that it _will_ work but CFrameWnd uses it alot internally when positioning controlbars.
|
|
|
|
|
YESSSSSSSSS!!!!!!!!
great ! it works !
Thanks a lot !
-----
Mit freundlichen Grüssen/Best Regards/Un cordial saludo.
Ing. José Manuel Hostalet Wandosell, Fraunhofer IPA, Abt.323/Robotersysteme
Nobelstrasse 12, D-70569 Stuttgart (Germany)
mailto:jose.hostalet@ipa.fhg.de, http://www.ipa.fhg.de
|
|
|
|
|
If we create a shared memory zone with CreateFileMapping(...) , we have to close it with UnMapViewOfFile(...) and CloseHandle(...) .
My question is this: Is the memory released properly doing just that? Or do I have to take some further action before closing the memory handle?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
From MSDN docs on CreateFileMapping:
To fully close a file-mapping object, an application must unmap all mapped views of the file-mapping object by calling UnmapViewOfFile, and close the file-mapping object handle by calling CloseHandle. The order in which these functions are called does not matter. The call to UnmapViewOfFile is necessary because mapped views of a file-mapping object maintain internal open handles to the object, and a file-mapping object will not close until all open handles to it are closed.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Hi All,
I need to create an application which disables the NT user account programmatically.How do I do this??Do I have to access registry settings from my program to perform this task?? I'm novice in this aspect,so detailed info would be required.
Can anybody help me,
Thanks,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|