|
Hi,
I have an ATL COM object with DECLARE_CLASSFACTORY_SINGLETON
is there a way to access the singleton instance inside the serverdirectly?
(currently I'm using CoCreateInstance, but the registry/DllGetClassObject round trip seems not necessary)
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
I created two static horizontal panes using CreateStatic() function of CSplitterWnd class. The view class of the top pane is derived from CView and the bottom pane from CScrollView. The message mapping of the menu items is performed in CMainFrame as it cannot be done directly from both the view classes(Atleast it seems like that). The problem is wheni call Invalidate(TRUE) in one of the functions of the View class it gives a runtime error.
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT ,<br />
CCreateContext* pContext)<br />
{ <br />
VERIFY(m_wndSplitter.CreateStatic(this, 2, 1));<br />
<br />
VERIFY(m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CTitleView),<br />
CSize(100, 100), pContext));<br />
VERIFY(m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CTrialView),<br />
CSize(100, 100), pContext));<br />
m_wndSplitter.SetRowInfo(0,50,50);<br />
return TRUE;<br />
}
As u can see from the above code i created a splitter window. CTitleView is derived from CView and CTrialView from CScrollView.
void CMainFrame::OnFileOpen() <br />
{<br />
m_pTrialView.OnFileOpen();<br />
}
m_pTrialView is an object of CTrialView. It is used to call the function FileOpen in CTrialView.
void CFaceRecognizerView::OnFileOpen()<br />
{<br />
Invalidate(TRUE);<br />
}
void CFaceRecognizerView::OnDraw(CDC* pDC)<br />
{<br />
CFaceRecognizerDoc* pDoc = GetDocument();<br />
ASSERT_VALID(pDoc);<br />
if(flag==1)<br />
AfxMessageBox("HI");<br />
}
This is where the error comes. My aim is to access the OnDraw() function. Hopw someone can help me out of this
|
|
|
|
|
When working with Doc/View framework, is it better to call UpdateAllViews from doc objects instead of trying to repaint views themselves.
Jaime
|
|
|
|
|
hello everyone
i wanted to know what exactly is the .hh file formats.are they the header file extensions.
one can see a lot of these files used like header files for the cpp files
this website has programs which use these file formats.
http://www.mip.informatik.uni-kiel.de/~wwwadmin/Software/Doc/BIAS/html/files.html
|
|
|
|
|
looking at their content, it seems that they are headers to...
moreover, you can find such code lines, that explicit what i thought :
#include <Base/Debug/Error.hh>
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
why would one use such an extension when we have a .h extension header ?
|
|
|
|
|
good question... but as we cannot ask to them directly...
we probably will never know
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
.hpp / .h++ / .hxx / .hh for C++ headers.
.h should be reserved for C headers
This is not respected though
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
How does one convert from std::wstring to std::string?
I am the handsome one in the crowd.
|
|
|
|
|
does W2A() help? And yes, what about more generic W2T Macro.
I am not sure if it works for STL strings or not but worth a try.
Einstein: "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
My Articles
|
|
|
|
|
I have been using a rtf help generator called Cheetah and then by using Microsoft Help Workshop (taking the rtf created by Cheetah) to generate the Help file.
In my program I load this help file via
WinHelp(0, HELP_CONTENTS);
However the Help Window's Title is the name of this help file.
How can I change the Help Window title to something more meaningful.
Any suggests please.
|
|
|
|
|
Edit the .cnt file with the help of either microsoft help workshop or something similar, that would allow you to change the window title.
-*-*-
<bold>
- Nilesh
<italics>
"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Did try and change the default title in Microsoft Help Workshop, worked fine. Thanks.
Just two other questions if you please.
1. Can you arrange for a Next tab on the Help Window;
e.g. Contents Index Back Print Next
2. Can you have index (Doc Map) on a left Pane and the Main Help on a Right Pane.
I cant find any info on these settings.
|
|
|
|
|
Don't have much idea about it, but I doubt that it could be done.<<>
<bold>- Nilesh
<italics>
"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Might want to have a look at HtmlHelp
You must be careful in the forest
Broken glass and rusty nails
If you're to bring back something for us
I have bullets for sale...
|
|
|
|
|
1. Translate DICOM format to raw format:
To save image file into a binary file format as a 1 dimensional array.
2. Compression-
To use Run-Length Coding (RLC) compression algorithm to compress the
information in the raw format file.
INclude a header: Row & Coloumn size.
3. De-compression-
Open file to display the image file.
Basically it is to translate a DICOM format to raw format and save it as a binary file format. Using RLC to compress the information in the raw format file so that the image can be view in future when I open the binary file format. If anyone is able to help please drop me a mail asap to ulusai@yahoo.com.sg. Thank you.
|
|
|
|
|
There is a DICOM RT group(dicomrt@yahoogroups.com), you might get your solution over there.
<bold>- Nilesh
<italics>
"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Hi,
I'm trying to write an application that can play/recieve multiple video streams simultaneously using the WMPSDK. The tricky part, as I see it, is the association of each player object with different Internet connections. I wonder if this can be done and then how? Is there a way to set which Internet connection to use for the Media Player COM objects?
Lars Bergström
|
|
|
|
|
I wanna get value of item rect by use of CListCtrl::GetItemRect in order to create an object of CEdit based on it, but It fails, why?
Here are some codes as follows
CListCtrl m_lvcTest;
int nCount = m_lvcTest.GetItemCount();
CRect rect;
m_lvcTest.GetItemRect(nCount, &rect, LVIR_BOUNDS);
rect returned is not what i want each time
|
|
|
|
|
tiplip wrote:
m_lvcTest.GetItemRect(nCount, &rect, LVIR_BOUNDS);
1) the first parameter of GetItemRect is the zero-based index of the item you want to grab the rect for
2) nCount would not be a valid index, since at any given time the valid indices for a non-empty list control are 0 to nCount - 1
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
I know the facts you say, the function I want to do is the new Item will be added to last pos of listctrl whenever i click the button "New Item", so I need to get the rect whose index is nCount( got by GetItemCount)
So, what should i do?
|
|
|
|
|
I don't think you can get the rect unless the item exists.
Here's what I would try:
When the user clicks "New Item", insert a dummy item using a default text value, like "<type text here>", then call EditLabel. If the user cancels, or the text is invalid, simply remove the item.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Do you mean to tell me I cannt get the rect if the list is empty?
Ok, Let me have a try of your method and thanks a lot
|
|
|
|
|
I am using PJ Naughter's CNTService for the purpose. The example service provided by him works fine. But when I try to use his frmaework for my own service application, the service creation works fine but start service always fails with the error 997: overlapped IO operation in progress.
Any help plz.
Rahim Rattani
|
|
|
|
|
Try posting this message to the article itself so that PJ will surely see it. He may not see your question here in the VC++ forum.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|