|
thanks for your answers, and i would like to talk about the question with.
ok,i have a mistake,i know the office doc's temp file. but you know the outlook file - .pst,when you open outlook application, the .pst file will be locked. But the monitor still can do it.
|
|
|
|
|
Perhaps you are looking for ReadDirectoryChangesW() or FindFirstChangeNotification() .
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi i have a CFormView on my SDI and i have successfully created and able to use it but when i instanciated it on my view class and declared it as public it flags with this error..why?
error C2079: 'dlgFrmViewModified' uses undefined class 'CFrmViewModified'
positive vibes
|
|
|
|
|
Please include the header file of class CFrmViewModified
Rinu Raj
|
|
|
|
|
Seems likely that 'CFrmViewModified.h' has not been included in the place where you're trying to create this variable. Add #include "FrmViewModified.h" ( at a guess ) to your view header file.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Did you see MSDN
From the MSDN:
Compiler Error C2079
'identifier' uses undefined class/struct/union 'name'
|
|
|
|
|
I'm not intended to ask a question that reapeted many times!
My Question is simple and not simple! because i saw for that in : MSDN, books, forums, searchable areas of internet!, CodeGuru.com!, and some other programming sites, many articles, and ... .
OK! Question : How can I copy a UniCode(Farsi) string to the clipboard AS that can be pasted CORRECTLY later (at least in my program). END!
I used all the codes, change them, change the variable types (in many combinations) and ..., BUT there were at the best case SOME not-letter symbols and in worst case
all the string was pretty symbols! and I don't know how these many coders use such codes with NO problem!
NOW! : with this brief Introduction! it clear that I'm looking for a NEW, WORKING, FULL CORRECT, because my eyes are flicking by looking at OLD, NOT WORKING, WRONG, codes! (and i'm afraid of facing again with 'HGLOBAL' man!)
AT THE END! : Thanks for your reading! just don't give me the BAD code!
Thanks!
|
|
|
|
|
CString csText(_T("Unicode string"));
HGLOBAL hglbCopy;
// Open the clip board and set the data in to the clip board.
if( OpenClipboard(0) )
{
EmptyClipboard();
wchar_t *wcBuffer = 0;
hglbCopy = GlobalAlloc( GMEM_MOVEABLE,
( csText.GetLength() + 1 ) * sizeof (wchar_t) );
wcBuffer = ( wchar_t* )GlobalLock( hglbCopy );
wcscpy( wcBuffer, csText );
GlobalUnlock( hglbCopy );
SetClipboardData( CF_UNICODETEXT, hglbCopy );
CloseClipboard();
rgds
aneesh
|
|
|
|
|
Thanks aneesh.
but the problem is to converting CString to wchar_t * because the line :
wcscpy( wcBuffer, csText );
will cause thi error (in VC++ 6) :
error C2664: 'wcscpy' : cannot convert parameter 2 from 'class CString' to 'const unsigned short *'
The Main Problem !
|
|
|
|
|
Please put preprocessor defnition _UNICODE ( project->Settings->C/C++->Preprocessor->Preprocessor defnitions )
Rinu Raj
|
|
|
|
|
Thanks Rinu_Raj.
First : Then, I should add _T() to any string(LPCTSTR) that passed as an arguman for a function, is it right ?
Second : I got two errors :
1. error LNK2001: unresolved external symbol _WinMain@16
2. fatal error LNK1120: 1 unresolved externals
|
|
|
|
|
You may add wWinMainCRTStartup
Project->Settings->Link->Entry-Point Symbol wWinMainCRTStartup
Rinu Raj
|
|
|
|
|
Also if u didn't put _UNICODE definition, u cannot represent a unicode string in CString.
nave
|
|
|
|
|
Thanks All...
A little question :
Is there any another way instead of adding _T(), for each string, to convert them from 'LPTSTR' to 'wchar_t *' ? (I wrote a long code and now it's a little difficult to change!)
|
|
|
|
|
I migrated a project from VC++6 to vs2005. But I found to call vbscript
iActiveScript->SetScriptState(SCRIPTSTATE_CONNECTED);
in vc++6 it takes just less than 1 seconds. But in vs2005 it takes about 3 or 5 seconds.
There are about 30 vbscript to run and at each run I need to call
iActiveScript->SetScriptState(SCRIPTSTATE_CONNECTED);
So, finally in vs2005 it is slow down greately.
Does anybody have an idea what I should do to speed up in vs2005?
Many thanks!
Yong
|
|
|
|
|
I am using a manifest to give my program the xp style. For the most part, this works well and is giving me the look I want. However, a couple of CPropertyPageEx's have the old darker grey background. Code wise they relatively simple classes derived from CPropertyPageEx that contain some controls, etc.
One potential difference is that the page has a custom ctrl in it, although this doesn't seem consistent either as some pages with a custom ctrl are the lighter xp colour.
Any general thoughts as to how or why this would occur? I know that isn't much information to go on, but there doesn't appear to be much of a difference.
Any suggestions are greatly appreciated.
|
|
|
|
|
Does your control draw itself ? If so, then themes won't have any effect.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The custom control does draw itself, but shouldn't the property page still adopt the xpstyle? The custom ctrl is doing it's own thing, that's fine, but the property page is still dark grey.
|
|
|
|
|
try the EnableThemeDialogTexture() function
eg. call it like EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB) when the a page is being initialized, with hWnd being the handle of the particular page....
ofcourse this funciton is available only for Windows XP
|
|
|
|
|
This option works, thanks. Is there anyway to accomplish this without the dll? It just seems odd that the other pages are adopting the xp style, while a couple are not. This seems like a bit of a hack to fix those couple of pages. It works, but it doesn't really spread light on why it's happening in the first place.
Thoughts?
Thanks for the post. Good solution for the time being
|
|
|
|
|
Well in my very limited experience this sort of problem occurs when tabbed dialogs are made in an 'unconventional' sort of way...e.g. like in http://www.codeproject.com/dialog/AndLawtabsetdlg.asp...
ofcourse it could be due to some other reason in your case;P...
|
|
|
|
|
I am completely frustrated. I am running Microsoft Visual C++ vers 6.0 and have created an application using the Microsoft App Wizard file/new, MFC Wizard(exe) module. It generates all of the "skeleton" code that will support menues, dialogs, etc. I am using it as: a Single Document, no Document/View architechture support, no document support, no features, no project style, pretty much a default application. The App Wizard generates the workspace and when I compile and run, I get two link error lnk2001, unresolved external references for On_Cancel() and OnOK(). I have tried all resolutions but still get the errors. What am I doing wrong and how does one find out where the variable are and why they are unresolved references. Any suggestions will help. Thanks at sid_kraft@msn.com.
Sid
|
|
|
|
|
That's odd. Are they on a class that has been generated ? Are there calls to On_Cancel and On_OK in the code ? Perhaps you can track down what is making it look for those calls, and perhaps you have to delete some code, or just add definitions for those methods to the class in question ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Anybody know how to store stuff in Windows Protected Storage? Outlook does it for email passwords, and IE stores autocomplete passwords there. But I have no luck trying to figure out the API via Google or MSDN. So am I missing something obvious, or is this an undocumented feature?
Thanks,
Mike
|
|
|
|
|
LsaOpenPolicy, LsaStorePrivateData are your friends.
Of course, this is WinNT and variants only, no Win9x/ME stuff here!
Steve S
Developer for hire
|
|
|
|