|
Cedric Moonen wrote: there you have to look a little bit to find the MSFlexGrid control.
In MY Personel Opinion i never liked MsFlexGrid... i better use TrueDBGrid for same purpose
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: In MY Personel Opinion i never liked MsFlexGrid
Is that not what Chris said before starting with its own Grid ?
~RaGE();
|
|
|
|
|
Rage wrote: Is that not what Chris said before starting with its own Grid ?
Really, I don't know, I never read that article properly
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
toxcct wrote: why ?
Lack of proper documentation for use in VC++ and very difficult to use and play with (IMHO only )
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: Lack of proper documentation for use in VC++
Yep that's true but when you need to do some very basic operations, you don't really need a good documentation (the functions names talk by themselves ).
|
|
|
|
|
Cedric Moonen wrote: you don't really need a good documentation (the functions names talk by themselves
Some time not! take my case, I have to change selection from one point to other, i am able to do that but don't able to find function which scroll the grid.. i.e. the right row get selected but view doesn't changed
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
The activex grid control is crap.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I created a virtual folder using com/atl app wizard dll.And i implemented contextmenu handlers to that folder.Now i want to specify context menu items before com object loading into my system.Plz tell me how to create context menu handlers dynamically
-- modified at 5:47 Tuesday 10th January, 2006
|
|
|
|
|
kil ramesh wrote: Now i want to specify context menu items before com object loading into my system.Plz tell me how to create context menu handlers dynamically
CreatePopupMenu[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
Hi,
I came across a situation which demands the customization of Insert File and Insert Hyperlink dialogs in MS Office documents(new mail message,word doc etc). These dialog boxes appear when the user clicks on the "Insert->File" or "Insert->HyperLink" menu-item.The dialogs placesbar needs to show up an icon which corresponds to a namespace extension. The events on the list view items where the data of the namespace extension is being shown have to be handled by my application.
Would appreciate help from any one.
Thanks and Regards,
Anil
|
|
|
|
|
hiii...
Is there any MFC fuction by which I can check whether there is a pen drive attach to the USB port.
Thanx in Advance
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Try this:
CString sDrivePath = "c:\\";
UINT nDriveType = ::GetDriveType((LPCTSTR)sDrivePath);
if (nDriveType == DRIVE_REMOVABLE)
{
AfxMessageBox("Removable storage!");
}
If it doesn't work for USB drives, it should at least give you a starting point for finding the right way to do it.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
thanx...
birajendu
CyberG India
Delhi
India
|
|
|
|
|
This is a function that finds all removeable drives in a system, including USB-connected harddrives.
It's not exactly what you asked for, but it works. Feel free to use bits and pieces of it.
The result is stored in the class variable
DWORD fRemovableDrives;
The function returns the number of drives found.
<code>
long CKonfig::GetRemovableDriveCount()
{
// Find units that Windows flags as REMOVEABLE
// Accept USB-hard drives too. And all USB unitsv that can handle data
int i;
char sDrivePath[3];
UINT uDriveType;
DWORD dwDrives;
fRemovableDrives = 0;
int noOfDrives = 0;
dwDrives = GetLogicalDrives();
strcpy(sDrivePath+1, ":\\");
// Loop through the found drives
for(i = 0; i < 32; i++) {
if(dwDrives & (1 << i)) {
// Create sDrivePath
sDrivePath[0] = (char) ('A' + i);
uDriveType = GetDriveType(sDrivePath);
if((uDriveType == DRIVE_REMOVABLE || uDriveType== DRIVE_RAMDISK)) {
// It's a removable or a RAM-DISK(nödlösning), add it to the list
fRemovableDrives |= (1 << i);
noOfDrives++;
}
else {
if(uDriveType == DRIVE_FIXED) {
// DRIVE_FIXED: The disk cannot be removed from the drive.
// Accept DRIVE_FIXED if it's a USB unit
char szBuf[10];
HANDLE hDevice;
PSTORAGE_DEVICE_DESCRIPTOR pDevDesc;
sprintf(szBuf, "\\\\?\\%c:", sDrivePath[0]);
// Open the unit with "zero rights". Works.
hDevice = CreateFile(szBuf, 0,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL, NULL);
if (hDevice != INVALID_HANDLE_VALUE) {
pDevDesc = (PSTORAGE_DEVICE_DESCRIPTOR)new BYTE[sizeof(STORAGE_DEVICE_DESCRIPTOR) + 512 - 1];
pDevDesc->Size = sizeof(STORAGE_DEVICE_DESCRIPTOR) + 512 - 1;
if(GetDisksProperty(hDevice, pDevDesc))
{
if(pDevDesc->BusType == BusTypeUsb)
{
// It's USB, save it.
fRemovableDrives |= (1 << i);
noOfDrives++;
}
}
delete pDevDesc;
CloseHandle(hDevice);
}
}
}
}
}
return noOfDrives;
}
</code>
Kakan
|
|
|
|
|
See MSDN article Q264203.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hello community,
does any one know how to fill CTreeCtrl from a ThreadFunction in two steps???
First step is when the root item is fill, and the next is when the child item is fill!
I try with this:
<br />
HTREEITEM hTreeItem;<br />
::SendMessage(AfxGetApp()->GetMainWnd()->m_hWnd, WM_FILL_TREE, 0, (LPARAM&) csFileName);<br />
<br />
<br />
::SendMessage(AfxGetApp()->GetMainWnd()->m_hWnd, WM_FILL_CHILD_TREE, (WPARAM&) hTreeItem, (LPARAM&) csTemp);<br />
<br />
LRESULT CForeCheckDlg::OnFillTree(WPARAM wParam, LPARAM lParam)<br />
{<br />
EnterCriticalSection(&m_CritSect);<br />
CString csUrl;<br />
csUrl = (CString&) lParam;<br />
CTreeCtrl* cTree = (CTreeCtrl*) ((CWeb*)m_cTabAll.GetTab(6))->GetDlgItem(IDC_TREE1);<br />
<br />
hTreeItem = cTree->InsertItem(csUrl,0,0);
LeaveCriticalSection(&m_CritSect);<br />
return 0;<br />
}<br />
<br />
LRESULT CForeCheckDlg::OnFillChildTree(WPARAM wParam, LPARAM lParam)<br />
{<br />
<br />
EnterCriticalSection(&m_CritSect);<br />
<br />
CTreeCtrl* cTree = (CTreeCtrl*) ((CWeb*)m_cTabAll.GetTab(6))->GetDlgItem(IDC_TREE1);<br />
HTREEITEM hParent;<br />
hParent = (HTREEITEM&)wParam;<br />
CString csUrl;<br />
csUrl = (CString&) lParam;
<br />
cTree->InsertItem(csUrl, 0, 0, hParent); <br />
<br />
LeaveCriticalSection(&m_CritSect);<br />
<br />
return 0;<br />
}<br />
<br />
The Childitems ar insert, but to wrong Roots!
Thanx for any help!
with best regards
break;
|
|
|
|
|
what's the use of a FAR pointer??
like what's the difference between char *str; char FAR *str; ?
is this the same meaning as we have in ASM ? FAR segment?.. anyway can you please type in a
small execute-able program stating the difference?
regards,
Rookie
Installing MFC...2% complete
|
|
|
|
|
this keyword exist for compatibility with old C (when 16-bits processors where running).
but now, FAR is defined as an empty macro :
#define FAR
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
-- modified at 6:13 Tuesday 10th January, 2006
|
|
|
|
|
so FAR has got to do only with 16 bits..right?
regards,
Rookie
Installing MFC...2% complete
|
|
|
|
|
Rokiee wrote: so FAR has got to do only with 16 bits..right?
well seen sherlock...
simply because memory was not managed the same way at the old age of MS-DOS Operating System...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
-- modified at 7:04 Tuesday 10th January, 2006
|
|
|
|
|
Hello,
In the old 16 bit days, there were two different pointers: near and far. As far as I can remember, near pointers, point to memory addresses within the same segment and far pointers point to memory addresses within other segments.
At this time (and in the future) far and near pointers are all the same.
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
thanks bob.. but why these "segment" concept has gone now? and why its was used before?
regards,
Rookie
Installing MFC...2% complete
|
|
|
|
|
The concept of the segmented memory is in Real mode of the processor. Windows works in protected mode of the processor where the memory is addressed as a flat 32bit.
That is why all pointers in VC++ or windows in a 32bit irrespective if its a near one or a far one.
-Prakash
|
|
|
|