|
thank`s for u r support..issuse is closed..i have done..with the commtimeout....
|
|
|
|
|
How to set a font to application menu; say I've a CFont object & a CMenu ptr..?
Thanks in advance
--
======
Arman
|
|
|
|
|
if you have a derived CMenu class you can change your font on WM_DRAWITEM
|
|
|
|
|
free library (or code) in C++.
|
|
|
|
|
By 'free' do you mean "other peoples hard work so I can be lazy"? or free as in "I don't want to pay even the the author would like a small donation"?
|
|
|
|
|
Just tell me where, pay or free library. I'll consider that I should pay or not later.
|
|
|
|
|
what is source code for email system in Java script
|
|
|
|
|
please don't feed the troll.
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
My son's PDA is an M249 SAW.
My other son commutes in an M1A2 Abrams
|
|
|
|
|
Why don't you ask someone who knows? This is the Visual C++ / MFC discussion board, in case you haven't noticed.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
This is a VC++ forum.wrong
|
|
|
|
|
Hello
Can anyone give me a little short description of the different shortings in visual C++,
And maby give me an example of what they are?
ATL, CLR, GENERAL, SMART DEVICE, WIN 32 APPLICATION..
Thanks for answer
Regards
|
|
|
|
|
shortings ?
Where did this list come from ?
ATL is the Active Template Library, for COM
CLR is the .NET framework, C++/CLI apps
When the General talks, you better listen to him
A smart device is a device that is smart, such as a scientific calculator, or a handheld windows device.
Win32 is what all our apps really are, a Win32 app would be an app that doesn't use the CLR, or MFC, it uses the Win32 API directly.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: shortings ?
When you are longing for something, that means you really want it. When you are shorting for something, I guess that means you don't really want it.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi Christian
Thanks for the replay
The reason why i need this information is that i am a chiptuner, that program my own software for car,
and now im going to make software that communicate with the cars mcu..
The language it self is one thing im reading on at moment, but my problem is mostley to know when to use the different settings in visual studio.
The normal standard communication protocoll in car is KWP2000,
I have seen that, many of these communication interfaces that i have uses dll, but i guess i can start building a win32app, that can communicate through an usb-interface, to cars mcu?
Any suggestion where to start?
Regards
Frank
|
|
|
|
|
If you want an app running on your PC, which then talks to the car via some communication protocol, you may want to look at using MFC. However, even C# is probably OK on the PC side, the key thing is getting the software right on the car end, which will probably be in C.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
oki, so then i maby use the mfcapp or mfcdll?
REGARDS
Frank
|
|
|
|
|
If you want to write a windows application, then MFC is easier than Win32. A dll is not a program, it's a library. If you want a program that runs, you need to create an exe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Oki
Thanks for youre help
Maby i need more help from you, or i can tune youre car
Regards Frank
|
|
|
|
|
*grin* thanks for the offer, but I suspect geography may get in the way of me taking it up...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hi,
I use a CListView as a virtual list in which I display a list of files and file information like size and type.
in the LVN_GETDISPINFO handler I add LVIF_DI_SETITEM to the item mask so that the control will not ask for the data twice for the same item, but it doesnt work at all! the control always asks for data whenever the displayed contents are changed.
I mask the LVIF_DI_SETITEM as follows:
pItem->mask|=LVIF_DI_SETITEM;
and my whole msg handler is as follows if u would like to have a look:
void CFileListView::OnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;<br />
CProdigyExplorerView *pView=(CProdigyExplorerView*)GetParent();<br />
LV_ITEM* pItem= &(pDispInfo)->item;<br />
pItem->mask|=LVIF_DI_SETITEM ;<br />
int itemid = pItem->iItem;<br />
*pResult = 0;<br />
CFileFolderInfo *pFI;<br />
if(itemid > CFileFolderManager::m_Folders.GetUpperBound())<br />
pFI = (CFileFolderInfo *)CFileFolderManager::m_Files[itemid-CFileFolderManager::m_Folders.GetUpperBound()-1];<br />
else<br />
pFI=(CFileFolderInfo *)CFileFolderManager::m_Folders[itemid];<br />
if (pItem->mask & LVIF_TEXT)<br />
{<br />
if(pView->m_lstFiles.GetHeaderText(pItem->iSubItem)==_T("Filename"))<br />
{<br />
wcsncpy(pItem->pszText,pFI->m_Attributes.cFileName,pItem->cchTextMax);<br />
}<br />
else if(pView->m_lstFiles.GetHeaderText(pItem->iSubItem)==_T("Size"))<br />
{<br />
CString strSize = CFileFolderManager::FormatFileSize(pFI->m_Attributes.nFileSizeHigh,pFI->m_Attributes.nFileSizeLow,0);<br />
wcsncpy(pItem->pszText, (LPCTSTR)strSize,pItem->cchTextMax);<br />
}<br />
else if(pView->m_lstFiles.GetHeaderText(pItem->iSubItem)==_T("Type"))<br />
{<br />
<br />
}<br />
else if(pView->m_lstFiles.GetHeaderText(pItem->iSubItem)==_T("Created"))<br />
{<br />
CString strTime = CFileFolderManager::FormatFileTime(pFI->m_Attributes.ftCreationTime,FALSE);<br />
wcsncpy(pItem->pszText,(LPCTSTR)strTime,pItem->cchTextMax);<br />
}<br />
else if(pView->m_lstFiles.GetHeaderText(pItem->iSubItem)==_T("Modified"))<br />
{<br />
CString strTime = CFileFolderManager::FormatFileTime(pFI->m_Attributes.ftLastWriteTime,FALSE);<br />
wcsncpy(pItem->pszText,(LPCTSTR)strTime,pItem->cchTextMax);<br />
}<br />
else if(pView->m_lstFiles.GetHeaderText(pItem->iSubItem)==_T("Accessed"))<br />
{<br />
CString strTime = CFileFolderManager::FormatFileTime(pFI->m_Attributes.ftLastAccessTime,FALSE);<br />
wcsncpy(pItem->pszText,(LPCTSTR)strTime,pItem->cchTextMax);<br />
}<br />
}<br />
<br />
if( pItem->mask & LVIF_IMAGE) <br />
{<br />
<br />
if(pView->m_iLVStyle != LVS_ICON)<br />
{<br />
if(pFI->m_iSmallIconIndex!=-1)<br />
{<br />
pItem->iImage=pFI->m_iSmallIconIndex;<br />
return;<br />
}<br />
int iIconIndex;<br />
CString strExtension=CFileFolderManager::GetFileExtension((CString)pItem->pszText);<br />
if((iIconIndex=pView->GetTypeIconSmall(strExtension))==-1
|| strExtension==_T("exe") ||strExtension==_T("lnk")|| pFI->m_Attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)<br />
{<br />
SHFILEINFO fi;<br />
SHGetFileInfo(pView->m_strCurrentPath + pItem->pszText,pFI->m_Attributes.dwFileAttributes,&fi,sizeof(fi),SHGFI_USEFILEATTRIBUTES |SHGFI_ICON| SHGFI_SMALLICON);<br />
<br />
pItem->iImage=pView->m_ilLVIconsSmall.Add(fi.hIcon);<br />
<br />
pView->m_hIcons.Add(fi.hIcon);<br />
pFI->m_iSmallIconIndex = pItem->iImage;<br />
if(!(pFI->m_Attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{<br />
IconType IT;<br />
IT.m_Extension=strExtension;<br />
IT.m_IconIndex=pItem->iImage;<br />
pView->m_IconTypeSmall.Add(IT);<br />
}<br />
<br />
}<br />
<br />
else
{<br />
pItem->iImage=iIconIndex;<br />
pFI->m_iSmallIconIndex = iIconIndex;<br />
<br />
}<br />
CString str;<br />
str.Format(_T("%d"),pView->m_ilLVIconsSmall.GetImageCount());<br />
GetParent()->GetParent()->SetWindowText(str);<br />
<br />
}
if(pView->m_iLVStyle == LVS_ICON)<br />
{<br />
if(pFI->m_iLargeIconIndex!=-1)<br />
{<br />
pItem->iImage=pFI->m_iLargeIconIndex;<br />
return;<br />
}<br />
<br />
int iIconIndex;<br />
CString strExtension=CFileFolderManager::GetFileExtension((CString)pItem->pszText);<br />
if((iIconIndex=pView->GetTypeIconLarge(strExtension))==-1
|| strExtension==_T("exe") ||strExtension==_T("lnk")|| pFI->m_Attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)<br />
{<br />
IconType IT;<br />
IT.m_Extension=strExtension;<br />
SHFILEINFO fi;<br />
<br />
SHGetFileInfo(pView->m_strCurrentPath + pItem->pszText,pFI->m_Attributes.dwFileAttributes,&fi,sizeof(fi),SHGFI_USEFILEATTRIBUTES |SHGFI_ICON| SHGFI_LARGEICON);<br />
<br />
IT.m_IconIndex=pItem->iImage=pView->m_ilLVIconsLarge.Add(fi.hIcon);<br />
pView->m_IconTypeLarge.Add(IT);<br />
pView->m_hIcons.Add(fi.hIcon);<br />
pFI->m_iLargeIconIndex= IT.m_IconIndex;<br />
<br />
}<br />
<br />
else
{<br />
pItem->iImage=iIconIndex;<br />
pFI->m_iLargeIconIndex= iIconIndex;<br />
<br />
}<br />
CString str;<br />
str.Format(_T("%d"),pView->m_ilLVIconsLarge.GetImageCount());<br />
GetParent()->GetParent()->SetWindowText(str);<br />
<br />
}
<br />
}
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
hi,
I want to create a file association programmatically using vc++, for example, I want to associate '.txt' files with myprogram.exe.
are there any api functions to do this?
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Not sure if there are any directly, but the file associations are stored in the registry, you can use registry APIs to set them up.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks,
but when I change these settings from registry will the settings take effect immediately or do I need to restart windows or restart windows explorer??
I need a method that takes effects immediately.
Thanks alot
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|