|
Even SHGetSpecialFolderPath( NULL, szDest, CSIDL_WINDOWS, TRUE ); won't work! So I guess it's not user related...
---------------
Tired of Spam? InboxShield 2.0.2 for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
I guess you have to use SHGetFolderPath() . This is from MSDN:
This function is a superset of SHGetSpecialFolderPath, included with earlier versions of the Shell. It is implemented in a redistributable DLL, SHFolder.dll, that also simulates many of the new Shell folders on older platforms such as Windows 95, Windows 98, and Microsoft Windows NT® 4.0. This DLL always calls the current platform's version of this function. If that fails, it will try to simulate the appropriate behavior.
Mazy
No sig. available now.
|
|
|
|
|
|
ok, then what's the proper way to get the c:\windows\local settings\application data folder under Win98?
Thanks!
---------------
Tired of Spam? InboxShield 2.0.2 for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
|
Oh, then I guess that this folder gets created when installing MS Outlook and isn't there by default. GetWindowsDIrectory() is working for me and I just add \Local Settings\Application Data\ to it.
My only concern is if \Local Settings\Application Data\ will still be in english for other languages, such as french... Anyone knows?
Thanks for your help!
---------------
Tired of Spam? InboxShield 2.0.2 for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
Yes, this folder is always in English. Only folders that will be in other languages are, as far as I know, "Desktop" and "Startup".
|
|
|
|
|
For CSIDL_LOCAL_APPDATA and CSIDL_WINDOWS , you must have v5 of the common controls DLL. What version of Internet Explorer does the Windows 98 machine have?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
When I've tried to catch keyboard messages with SetWindowsHookEx(WH_KEYBOARD, KbHookingProc, hinstDll, 0), I've noticed, that only WM_KEYDOWNs are hooked.
It means that, as I make an attempt to send the message to my primary thread of execution like this:
LRESULT CALLBACK KbHookingProc(int code, WPARAM wParam, LPARAM lParam)<br />
{<br />
if (code < 0) goto ret;<br />
<br />
UINT uMsg = (lParam & KF_UP) ? WM_KEYUP : WM_KEYDOWN;<br />
<br />
PostThreadMessage(ThreadId, uMsg, wParam, lParam);<br />
<br />
ret:<br />
<br />
return CallNextHookEx(hhook, code, wParam, lParam);<br />
};
I recieve only WM_KEYDOWN messages.
So, when my primary thread tries to translate such re-sent messages, TranslateMessage doesn't work (I suppose, it depends on WM_KEYUP in some way, but I'm not sure).
|
|
|
|
|
Hi buddy
I've been searching for such a thing, but could NOT find a solution.
I thought likely you can suggest something sice you are older
Thanx in advance and here's my eMail: Marzbany@yMail.com
|
|
|
|
|
|
Hi all,
My problem is that I am writing an application using ODBC to connect to an Access database. I have since found out that the there is a problem putting a datetime object into this database.
I found an article at Codeguru... which does fix that problem but on to my current problem. When I enter in a Date Time with the DateTimeCtrl then I advance to the next record or any record and it continues stuffing my original selection into every record.
Thanks,
Steve
|
|
|
|
|
Nevermind I figured it out.
Thanks anyways.
Steve
|
|
|
|
|
Hi,
I have an editable CTreeCtrl, in the function OnEndlabeleditTree() I decide whether I would save the change or, not. The problem is at the end of the function I check the ItemText of the edited label and it always remains unchanged although the label actually changes. Please tell me how I can actually reflect the change in the program. Here is the code:
void CGeneratorView::OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult)
{
TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR;
HTREEITEM hItem = pTVDispInfo->item.hItem;
CEdit* pEdit = m_TreeCtrl1.GetEditControl();
CString str;
pEdit->GetWindowText(str);
if (str.IsEmpty())
{
MessageBox("Please enter a valid Label!");
*pResult = FALSE;
return;
}
else
{
*pResult = TRUE;
}
m_TreeCtrl1.SelectItem (hItem);
MessageBox (m_TreeCtrl1.GetItemText(hItem));
}
|
|
|
|
|
From what I understood OnEndlabeleditTree() get's after edit finished, but before actual tree item changed. Therefore, your MessageBox (m_TreeCtrl1.GetItemText(hItem));
inside OnEndlabeleditTree()is premature.
You may use your str at this point, however if you expect item text to be changed somewhere and really want to figure out what text should be -- post User Message to yourself and MessageBox items text in it's handler.
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
igor1960 wrote:
post User Message to yourself and MessageBox items text in it's handler.
please explain the above statement
|
|
|
|
|
Instead of yours:
m_TreeCtrl1.SelectItem (hItem);<br />
MessageBox (m_TreeCtrl1.GetItemText(hItem));
Do the following for example:
PostMessage(WM_APP+1, (WPARAM)hItem, 0L);
Now, create WindowProc handler if you don't have already, and put the following code there:
LRESULT CYourWnd::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) <br />
{<br />
if(message == WM_APP+1)<br />
{<br />
MessageBox (m_TreeCtrl1.GetItemText((HITEM)wParam));<br />
}<br />
...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
I am working on a Vc++ Dialog app with ATL support .
I needed some functionality from Excel and started following :
HOWTO: Create Automation Project Using MFC and a Type Library
ID: Q178749
i get the following errors
ApplicationDev\Cam\CamProgrammer\excel8.h(9228) : error C2011: '_Application' : 'class' type redefinition<br />
C:\ApplicationDev\Cam\CamProgrammer\excel8.h(9511) : error C2011: 'Sheets' : 'class' type redefinition<br />
C:\ApplicationDev\Cam\CamProgrammer\excel8.h(9546) : error C2011: '_Worksheet' : 'class' type redefinition
what is wrong ? Please advise
|
|
|
|
|
Where is the #include < excel8.h > statement?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
it is there in the projectDlg.h file
|
|
|
|
|
It should go in the stdafx.h file.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Plus using classwizard I am not adding all the zillion classes within Excel . I am adding the classes that I need . Would that be a problem ?
|
|
|
|
|
i am doing some Excel automation stuff and needed to convert a char * to a VARIANT
SysAllocString needs a unsigned short * which doesnt convert correctly from a char *
Is there a function that will allow me to assign a char * value to a VARIANT ?
|
|
|
|
|
Take a look at the _variant_t wrapper class.
|
|
|
|
|
I need to pass a pointer to a _com_ptr_t object (as created by the #import directive), but I can't take the address of it, since the & operator is overriden by the class to return the underlying interface pointer.
eg:
void f( ADODB::_RecordsetPtr *pRs1, ADODB::_RecordsetPtr *pRs2 )
{
if ( NULL != pRs1 )
{
}
if ( NULL != pRs2 )
{
}
}
ADODB::_RecordsetPtr pRs;
f( &pRs, NULL ); Yes, I can pass it by reference, but I want a pointer since the object is allowed to be NULL if it is not required.
Any ideas?
Thanks!
|
|
|
|