STDMETHODIMP ShowDW(BOOL fShow)
{
if(m_hWnd)
{
HWND hWndReBar = _hwndParent;
int nCount = (int)::SendMessage(hWndReBar, RB_GETBANDCOUNT, 0, 0L);
for (int i = 0; i < nCount; i++)
{
REBARBANDINFO rbbi = { sizeof(REBARBANDINFO), RBBIM_CHILD | RBBIM_STYLE};
BOOL bRet = (BOOL)::SendMessage(hWndReBar, RB_GETBANDINFO, i, (LPARAM)&rbbi);
if (bRet && rbbi.hwndChild == m_hWnd)
{
rbbi.fMask = RBBIM_STYLE;
rbbi.fStyle = RBBS_FIXEDSIZE | RBBS_USECHEVRON | /*RBBIM_IDEALSIZE|*/ RBBS_BREAK || RBBS_NOGRIPPER;//
BOOL bRet = (BOOL)::SendMessage(hWndReBar, RB_SETBANDINFO, i, (LPARAM)&rbbi);
REBARBANDINFO rbbi2 = { sizeof(REBARBANDINFO), RBBIM_CHILD | RBBIM_STYLE};
bRet = (BOOL)::SendMessage(hWndReBar, RB_GETBANDINFO, i + 1, (LPARAM)&rbbi2);
if (bRet && rbbi2.hwndChild)
{
rbbi2.fMask = RBBIM_STYLE;
rbbi2.fStyle |= RBBS_BREAK;
bRet = (BOOL)::SendMessage(hWndReBar, RB_SETBANDINFO, i+1, (LPARAM)&rbbi2);
break;
}
break;
}
}
if(fShow)
{
::ShowWindow(m_hWnd,SW_SHOW);
}
else
{
::ShowWindow(m_hWnd,SW_HIDE);
}
}
return S_OK;
}
10/12/2002
#include
#include
#include
using namespace std;
int main()
{
cout << "MAC address is: ";
// Ask COM to create a UUID for us. If this machine has an Ethernet
// adapter, the last six bytes of the UUID (bytes 2-7 inclusive in
// the Data4 element) should be the MAC address of the local
// Ethernet adapter.
GUID uuid;
CoCreateGuid(&uuid);
// Spit the address out
char mac_addr[18];
sprintf(mac_addr,"%02X:%02X:%02X:%02X:%02X:%02X",
uuid.Data4[2],uuid.Data4[3],uuid.Data4[4],
uuid.Data4[5],uuid.Data4[6],uuid.Data4[7]);
cout << mac_addr << endl;
getch();
return 0;
}
#include
#include
using namespace std;
int main()
{
cout << "MAC address is: ";
// Ask COM to create a UUID for us. If this machine has an Ethernet
// adapter, the last six bytes of the UUID (bytes 2-7 inclusive in
// the Data4 element) should be the MAC address of the local
// Ethernet adapter.
GUID uuid;
CoCreateGuid(&uuid);
// Spit the address out
char mac_addr[18];
sprintf(mac_addr,"%02X:%02X:%02X:%02X:%02X:%02X",
uuid.Data4[2],uuid.Data4[3],uuid.Data4[4],
uuid.Data4[5],uuid.Data4[6],uuid.Data4[7]);
cout << mac_addr << endl;
getch();
return 0;
}
Subscribe to:
Posts (Atom)
Useful netsh commands
To see blocked ports on your system: netsh interface ipv4 show excludedportrange protocol=tcp For more info visit: https://ardalis.com/atte...