|
What fun!!!
|
|
|
|
|
Is there a way to detect if a UNC path is actually a folder on the local machine that is being shared?
|
|
|
|
|
The function WNetGetUniversalName may be of help.
--
Joel Lucsy
|
|
|
|
|
Hello,
I have this code
COleVariant vtOpenMethod((short)1);
LPDISPATCH pDisp;
pDisp = CRApplication.OpenReport((_bstr_t)"Grafic de ocupare pe zile.rpt", vtOpenMethod);
CRReport.AttachDispatch(pDisp);
ICRParameterFieldDefinitions apParam= CRReport.GetParameterFields();
long lCount = apParam.GetCount();
for(int i = 1; i <= lCount; i++)
{
COleVariant vtIndex ((long)i, VT_I4);
COleVariant vtReport("");
_variant_t vCurVal;
vCurVal = COleVariant(_T(m_data));
ICRParameterFieldDefinition yy = apParam.GetItem(vtIndex,vtReport);
....
}
What I want to do is to pass to my report 2-3 parameters.
If i use
yy.SetCurrentValue(vCurVal);
I get this error :
Unable to write read-only property.
Please can somebody tell me how to pass these parameters?
Thanks!
|
|
|
|
|
I was working on an Dialog app and have done a lot of work on it including UI , etc.
Now the requirement is that I need multiple pages like in a tabbed control .
I read documentation on MSDN that requires me to have a CPropertySheet object in my dialog class and then add CPropertyPage objects to it .
I have done alot of work and need a effiecient way to
Change the existing Dialog to be one of the PropertyPages
I have some basic questions :
1. Do i have to create a new app to do this and import the Dialog Resource , Create a new class from ClassWizard deriving from CpropertyPage and then manually copy / paste chunks of code for handlers and other functions from the old Dialog app ?
2. Is there a better and efficient way of doing this ?
CodeProject Gurus please help !
Engineering is the effort !
|
|
|
|
|
Just checked out some code used for property sheets. Doesn't really look that complicated to just change your dialog classes to be derived from CPropertyPage. I could be wrong though. It'd be nice if was that easy to change.
Can't think of any other way to do it.
Mike
p.s. I am def not a guru, so anyone who knows anything better, let us know
|
|
|
|
|
Hello,
How can I load a file .RC in a VC project with a different name ?? I need to load another RC file (in execution time) to load all the strings of another language.
Any idea ??
Thanks,
Cris.
|
|
|
|
|
Unless you have a reason not to, you can put all of the resources in the same .RC file. Just use the LANGUAGE statment in the .RC file.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Ok, in this case I will have 2 String Tables (2 languages), right ??
And how can choose one String Table to load ??
[]'s
|
|
|
|
|
You don't load RC files at runtime, the RC file is just the source (just as you don't run C++ code, you run compiled code). The resource-related APIs all take module handles, which indicates which module to load from. Check out LoadModule() and the resource API docs for more.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Hey,
i have the following problem: I made an application with 2 static splitter window...
VERIFY(m_wndSplitter.CreateStatic(this, 1, 2));<br />
VERIFY(m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CDiaSelectTree),CSize(200,500),pContext));<br />
VERIFY(m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CTestView),CSize(200,500),pContext));<br />
Now I have a problem with messages. When I select an menu-item the message is only send to my first window. How can I route the message to my second window. I created the same event function in my second-window-class but nothing happend... I'd like to recieve all messages in my 2nd window-class (CTestView).
|
|
|
|
|
You could catch your message in the MainFrame and then redispatch it to the views, by getting the curent document and parsing all its views (CDocument::GetFirstViewPosition / CDocument::GetNextView)
HTH,
K.
Silence Means Death
Stand On Your Feet
Inner Fear
Your Worst Enemy
|
|
|
|
|
I am creating a SDI application that has a TreeView, ListView and a FormView to add data to a database. I am trying to make it as dynamic as possible because it is going to be used in several projects. I have data in XML files that gets read in to fill the Tree View and List View's and then the user enters the data in via the Form View. I have a DLL which has all of the screen resources laid out for the first project and I need to make the Form View display those screen images. The class derived from CFormView has the enum in it with the IDD. I have been looking though the articles here and at codeguru and have come to a choice. I can create a picture box or custom control on the default screen and then have the generic class for the screen shots pick the screen and load it into that rectangle. Does anyone have any other input or suggestions as to how I should go about doing this?
|
|
|
|
|
When I use resizeTo(...) function in Javascript, it resizes the target window. I would like to know what is the event which is generated here which is handled by the Browser to resize the window.
We have a browser in which I have to implement this functionality and I am not able to do it. Our browser window is not getting resized. If anyone of you know how to do this, PLEASE let me know.
Thank you in advance.
|
|
|
|
|
I am trying to declare a CRect m_rect[m][l]; but the program throws an error saying undeclared identifier. I just copied this line from another program. it seems to work fine there. except when i change the variables from m and l to any other variable it gives the same error. why is this? is there any place i have to declare the variables m and l
|
|
|
|
|
If you are using VC++ 6.0, then you will have to do it dynamiclly. I think VC++.Net 2003 will allow this.
Or, you could use a #define or const int m = 4;
I'm just guessing here.
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
swerajan wrote:
...the program throws an error saying undeclared identifier.
Actually, the compiler is what throws the error, not your program. In any case, the compiler error contains the line and the name of the identifier that it found no declaration for. Declare it and you'll be good to go.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I'm assuming (yeah, I know what happens when I assume! ) that they were already delcared. Something like this:
int x;
. . .
x = 4;
CRect rect[x];
I don't think the VC++ 6.0 allows this. I know that it was added to the C++ Standard (but don't think MS implemented this yet). If I'm wrong...
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
I have to do a project working with graphs and the shortest path. It would be cool if I could get my hands on a class that makes a graph from a file and has functions to find the shortest path written in c++.
|
|
|
|
|
Try the boost graph library[^]. It might look a little hairy if your not used to _lots_ of templates, but it comes with plenty of examples
HTH
Ryan
|
|
|
|
|
Excellent, thanks.
|
|
|
|
|
hi. I have a problem:
I have the content of a file read in a BYTE array and i want to open that file with a COM component within my app. The problem is that this COM component only accepts files from a logical disk path.
I can't write it to disk and then tell the COM component to fetch it because i have security issues and it would be very bad.
Is there a way to simulate it or is there a very good way to camuflage a temporary file?(it cant be deleted while the program is in use)
Thanks in advance!!
|
|
|
|
|
Try to use CMemFile MFC class.
|
|
|
|
|
Hi there
I am writing a video capture application using an SDK from the video capture card manufacturer. So far I have been able to display the real time video in a window, my next step is to process single frame information which is stored as a bitmap in a buffer. This buffer is defined as follows:
PVOID pBuffer;
I cannot change this buffer at all as it is part of the SDK. The information stored in the buffer does not need to be changed at all.
I can access the address of the buffer by just using pBuffer, but if I try and de-reference it by using *pBuffer I get an illegal indirection error.
There is no explanation for the PVOID type in the MSDN help apart for "a pointer to any type".
Can anyone help?
Thanks Dave
|
|
|
|
|
A PVOID is simply a void* , so you'll need to cast it in order to do anything with it, e.g. byte* dbuf = (byte*)pBuffer; .
- Mike
|
|
|
|