|
If I have a double type field in a jet database and the value 8.95 stored in it then when I retrieve it from the database as a string representaion it gives me "8.9499999999999993"
Is this just because the double type cannot represent the value 8.95 exactly? I have noticed that not all values come back as a huge string, e.g. 10.99, 1.95, and 8.5 are all exactly as entered. Or is it a bug with the code in the database driver that is doing the conversion?
|
|
|
|
|
|
Does anyone know the technique to allow a background bitmap to be displayed for a CProgessCtrl.
Specifically what functions to override and implement. I think it is not possible to use DrawItem unless you make CProgressCtrl to be Owner Drawn.
Many Thanks In Advance
|
|
|
|
|
Hi,
I dont know can implement this technique or not? But this is an idea:
1- Create a PictureBox control to show your bitmap
2- Use SetParent API function to change parent of PictureBox control.
3- Set your ProgressBar control as parent of bitmap PictureBox.
A. Riazi
|
|
|
|
|
i have KaZZA and i was wondering if it's legal if i download a version of Visual C++ 6.0, if i did would i be able to register it without WINDOWS coming and knocking on my door telling me to give it up, lol
|
|
|
|
|
Behold, this years winner in the 'stupidest man of the year contest'.
Yeah, it's legal, just send your details to piracy@microsoft.com and they will fix you up.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
I am attempting to programmatically create a copy of a shortcut using the IShelllink interface. When I interogate most *.lnk files, the GetPath function returns a true target ie. "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe". There are some special shortcuts however, that behave differently. For example, a shortcut to MS Word returns the
C:\windows\installer\{ some guid }\wordicon.exe. from the GetPath function.
How can I determine the true target (ie: winword.exe ) given the information from the IShelllink functions?
Any suggestions?
|
|
|
|
|
from http://www.codeproject.com/editctrl/dropedit.asp[^]
CString ExpandShortcut(CString &inFile)
{
CString outFile = "";
ASSERT(inFile != _T(""));
IShellLink* psl;
HRESULT hres;
LPTSTR lpsz = inFile.GetBuffer(MAX_PATH);
hres = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
IID_IShellLink, (LPVOID*) &psl);
if (SUCCEEDED(hres))
{
IPersistFile* ppf;
hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*) &ppf);
if (SUCCEEDED(hres))
{
WORD wsz[MAX_PATH];
::MultiByteToWideChar(CP_ACP, 0, lpsz, -1, wsz, MAX_PATH);
hres = ppf->Load(wsz, STGM_READ);
if (SUCCEEDED(hres)) {
WIN32_FIND_DATA wfd;
HRESULT hres = psl->GetPath(outFile.GetBuffer(MAX_PATH),
MAX_PATH,
&wfd,
SLGP_UNCPRIORITY);
outFile.ReleaseBuffer();
}
ppf->Release();
}
psl->Release();
}
inFile.ReleaseBuffer();
return outFile;
}
A | B - it's not a choice.
|
|
|
|
|
We actually do just what is described above. We are interogating the Microsoft Word.lnk file ( the shortcut installed in the Documents and Settings\AllUsers.Windows\StartMenu\Programs\Office\Microsoft Word.lnk). The problem is, the IShellLink->GetPath function returns C:\windows\installer\{ GUID }\wordicon.exe . But we all know that when a user runs Microsoft Word, the process running is called winword.exe. How does the system launch winword.exe when the shortcut target is wordicon.exe ?
|
|
|
|
|
We actually do just what is described above. We are interogating the Microsoft Word.lnk file ( the shortcut installed in the Documents and Settings\AllUsers.Windows\StartMenu\Programs\Office\Microsoft Word.lnk). The problem is, the IShellLink->GetPath function returns C:\windows\installer\{ GUID }\wordicon.exe . But we all know that when a user runs Microsoft Word, the process running is called winword.exe. How does the system launch winword.exe when the shortcut target is wordicon.exe ?
|
|
|
|
|
hi,
how do you make the header, in report mode(list control), not clickable?
thx in advance!
|
|
|
|
|
Add the LVS_NOSORTHEADER style to the list.
--Mike--
Looks like I picked the wrong week to stop sniffing glue.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
What is the best and/or the most reliable method of testing of a LAN is connected to the Internet.
The Wininet APIs make it easy to tell if the user is connected to a dialup modem, and a LAN, but there is no direct way to tell if the LAN is connected to the Internet.
Sending an IMCP packet is not a possibility, other than that I am open to your suggestions.
Thanks
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Paul Watt wrote:
What is the best and/or the most reliable method of testing of a LAN is connected to the Internet.
To try to connect to a (few) known high-uptime site(s)?
|
|
|
|
|
I want to give color red for status = "Late", and blue for status = "Assigned" for each row in a list control. I tried ON_NOTIFY as suggested by many programmers found from www.google.com. But I can't get it to work. Here is the ON_NOTIFY function:
BOOL CProjectSearchView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
NMHDR *p = (NMHDR*) lParam;
//take the default processing unless we set this to something else
if (p->code == NM_CUSTOMDRAW)
{
if (m_pSet->m_STATUS == "LATE")
{
*pResult = CDRF_DODEFAULT;
NMLVCUSTOMDRAW* lvcd = (NMLVCUSTOMDRAW*)p;
if (CDDS_PREPAINT == lvcd->nmcd.dwDrawStage)
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
else if (CDDS_ITEMPREPAINT == lvcd->nmcd.dwDrawStage)
{
//this is the prepaint stage for an item
COLORREF crText;
crText = RGB(255, 0, 0);
//store the color back in the NMLVCUSTOMDRAW struct
lvcd->clrText = crText;
//tell windows to paint the control itself
*pResult = CDRF_DODEFAULT;
}
}
}
return CRecordView::OnNotify(wParam, lParam, pResult);
}
-Elizabeth
Eilzabeth
|
|
|
|
|
Don't call the base class OnNotify() , it's wiping out the return value you store in pResult .
--Mike--
Looks like I picked the wrong week to stop sniffing glue.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I got it working now. I created a custom draw handler by following the tutorial in http://home.inreach.com/mdunn/code/LVCustomDraw/LVCustomDraw.html.
Handler
ON_NOTIFY(NM_CUSTOMDRAW, IDC_PROJECT_LIST, OnCustomdrawProjectList)
Prototype
afx_msg void OnCustomdrawProjectList(NMHDR* pNMHDR, LRESULT* pResult);
-Elizabeth
Eilzabeth
|
|
|
|
|
hi,
when i create a message box using afxmessagebox, can i get afxmessagebox to display the input string(the 1st parameter) in different font, size and color?
thx in advance!
|
|
|
|
|
Check out ClsMessageBox , part of Jan van den Baard's ClassLib[^].
---
Shog9
I see the way the salesmen stare into the sun
I stood and watched them as they fell off one by one...
|
|
|
|
|
NetServerGetInfo allows you to get the version information for a computer on a network, however, it doesn't seem to have a method for returning the suite information.
For example, both XP Home and Professional return the 5.1 as their version number, but unlike the GetVersionEx, NetServerGetInfo doesn't return a suite mask.
So, how do you differentiate between the two when getting their information over the network?
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Huh? XP Home and XP Professional are different?
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
Yes. XP Home doesn't have domain support, therefore, our product doesn't support it.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Jon Sagara wrote:
So, how do you differentiate between the two when getting their information over the network?
Jon, I don't think it's possible.
I don't have either about to test on, but I think you have found a genuine glitch.
I think that "Windows Server 2003" will probably identify itself differently. (I hope)
The only other way I guess is to test if something fails to run on the Home "Suite".
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Argh.
Oh well. Time for my morning cup of . Thanks for the response.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Isn't there some Wnet* function for this? Something like WnetGetInfoNnn?
|
|
|
|