|
Hi there,
You are missing an & in front of Ipic.
hr = OleLoadPicturePath(OlePathName,NULL,0,0,IID_IPicture,(void **)(<big>&</big>Ipic));
Fabian
|
|
|
|
|
Hello everyone.
I want to attach a dialog to display as a view. How to do it?
Please help me.
Thank you.
-Freehawk
|
|
|
|
|
do you mean of FormView
Leave your mark wherever you go
|
|
|
|
|
Just use CFormView class.
|
|
|
|
|
Dear Friends,
Suppose i got an ActiveX control (or any COM dll). I am distributing it will by application. Now the problem is that anyone can utilize that dll or OCX. I want to prevent others to use my OCX and dlls. How can i ensure the security of my COM controls so that no one else can use it.
Imtiaz
|
|
|
|
|
HI One Idea is...
Create Time:
in OCX or DLL define a variable with some value let XXXX
& check at load time. if false then exit.
On Use time:
at contructor or on_load set that value as XXXX(as u set that in coding u know that..) & then start application....
OK! Bye
---Sumit Kapoor--- sumit_kapoor1980@hotmail.com
|
|
|
|
|
MapViewOfFile() if giving me an address that is out of process address range. Trying to use it gives me an access violation as expected. All parameters passed in to MapViewOfFile seems to be fine. Anyone has faced the same problem before ?
Thanks
|
|
|
|
|
(From MSDN)
Reading from or writing to a file view can cause an exception. For example, accessing a mapped file that resides on a remote server can generate an exception if the connection to the server is lost. Exceptions can also occur because of a full disk, because the file is shared and a different process has locked a byte range, or because of an underlying device failure or memory allocation failure. To guard against exceptions due to input and output (I/O) errors, all attempts to access memory mapped files should be wrapped in structured exception handlers.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Check the last parameter to CreateFileMapping as I think this needs to be a wide character string otherwise you get a GPF then or later.
Roger Allen - Sonork 100.10016
Strong Sad: I am sad I am flying
Who is your favorite Strong?
|
|
|
|
|
Now I want set the Paragraph JUSTIFY alignment of text like Microsoft word.Paragraphs are justified at the two sides of the text;
I do this by follow,but it is of no effect,I don't know
what it's the reason.Can you help me?
_AFX_RICHEDITEX_STATE _afxRichEditStateEx ;
_AFX_RICHEDITEX_STATE::_AFX_RICHEDITEX_STATE()
{
m_hInstRichEdit20 = NULL ;
}
_AFX_RICHEDITEX_STATE::~_AFX_RICHEDITEX_STATE()
{
if( m_hInstRichEdit20 != NULL )
{
::FreeLibrary( m_hInstRichEdit20 ) ;
}
}
//AfxInitRichEditEx by called in the InitInstance() function of the App.
BOOL PASCAL AfxInitRichEditEx()
{
if( ! ::AfxInitRichEdit() )
{
return FALSE ;
}
_AFX_RICHEDITEX_STATE* l_pState = &_afxRichEditStateEx ;
if( l_pState->m_hInstRichEdit20 == NULL )
{
l_pState->m_hInstRichEdit20 = LoadLibraryA( "RICHED20.DLL" ) ;
}
return l_pState->m_hInstRichEdit20 != NULL ;
}
void CAutoRichEditCtrl::SetParagraphJustify()
{
PARAFORMAT2 pf;
pf.cbSize = sizeof(PARAFORMAT2);
pf.dwMask = PFM_ALIGNMENT;
pf.wAlignment = PFA_JUSTIFY;
SetParaFormat(pf);
}
|
|
|
|
|
Hi
I have one quick question here: is it possible to insert a class with private copy constructor and assignment operator into a Visual C++ vector STL? How about other STL implementations? I have tried it on VC++ 6.0, and it does not seem to be possible. Or maybe there's another not-so-straightforward way to do it?
Thanks!
|
|
|
|
|
You can't use such objects with any standard-conforming implementation of the STL. STL containers require that the elements stored in them are copyable by a copy constructor and assignable by the assignment operator.
|
|
|
|
|
No, not by value. In fact, by making the copy constructor and assignment operator private, you are declaring that you cannot copy objects of this type, hence there is no container which can store them by value. You need to store pointers to them.
--
Booohoo!
|
|
|
|
|
Hi , this is my problem if anybody knows that plz give me a use full tips,
Probs:- I have a DLL it contain only resource , I would like to replace one particular string, that is in side resource DLL. But I don’t want to recompile it.
~ Rahuraman.K
|
|
|
|
|
Hope this[^] helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
To edit resource-containing exe/dll-files, you just need a tool called "Res[ource]Hacker"...
|
|
|
|
|
|
Thanks for u'r immediate response with plenty of information
~Rahuraman.K
|
|
|
|
|
How can i display my own tooltips using VC. I am talking about the ones such as function declarations that VC displays in the IDE.
Any help will be appreciated
Vikash Parida
|
|
|
|
|
Sorry, I haven't my source code on this computer at the moment
But you can create Tooltips with the "CreateWindowEx" function, then you
need to specify something like WC_TOOLTIP or perhaps "TOOLTIP32" as window class -- take a look at the Win32.hlp - it is being described there
|
|
|
|
|
Hi,
It would be great if somebody can help me with this doubt.
My main target is :In order to list the patches and their dependancies on the target machine(for ex:my machine):
Should I have to go through the path -
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
or
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\
When I went through this path.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
I am able to get a list of hot fixes .
What are hot fixes and are these patched?
When I went through this path.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\
I am able to see 3 entries-
Data Access
Windows 2000
Windows MEDIA pLAYER
And under Windows 2000 -I am seeing 2 entries SP4 and SP5.
Is SP4 is the list of service packs?
Is SP5 is the list of updates?
SP5 has a folder called FileList.
This folder when I click shows some dlls on the right pane.
Are these dependancies?I mean dependancies which these patches depend?
Pls guide.
|
|
|
|
|
Hi,
It would be great if somebody can help me with this doubt.
My main target is :In order to list the patches and their dependancies on the target machine(for ex:my machine):
Should I have to go through the path -
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
or
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\
When I went through this path.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
I am able to get a list of hot fixes .
What are hot fixes and are these patched?
When I went through this path.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\
I am able to see 3 entries-
Data Access
Windows 2000
Windows MEDIA pLAYER
And under Windows 2000 -I am seeing 2 entries SP4 and SP5.
Is SP4 is the list of service packs?
Is SP5 is the list of updates?
SP5 has a folder called FileList.
This folder when I click shows some dlls on the right pane.
Are these dependancies?I mean dependancies which these patches depend?
Pls guide.
|
|
|
|
|
they are created by the same way
pDocTemplate = new CMultiDocTemplate(
IDR_CREATETYPE,
RUNTIME_CLASS(CCreateViewWithPrintDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CCreateViewWithPrintView));
AddDocTemplate(pDocTemplate);
pTxtTemplate = new CMultiDocTemplate(
IDR_CREATETYPE,
RUNTIME_CLASS(CCreateViewWithPrintDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CTxtView));
AddDocTemplate(pTxtTemplate);
please see my code!
http://mail.sina.com.cn/cgi-bin/attachment.cgi/oookkkk/application/x-msdownload/1085976835.13075.mail.sina.com.cn:2,S.a00.dat/createviewwithprint.rar
if you can correct it.please mail me:oookkkk@sina.com
bary thank you!
|
|
|
|
|
Hello every body
After i read an article about "A Technique to Customize the Title Bar of Windows" By Junlei Li
on code project (WTL).
I decide to write in to MFC DLL, a set of classes: Button, Edit..., and Customize the title bar.
But i have got a problem with title bar: Firt i remove the title bar of the parent, and then I
create a window to replace it (WS_VISIBLE | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN).
It works Ok on Frame (the window is mainframe or child frame), but on Dialog, the Substitute title
is not correct, it doesn't appear the same place as the Original title that i had removed.
I'm sure that the x,y position is absolutely right ( because it work ok on Frame). I consider that the WS_POPUP is the main resaon cause the problem (is it true)
Any one could help me ?, After i finish this dll, i will post on codeproject (I promise)
Thanks alot
TrungHuynh.
|
|
|
|