|
|
|
Hey Friends
I need to supply a proxy server to Microsoft Internet Explorer Active X Control.
This should be irrespective of Internet Explorer Settings.
Any idea how we can supply proxy to Microsoft Internet Explorer Active X Control?
Regards
|
|
|
|
|
Application can use different proxy settings for InternetOpen instance (HINTERNET) using InternetSetOption.
[
BOOL InternetSetOption(
__in HINTERNET hInternet,
__in DWORD dwOption,
__in LPVOID lpBuffer,
__in DWORD dwBufferLength
);
^]
where hInternet, InternetOpen instance, if it is NULL, the scope of the settings is global and is default option settings for Internet Explorer. So it changes the settings for WebBrowser control as well as all instance if IE.
If you want to specify proxy settings for your application alone with out changing the default settings, I don't know any interface exposed by WebBrowser control.
But with some effort you can achieve that, you may open an HINTERNET , InternetOpen instance for your application with proxy settings, and download the URL file using [wininet APIs^]and display the html source in WebBrowser control. That is WebBrowser control is used for only rendering HTML and getting UI events, connection is handled by your program.
And if you find any other way, post it.
|
|
|
|
|
thanks buddy
downloading html & displaying seems to be a messy task as there will be images etc and might be messy
will post if i find anything else
|
|
|
|
|
Hi all,
My application uses QT to render its interface but I recently encountered a big problem: my application loads a modeless dialog from an external mfc dll; because of mfc architecture PreTranslateMessage isn't called for my modeless dialog, so I thought forwarding the modeless dialog's messages would be the only solution, but now my problem rises:
QT don't support PreTranslateMessage.
I really need a great idea to solve this problem. Please help me.
---
|
|
|
|
|
You can emulate if you have access to the message pump. I don't know QT so I'm not sure what the deal is in this respect.
Steve
|
|
|
|
|
hi
i have this function:
Public Function GetFile(Filename As String)<br />
Dim path As String<br />
Dim Fnum As Integer<br />
<br />
'---read file in one pass!<br />
Fnum = FreeFile<br />
Open Filename For Input As #Fnum<br />
GetFile = Input(LOF(Fnum), Fnum)<br />
Close Fnum<br />
<br />
Exit Function<br />
<br />
ErrorHandler:<br />
Err.Description = "GetFile: " & Err.Description & " -> " & File<br />
Err.Raise Err.Number<br />
<br />
<br />
End Function
AND
Private Sub Form_Load()<br />
Dim path As String<br />
<br />
On Error GoTo nofile<br />
<br />
If Command$ Empty Then<br />
Form1.Print<br />
Form1.Print<br />
Form1.Print<br />
Form1.Print<br />
<br />
Form1.Print "Command Line Parameter passed: " + Command$<br />
If Left$(Command$, 1) = Chr$(34) And Right$(Command$, 1) = Chr$(34) Then<br />
path = Mid(Command$, 2, (Len(Command$) - 2))<br />
Else<br />
path = Command$<br />
End If<br />
'MsgBox (path)<br />
Form1.Print "Path of File passed: " + path<br />
Form1.Print<br />
Form1.Print "File contents: " + vbCrLf<br />
<br />
Form1.Print GetFile(path)<br />
<br />
Else<br />
'MsgBox ("No Parameters passed!")<br />
End If<br />
<br />
Exit Sub<br />
nofile:<br />
MsgBox ("ERROR: No valid text file!")<br />
<br />
End Sub
but as u can see..they are written in VB
i need the same thing but in Vc++/MFC
so, is there any equivalent functions for them
if not....could someone pleeease help me with this
reeealy ..any kind of help would be appriciated
thank u in advance
|
|
|
|
|
If you are using MFC, check out the CFile class. If not, use CreateFile() and ReadFile() .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
iam using MFC
i tried the CFile open and read but it didnot work with me
it has something to do with the file
can u please help me out with this
thank u
|
|
|
|
|
lahom wrote: but it didnot work with me
This is real helpful.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ok
thank u for ur fast reply
can u show me how to use it ...
and how to set text of my textbox control.
thank u
|
|
|
|
|
lahom wrote: and how to set text of my textbox control.
SetWindowText() .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
so
first i define a variable for my edit control lets say m_EDIT1
but when i wrote m_EDIT1.SetWindowText()
an error show up saying :
SetWindowTextA' : is not a member of 'CString
what s wrong
|
|
|
|
|
lahom wrote: SetWindowTextA' : is not a member of 'CString
m_EDIT1 should be a CEdit control variable. See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hello all,
I am creating an installer for a windows application that requires PostgreSQL, therefore this installer launches the PostgreSQL setup silently. Since the PostgreSQL installer creates a local windows account on the target machine, I need to gather this information (username/password) and pass it to postgres-setup when it is launched. But, if the password does not meet the minimum requirements set in the Local Security Setting, installation fails. My question:
Is there a way to programatically check if a given password-string meets the password policies? (Preferably in C++)
Thanks in advance.
|
|
|
|
|
Hello,
I know it's possible, with a bit of work and a custom sorting algorithm, to add the ability to drag&drop-order items in a CListCtrl (in ICON view mode) to reorder them manually. I found this article: http://support.microsoft.com/kb/822483/en-us pertaining to such a thing, but it's all in VB/C# and was wondering if there was a way to do it in C++...?
Currently, I have set up the correct OnBeginDrag, OnMouseMove and OnLButtonUp functions working just fine -- I get a dragIndex and dragPoint&dropPoint ,... but the problems are:
1.) dropIndex is not calculated correctly, because it can be ordered in both different X and Y coordinates to drop it into
2.) deleting the currently dragged item at it's position, and adding it to the correctly dropped position
3.) then shifting all the other items into their correct (new) positions
Here is the code, the sorting algo is currently quite(!) incomplete and just for left&right sorting tests...
<br />
POINT startPT;<br />
GetItemPosition(m_nDragIndex, &startPT);<br />
<br />
POINT endPT;<br />
for (int i = 0; i < GetItemCount(); i++)<br />
{<br />
if (i == m_nDragIndex) continue;<br />
<br />
GetItemPosition(i, &endPT);<br />
<br />
if (endPT.x > m_ptDropPoint.x)<br />
{<br />
m_nDropIndex = i;<br />
if (startPT.x < m_ptDropPoint.x) m_nDropIndex--;<br />
<br />
break;<br />
}<br />
}<br />
<br />
char szLabel[256];<br />
LVITEM lvi;<br />
ZeroMemory(&lvi, sizeof(LV_ITEM));<br />
lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE | LVIF_PARAM;<br />
lvi.stateMask = LVIS_DROPHILITED | LVIS_FOCUSED | LVIS_SELECTED;<br />
lvi.pszText = (LPWSTR)szLabel;<br />
lvi.iItem = m_nDragIndex;<br />
lvi.cchTextMax = 255;<br />
GetItem(&lvi);<br />
<br />
if (m_nDropIndex < 0)<br />
m_nDropIndex = GetItemCount();<br />
<br />
lvi.iItem = m_nDropIndex;<br />
InsertItem(&lvi);<br />
<br />
if (m_nDragIndex > m_nDropIndex)<br />
m_nDragIndex++;<br />
<br />
SetItemData(m_nDropIndex, GetItemData(m_nDragIndex));<br />
<br />
DeleteItem(m_nDragIndex);<br />
I have auto-arrange currently turned off for certain purposes and feel this is necessary for this sort of custom-sort. If anyone has any ideas, or can convert that article's code into the correct C++/MFC ones, that'd be an immense help!
Thanks!
|
|
|
|
|
Hello again,
I've made quite a bit of progress on this --
All that's left is the correct sorting algorithm.
The algorithm on this is a bit tricky, because on list/report views you can use the HitTest() and get the correct index to swap to...but unfortunately with the thumbnail view, there's dead/white space between each item and if you drop an item between two items, it will not return correct results or any kind of flags to check for...
I figure there's a few instances:
1.) Drag to the right on the same row
2.) Drag to the left on the same row
3.) Drag below on the same column
4.) Drag below to the right
5.) Drag below to the left
6.) Drag above on the same column
7.) Drag above to the right
8.) Drag above to the left
Does anyone have any ideas on how this algo can be achieved?
Thanks
|
|
|
|
|
Hi,
I am working with a project where all the anci strings are converted to Unicode to support japanese language.
One console module which takes command line arguments retuns junk/japanese characters in Argv.
Could any one give some suggestions regarding the settings/code changes that i need to do.
Thanks,
kk
|
|
|
|
|
what does your main() function look like?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
int main( int argc, TCHAR* argv[] )
|
|
|
|
|
Ok, so what of argv are you having trouble with?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !
|
|
|
|
|
this question is directly related to the use of the sources of that article.
consequently, you'd be glad to ask this question in the forum at the bottom of the article, so that the author will directly get notified.
|
|
|
|