|
As much as 1 kg. of salt? Perhaps you meant 1e3 milligrams.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
Perhaps you meant 1e3 milligrams
No, when I write 1e6 I mean 1e6
This DeviceIoControl is quite low level for my taste. If the guy looses his data, I don't want to be responsible
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz Sowinski wrote:
No, when I write 1e6 I mean 1e6
LOL
I didn't even notice the quantity specified. Now I feel like I really got my money's worth.
Brad Manske
|
|
|
|
|
I've looked through the documentation and it looks like it might work. If it doesn't, it would only be a little more work to try dismounting the volume. So I now have several more things to try.
Thanks for your help.
Brad Manske
|
|
|
|
|
|
I'm writing my own custom install program. I need to create links in the common desktop, common programs, and common startup directories. I use SHGetSpecialFolderPath to find these directories, but when I run the setup program on NT4 with IE6 I get told it can't find SHGetSpecialFolderPath in SHELL32.dll
Quoting from MSDN...
Requirements...
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
When calling SHGetSpecialFolderPath I write "BOOL success = SHGetSpecialFolderPath(m_hWnd, path, ssfCOMMONDESKTOPDIR, FALSE);" for example.
Well the NT4 PC that I'm testing it on has IE6 on it, so in theory should work. Anyone know why I'm getting this error please?
Jeremy Davis
http://www.astad.org
|
|
|
|
|
What version of shell32.dll do you Have?
You need the version 4.71 or later...;)
Best Reagards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hmm, I saw that in MSDN. How would I find what version I have? Also why didn't IE6 install the latest version? Thanks for your help anyway.
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Can you run depends.exe on target system and check if Shell32.dll exports SHGetSpecialFolderPath? You'll be able to tell whether problem is located in OS or in your installer.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
... and if you're using GetProcAddress to get the SHGetSpecialFolderPath, do not forget that actual name is SHGetSpecialFolderPathA (if you want ANSI) or SHGetSpecialFolderPathW (if UNICODE is your cup of tea)
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks for your help. In the end I've used SHGetSpecialFolderLocation to find the directories ppidl, and converted it into a path using SHGetPathFromIDList.
Jeremy Davis
http://www.astad.org
|
|
|
|
|
|
I created a window on the screen, but it doesn't seem to repaint itself properly. I've called the updatewindow.
|
|
|
|
|
|
Do you need to overwrite the mesage OnPaint...
Reagards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thank you for reviewing my code. Please tell me whether this will cause any resource leak. Thank you a lot for your time and help!
void CMyView::OnDraw(CDC *pDC)
{
CPen redBeaconPen;
VERIFY(redBeaconPen.CreatePen(PS_SOLID, 1, RGB(255,0,0)));
CPen * pOldPen = pDC->SelectObject(&redBeaconPen);
pDC->SelectStockObject(HOLLOW_BRUSH);
pDC->Ellipse(1, 1, 10, 10);
pDC->SelectObject(pOldPen);
}
|
|
|
|
|
redBeaconPen is not selected into pDC when its destructor calls ::DeleteObject. There will be no resource leak. Code is OK.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thank you for your quick reply!
|
|
|
|
|
Who has used the regexp object in system32\vbscipt.dll to parse the text string. I have tried it and make it work!
But i don't know why i can get only one match(that is the matches.GetCount()==1, even there are many exist. The next is my code:
void CInetSessionDlg::ParsePage(CString szPattern, CString szContent)
{
//m_regExp's declaration is on other place link this: IRegExp m_regExp;
//The class IMatchCollection and IMatch are both got from the tlb
//m_regExp = regExp;
try{
if(m_regExp.CreateDispatch(__uuidof(RegExp)) == FALSE)
{
AfxMessageBox("CreateDispatch Failed!");
return;
}
//IMatchCollection2 * temp;
m_regExp.SetIgnoreCase(TRUE);
m_regExp.SetPattern(LPCTSTR(szPattern));
if(m_regExp.Test(LPCSTR(szContent)))
{
//IMatchCollection2 matches=m_regExp.Execute(szContent);
ISubMatches matches = m_regExp.Execute(szContent);
for(long i = 0; i < matches.GetCount(); i++)
{
IMatch2 match = matches.GetItem(i);
//IMatch2 match = temp->GetItem(i);
CString strLink = match.GetValue();
m_cbHref.AddString(strLink);
}
}
}
catch(_com_error& e)
{
AfxMessageBox("Com Error occurred!" + e.Description());
return;
}
}
in this implementation file's header file:
i defined the RegExp(copied from the file RegExp.tlh got from vbscript.dll)
struct __declspec(uuid("3f4daca4-160d-11d2-a8e9-00104b365c9f"))
RegExp;
// [ default ] interface IRegExp2
Why? Who can tell me how to use vbscript.dll in VC++ 6.0
thanks a lot!
Sincerely, Davidlou
davidlou68@hotmail.com
|
|
|
|
|
Hello all,
I'm trying to avoid users to move my window and I've tried to overload the DefWindowproc() and OnWndMsg() in order to catch the WM_MOVING message, but it's doesn't work. Do you have any idea about how to manage this matter?
Thanks you,
parker john
|
|
|
|
|
This works for me:
UINT CMainFrame::OnNcHitTest(CPoint point)
{
UINT n = CFrameWnd::OnNcHitTest(point);
if (HTCAPTION == n)
{
n = HTNOWHERE;
}
return n;
}
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
HI,
It works for a generic window also
if( CWnd::OnNcHitTest(point) == HTCAPTION)
return HTNOWHERE ;
|
|
|
|
|
Yes, it should work for all types of windows. The sample was just taken from main frame window in small SDI app.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi,
I guest windows provides the default action for moving
u cannot stop the moving, but u can get back to the same position
by using some thing ilke that foll code.
In WM_INITDIALOG, take the window rect and on OnMove
code it like the foll.
void CTstNoMoveDlg::OnMove(int x, int y)
{
CDialog::OnMove(m_Rect.left, m_Rect.top);
if( m_Rect.Width() > 100 )
::SetWindowPos(m_hWnd,HWND_NOTOPMOST,m_Rect.left,m_Rect.top,m_Rect.Width(),m_Rect.Height(),/*SWP_NOSENDCHANGING*/SWP_SHOWWINDOW);
}
The reason for the If condition is a WM_MOVE is sent before the dialog is
even properly instantiated at this pt the size might be rather less.
|
|
|
|
|
Hi,
Can someone tell me is there any way to use an ActiveX
control in CView. The intention is to use the ActiveX
with additional facility like drag and resize the ActiveX
control.
Regards,
Sansky
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|