|
maybe use a modeless dialog? can you have JUST a modeless dialog? i dont know!
|
|
|
|
|
How to get the right URL before navigating the web page in the CHtmlView?
Class CHTMLControl derived from CHtmlView, and over load the virtual function OnBeforeNavigate2.
I Navigate an URL as following:
CHTMLControl* pHTMLControl;
…
pHTMLControl->Navigate2(strURL);
In the opened web page, there is a link whose html code is below:
<A href='javascriptclickProcess("search");'>Free Search</A>
After clicking on this link in the html view, the following function is called
void CHTMLControl::OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags, LPCTSTR lpszTargetFrameName, CByteArray& baPostedData, LPCTSTR lpszHeaders, BOOL* pbCancel)
But in this function, the value of lpszURL is "javascriptclickProcess("search");"
How can I get the right URL of the next page before navigating it?
Thanks
-- modified at 11:52 Monday 17th October, 2005
|
|
|
|
|
hi,
i want to set the colour of the text set throught setwindowtext in a static control is it posible if yes then how,and wat is the font type that mfc uses to display the text in the static text or any control(default).
Thanx in advance
Farpointer
|
|
|
|
|
See the "Extras" section of this article.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi Friend,
I am using early binding for getting the data from the store procedure in C++ COM DLL. All the data bind properly expect boolean value. I am doing
{
ADO_FIXED_LENGTH_ENTRY(5,ADODB::adBoolean,_rsFlag,_rsFlagStatus,FALSE)
BOOL rsFlag;
ULONG rsFlagStatus;
}
can you please help me in getting proper boolean value from store procedure.
Thanks
|
|
|
|
|
Hi,
I am creating one folder under C:\Documents and Settings\All Users\Application Data say for example "Temp".
This "Temp" folder has some default security like Administrator,power users,Everyone etc which are all inherited from parent folder.
Here in "Everyone" group it has only 3 permission like Read & Execute,List folder contents and Read.
Could anyone help me how i can add other permissions to "Everyone" group like full control,write etc through programatically?
If possible could anyone explain me with some sample code or please provide me link where i can get help in solving this problem.
Regards,
Shiva
|
|
|
|
|
I'm running into a problem contstructin a class. I'm trying to inherit the CObList class. So far I just added a default constructor and a struct. Here's the code:
#ifndef FAF_H
#define FAF_H
class CFAFList : public CObList
{
protected:
struct FAFRecord
{
CString name;
CString address;
CString HomePhone;
CString WorkPhone;
CString CelPhone;
CString FaxNumber;
}m_FafRecord;
public:
CFAFList();
};
#endif
And here's the source code for my new class:
#include "FAFList.h"
CFAFList::CFAFList()
{
m_FafRecord->name = "";
m_FafRecord->address = "";
m_FafRecord->HomePhone = "";
m_FafRecord->WorkPhone = "";
m_FafRecord->CelPhone = "";
m_FafRecord->FaxNumber = "";
}
My problem is, when I try to compile this, I get p:\findafolk\faflist.cpp(17) : fatal error C1010: unexpected end of file while looking for precompiled header directive as an error. How do I fix this?
Danny
The stupidity of others amazes me!
|
|
|
|
|
before the #include "FAFList.h" , #include "stdafx.h" header...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Remove the #include "stdafx.h" line at the top of your faflist.cpp file
-- modified at 10:54 Monday 17th October, 2005
Mmmhh, sorry . It was adding the file not remove it .
A second solution is to specify that this file don't use precompiled headers.
|
|
|
|
|
Thank you both.
Danny
The stupidity of others amazes me!
|
|
|
|
|
Hi again
I have a problem with a dialog that I have written that includes CMSFlexgrid. When I copy the application over to my target machine, it wont run. I have used Dependency Walker to find out which DLLs are used, and copied those accross (16 of them), but still no luck.
I have written a couple of other applications that have used CMSFlexgrid and had the same problem. The only way I could find around this was to install Visual Basic 6.0 into the target machine (this is where the Flexgrid control has come from.
Anybody got some clues? Both machines are running XP Pro; a list of the required DLLs that I have copied is shown below. Thanks for your Help
69 Bay
c:\windows\system32\WINMM.DLL
c:\windows\system32\NTDLL.DLL
c:\windows\system32\USER32.DLL
c:\windows\system32\GDI32.DLL
c:\windows\system32\KERNEL32.DLL
c:\windows\system32\ADVAPI32.DLL
c:\windows\system32\RPCRT4.DLL
c:\developement\scheduler\INPOUT32.DLL
c:\windows\system32\MFC42D.DLL
c:\windows\system32\MSVCRTD.DLL
c:\windows\system32\SHELL32.DLL
c:\windows\system32\MSVCRT.DLL
c:\windows\system32\SHLWAPI.DLL
c:\windows\system32\COMCTL32.DLL
c:\windows\system32\MSVCIRTD.DLL
c:\windows\system32\MFCO42D.DLL
|
|
|
|
|
An activeX require an OCX file to be installed and registered on the target computer. (I don't remember the file for the FlexGrid...)
|
|
|
|
|
Hi
Thanks Cedric,
I have just registered msflxgrd.ocx on my target machine using regsvr32 and my application now works - yippee!
Normally, when I install programs, I do it very crudely with a batch file which will copy all my required files to the correct places. Can I do this with '.ocx' files and register them by includeing "regsvr32 xyx.ocx" in the batch file (where xyz is the name of my ocx file?
Thanks again for your help
Mike
|
|
|
|
|
When _gcvt() returns string in decimal format and when in exponential format?
I need the string only in decimal format but sometimes it returns in exponencial.
<br />
char buff=[128];<br />
double dbl = 0.60000000;<br />
CString str = _gcvt( dbl, 4, buff);<br />
<br />
but
<br />
char buff=[128];<br />
double dbl = 0.06000000;<br />
CString str = _gcvt( dbl, 4, buff);<br />
<br />
|
|
|
|
|
|
toxcct wrote: sprintf(str.GetBuffer(), "%d", dbl);
Why don't you just use CString::Format() ?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
gloops, you're right, i wasn't fully in the post when i answered it... thank you for the correction !!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I'm trying to find out what network adapters are present on a computer.
Using GetAdaptersInfo() works fine except that it also picks up the "adapters" installed by VMware. How can I find out out what NIC's are physically present? The descriptions returned by GetAdaptersInfo() for the real adapters seem to have "Packet Scheduler Miniport" in them but look for this is obviously a hacky way of doing things.
I also tried enumerating the RAS devices but am not sure how to interpret the various device types and if they can be used reliably to determine if a physical NIC is present.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
You can use either GetAdaptersInfo() or GetIfTable().
For GetAdaptersInfo() IP_ADAPTER_INFO try one of:
- check IP_ADAPTER_INFO.Type to see if MIB_IF_TYPE_ETHERNET, ...
- check if( AddressLength == 0 ), if true likely a virtual adapter
For GetIfTable() MIB_IFROW try one of:
- check MIB_IFROW.dwType to see if MIB_IF_TYPE_ETHERNET, ...
- check if( dwPhysAddrLen == 0 ), if true likely a virtual adapter
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Thanks for the reply.
Unfortunately, VMware is doing a really good job of making its adapters look like the real thing. Both GetAdaptersInfo() and GetIfTable() are saying that they are MIB_IF_TYPE_ETHERNET *and* have physical addresses!
Here's some output from my GetAdaptersInfo() test:
ADAPTER: {E26A33D4-6C3E-4EDA-A5EA-AFF0C8102238}
- Description: Broadcom 440x 10/100 Integrated Controller - Packet Scheduler Miniport
- Address: 0 d 56 b6 94 27
- Index: 5
- Type: 6
- DHCP Enabled: 1
- DHCP Server: 192.168.6.254
- DHCP Lease: obtained=4354e2af ; expires=435785af
- IP Addresses: 192.168.6.98
- Gateways: 192.168.6.254
- Have WINS: 0
ADAPTER: {B2B210F3-1513-42CA-AC6A-8B5A73EF0C4F}
- Description: Dell TrueMobile 1400 Dual Band WLAN Mini-PCI Card - Packet Scheduler Miniport
- Address: 0 90 4b 6d f5 bc
- Index: 4
- Type: 6
- DHCP Enabled: 1
- DHCP Server: 192.168.2.1
- DHCP Lease: obtained=43546f6a ; expires=7fffffff
- IP Addresses: 0.0.0.0
- Gateways:
- Have WINS: 0
ADAPTER: {EAC2B247-CC14-4EEE-854F-9437CBA9A50C}
- Description: VMware Virtual Ethernet Adapter for VMnet1
- Address: 0 50 56 c0 0 1
- Index: 3
- Type: 6
- DHCP Enabled: 0
- DHCP Server: 255.255.255.255
- DHCP Lease: obtained=0 ; expires=0
- IP Addresses: 192.168.213.1
- Gateways:
- Have WINS: 0
ADAPTER: {2AC6F23F-21B3-47C8-9ACE-C93DD40BBDB8}
- Description: VMware Virtual Ethernet Adapter for VMnet8
- Address: 0 50 56 c0 0 8
- Index: 2
- Type: 6
- DHCP Enabled: 0
- DHCP Server: 255.255.255.255
- DHCP Lease: obtained=0 ; expires=0
- IP Addresses: 192.168.182.1
- Gateways:
- Have WINS: 0
and GetIfTable():
Description: Broadcom 440x 10/100 Integrated Controller - Packet Scheduler Miniport
- Type: 6
- Phys.Address: 0 d 56 b6 94 27
Description: Dell TrueMobile 1400 Dual Band WLAN Mini-PCI Card - Packet Scheduler Miniport
- Type: 6
- Phys.Address: 0 90 4b 6d f5 bc
Description: VMware Virtual Ethernet Adapter for VMnet1
- Type: 6
- Phys.Address: 0 50 56 c0 0 1
Description: VMware Virtual Ethernet Adapter for VMnet8
- Type: 6
- Phys.Address: 0 50 56 c0 0 8
Description: MS TCP Loopback interface
- Type: 18
- Phys.Address:
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Good for me too know, bummer for you, sorry.
As another hack you could look at the physical address.
It looks like the VMWare MAC's are of the form: 00 50 56 c0 xx xx, where 00 50 56 is the vendor id (VMWare).
Although this will find all VMWare adapters, it doesn't address the more general problem of distinguishing real from virtual.
i.e.
http://standards.ieee.org/regauth/oui/index.shtml[^]
Enter VMWare in the OUI search box:
...
00-50-56 (hex) VMWare, Inc.
005056 (base 16) VMWare, Inc.
44 ENCINA AVENUE
PALO ALTO CA 94301
UNITED STATES
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Thanks.
I mentioned in the first post that the real adapters all seem to have "Packet Scheduler Miniport" in their descriptions. I'm guessing that Windows is inserting this itself so it must have some way of telling real from virtual. I tried Googling around to find out exactly what a miniport is but couldn't find anything API-related.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Taka Muraoka wrote: I mentioned in the first post that the real adapters all seem to have "Packet Scheduler Miniport" in their descriptions.
Yes, but i wouldn't rely on that.
My Linksys wireless has a description of: "Linksys Wireless-B USB Network Adapter v2.8".
My ethernet card has: "3Com EtherLink 10/100 PCI TX NIC (3C905B-TX)".
To me this implies that not all descriptions will have "Packet Scheduler Miniport".
I suggested the physical address as all VMWare adapters will have the same prefix.
To me this would be a little more robust.
Without having a more concrete method of determining if an adapter is physical or virtual i would probably:
- code a list of know virtual adapter MAC prefixs (i.e. VMWare 00-50-56, ...)
- enum all adapters and discard those with no physical address, or that are in the list of know virtual adapters
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Here's what i get when i have:
- loopback driver enabled
- USB 802.11b Linksys adapter running and connected
- 3Com ethernet card enabled but not connected
GetAdaptersInfo:
AdapterName : {06843A50-0E17-4875-9A37-0B0FFFD46917}
Description : Linksys Wireless-B USB Network Adapter v2.8
Type : 6
Address : 6 00-0C-41 59-50-A2
AdapterName : {1FAF0AD2-E065-4CE1-8130-1F53A2094248}
Description : MS LoopBack Driver
Type : 6
Address : 6 02-00-4C 4F-4F-50
AdapterName : {25FB0619-5DCC-4154-B82A-659516BE0744}
Description : 3Com EtherLink PCI
Type : 6
Address : 6 00-50-04 AB-A7-DB
GetIfTable:
wszName :
bDescr : MS TCP Loopback interface
dwType : 24
dwAdminStatus : 1
dwOperStatus : 5
Address : 0 00-00-00 00-00-00
wszName :
bDescr : Linksys Wireless-B USB Network Adapter v2.8
dwType : 6
dwAdminStatus : 1
dwOperStatus : 5
Address : 6 00-0C-41 59-50-A2
wszName :
bDescr : 3Com EtherLink PCI
dwType : 6
dwAdminStatus : 1
dwOperStatus : 0
Address : 6 00-50-04 AB-A7-DB
wszName :
bDescr : MS LoopBack Driver
dwType : 6
dwAdminStatus : 1
dwOperStatus : 5
Address : 6 02-00-4C 4F-4F-50
Of interest to note, the MAC for the "MS LoopBack Driver" uses an invalid prefix (02-00-4C is not registered) ... way to go MS.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
cmk wrote: Of interest to note, the MAC for the "MS LoopBack Driver" uses an invalid prefix (02-00-4C is not registered) ... way to go MS.
Thanks for the help. I think I'll just have to check for VMware and Virtual PC's prefixes and hope that there aren't too many other things out there installing virtual adapters.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|