|
When you creted the variable with the class wizzard you select object and no CString.
Delete all the references of your variable and make again the variable and have special care in the category you must to select the categoy value and variable type CString....
That is all...
Best Regards...
Carlos Antollini.
|
|
|
|
|
Sorry... I found wath it was now... hehe... my fault!!
It was a varible with the exactly same name!
hehehehe.... That's what happends when you write much code!!
------------------------------
CodeCracker - That's me!
------------------------------
|
|
|
|
|
Don't worry about that...
But For tomorrow you must to write 1000 times:
I don't must write two variables in the same class with the same name.
Cheers!!!
I want
Carlos Antollini.
|
|
|
|
|
just two word...
cut and paste
1000 times:
1000 times:
I don't must write two variables in the same class with the same name.
I don't must write two variables in the same class with the same name.
I don't must write two variables in the same class with the same name.
I don't must write two variables in the same class with the same name.
...
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
|
|
|
|
|
hhhmmmmm.
And what about
void main()
{
int i = 0;
for(i = 0; i < 1000; i++)
printf("I don't must write two variables in the same class with the same name.\n");
}
Best Regards!!!
Carlos Antollini.
|
|
|
|
|
Netmeisters,
I am writing a program for the Pocket PC which, among other things, communicates with a Linux server via SSL. The server is using OpenSSL, and the Pocket PC program uses the secure socket layer functionality intrinsic to the Pocket PC. It takes only a couple of steps to "turn on" SSL on the Pocket PC and, once this is done, the program completes the SSL handshake with the server and all is well. EXCEPT that the Pocket PC program has to include a call back which is supposed to check the certificate sent from the server, and there is absolutely NO documentation as to how to do this. The Pocket PC does not use the usual Microsoft Schannel interface to do SSL, so the Schannel documentation apparently does not apply.
Any suggestions would be welcome, even just suggestions as to where I might find documentation, newsgroups to post the question, etc.
Thanks,
Matthew Fleming
|
|
|
|
|
I've created an activeX that responds to mosue events by using the class wizard and adding message maps for the WM_LBUTTONDOWN an WM_LBUTTONUP Messages. When I test the ActiveX in the ActiveX Control Test Container, the mouse events work. When I drop the ActiveX control on a Dialog in another project, the events do not work.
Can someone please shed some light on what I am missing to get my mouse events working properly.
Thanks!
|
|
|
|
|
Hello everyone this is a question regarding the outlook bar control on
http://www.codeguru.com/controls/outbar.shtml
I am having problems drawing the folders. I am using this control with my own view class and I create the splitter windows and call this control on top of it. However I am not able to draw 3 folders. I have added three folders and the one on top seems to be fine but folder 2 and 3 at the bottom dont turn out to be fine. Folder 3 doesnt appear at all(and instead of folder 3 there is whitespace) and only half of folder 2 is seen. So I was wondering if any one can help me out. I tried debugging but cant figure out what the problem is.
Thanking you in advance for your help
vg
|
|
|
|
|
I have couple of questions, both related.. I would really really love to have even one answered .. Please help ...
Question 1) I place a CEdit control on a View (CView Derived) , using
CEdit's Create() function.. I want to allow the user to click on the Control in the View and to be able to drag and drop it at any new location in the View.. How do i implement this ??
Question2) I Created a AppWizard based MFC container application...
I was able to place a RichTextBox Control in the view using COleClientItem::CreateNewItem(CLSID_RICHTEXTBOX) ... Then using the CRectTracker and its support for COleClientItem i was able to drag, drop and place my active X contol any where in the view as desired.. I want to know how i can invoke the Methods of that ActiveX control (I only have a pointer to COleClientItem's derived class variable which app-wizard created for me)....
Also can i relate a CEdit control variable to a COleClientItem??
Thanks in Advance
ananth
|
|
|
|
|
to make drag and drop work you will have to implement OnDrop BeginDrag and DoDragDrop(Ibelieve this is the name). If you go to your view class and open up ClassWizard you will see a bunch of message handlers and if you scroll down you will see the ones for dragging and dropping. Also you might have to implement OnLButtonClick to instantiate your drag and drop. Hope this helps.
vg
|
|
|
|
|
Hi,
I am trying to build an application to use GDi+. I installed the latest SDk, specifed the latest include and library path. And linked to gdiplus.lib
The problem is when i goto recompile my app, i get a list of errors from the GDIPLUS.H. Along the line of ULONG_PTR undeclared.
Can anyone offer any advice.
Cheers
Richard
|
|
|
|
|
It sounds like you didn't install the Platform SDK right if you're getting that error message. (Check your VC directories again, make sure the Plat SDK directories are before the Msdev ones.) Those _PTR types are in basetsd.h
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
Okay i have a DWORD array declared in the private section of a class header. I then use this array in a function in the class and put some numbers into it. No problem there. But when i try and access the DWORD array in another function in the class the array is empty. This i don't understand why its emptying. I am doing the exact same thing a buffer array i.e TCHAR buffer[size][size] and that one works fine.
Any ideas
Cheers
Peter
p.s. when i tried to do the same thing with a structure containing a buffer and dword that was empty as well like the DWORD array.
|
|
|
|
|
Did you make a malloc of your array?
Best Regards....
Carlos Antollini.
|
|
|
|
|
Please post the code.
Maybe You are making a new instance of class in each function? TCHAR array should be static in such case.
|
|
|
|
|
Right the malloc stuff didn't work. This is really stupid cos all that needs to happen is that one of the class functions writes to a DWORD array and one reads from the dword array.
This is basically whats happening at the moment
this bit declares variables needed in class header and private
<br />
private:<br />
<br />
TCHAR sSigners[STRING_LENGTH][MAX_SIGNERS];<br />
TCHAR sCountSigners[STRING_LENGTH][MAX_SIGNERS];<br />
DWORD dwCountSigners[MAX_SIGNERS]; <br />
<br />
<br />
<br />
UINT uiNumberOfSigners; <br />
UINT uiNumberOfCountSigners;<br />
};<br />
this bit writes data to the TCHAR string and DWORD array
<br />
void CViewSigners::AddCounterSignerToDisplay(TCHAR *psCountSignerName, DWORD dwIndexOfSigCountSigned)<br />
{<br />
if(uiNumberOfCountSigners == MAX_SIGNERS)<br />
{<br />
<br />
TCHAR *psErrorMessage;<br />
TCHAR *psErrorTitle;<br />
<br />
psErrorMessage = new TCHAR[STRING_LENGTH]; <br />
psErrorTitle = new TCHAR[STRING_LENGTH];<br />
<br />
LoadString(_Module.GetModuleInstance(), IDS_MAX_CERTS, psErrorMessage, STRING_LENGTH);<br />
LoadString(_Module.GetModuleInstance(), IDS_CERTERROR_TITLE, psErrorTitle, STRING_LENGTH);<br />
<br />
MessageBox(psErrorMessage, psErrorTitle, MB_OK | MB_ICONWARNING);<br />
<br />
delete[] psErrorMessage;<br />
delete[] psErrorTitle;<br />
}<br />
else<br />
{<br />
char sTest[10];<br />
_ultoa(dwIndexOfSigCountSigned ,sTest, 10);<br />
AfxMessageBox(sTest);<br />
<br />
strcpy(&sCountSigners[uiNumberOfCountSigners][0], psCountSignerName);<br />
dwCountSigners[uiNumberOfCountSigners] = dwIndexOfSigCountSigned; <br />
<br />
uiNumberOfCountSigners++;<br />
}<br />
<br />
}<br />
this bit reads data from the TCHAR string and DWORD array the bottom for loops the one to look at the top for loop is for a different function that similar but that works fine
<br />
BOOL CViewSigners::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
<br />
<br />
HTREEITEM hItem[MAX_SIGNERS];<br />
m_imageList.Create(IDB_SIGNER_TREE, 14, 1, RGB(255,0,0));<br />
m_tSignersView.SetImageList(&m_imageList, TVSIL_NORMAL);<br />
<br />
CViewSigners::SetWindowText("Signers");<br />
<br />
<br />
TCHAR sTempCertName[STRING_LENGTH];<br />
<br />
<br />
for(int i = 0; i < uiNumberOfSigners; i++)<br />
{<br />
hItem[i] = m_tSignersView.InsertItem(&sSigners[i][0], 0, 0);<br />
}<br />
<br />
<br />
for(int u = 0; u < uiNumberOfCountSigners; u++)<br />
{<br />
<br />
m_tSignersView.InsertItem(&sCountSigners[u][0], 1, 1, hItem[dwCountSigners[i]]);<br />
<br />
char sTest[10];<br />
_ultoa(dwCountSigners[i] ,sTest, 10);<br />
AfxMessageBox(sTest);<br />
<br />
m_tSignersView.Expand(hItem[u], TVE_EXPAND );<br />
<br />
}<br />
<br />
return TRUE;
<br />
}<br />
peter
|
|
|
|
|
The second 'for' loop uses 'u' variable. But inside You are using 'i':
[code]
for(int u = 0; u < uiNumberOfCountSigners; u++)
{
m_tSignersView.InsertItem(&sCountSigners[u][0], 1, 1, hItem[dwCountSigners[i]]);
char sTest[10];
_ultoa(dwCountSigners[i] ,sTest, 10);//<---- Here, You are using i
m_tSignersView.Expand(hItem[u], TVE_EXPAND );
[/code]
maybe this is the cause of the problem?
Rest looks rather ok.
Make sure, that You initialize all variables with zero in constructor.
Furthermore, You should put into the memory watch the content of the string which is being overwriten. Go through the code and look when it changes.
|
|
|
|
|
Cheers Mate
The i rather then u bit was the problem. I can't belive i missed something that simple i guess it just needs another pair of eyes sometimes.
Thanks Again
Peter
|
|
|
|
|
I have a CView object that is part of a MDI app. This view is created whenever the user wants to capture a frame from a live video source (using DirectShow and WDM). I need functionality that allows the user to right click in this view and have a popup menu come up.
If I don't resize the view, the entire client rect is used by the live video. When I maximize the view, I get a black border around the live video. This black border is expected since the video window must be a certain proportional size.
Problem: If I click in the black border area, I get my popup menu. If I click on the video "window", the mouse clicks get eaten. I need the mouse clicks to be handled when they are performed over the video (as well as when they are performed over the black border section).
If you need to ask questions, I will answer them to the best of my ability.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Inside you'r CView you're using a kindof a control? a CWnd derived class. This CWnd derived class Trap the mouse capture so, the event is catch by this and not by you'r cView. So you must do somthing Inside this CWnd control to handle this event and from there call you'r function
anything DisplayPopupMenu(void)
{
}
this will be call from you'r CView class AND from you'r control who diplay the animation.
hope this will help
Remi Morin
Rmorin@Operamail.com
Remi.Morin@Lyrtech.com
|
|
|
|
|
I'd suggest using SetCapture when the mouse is over the video feed, so that the mouse message is caught by your main window. I'm presuming the video is coming in through a control you cannot edit to catch the message directly.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
DirectShow is a pain in the ass. Here's what I'm doing:
When the view is instantiated (due to the user clicking a menu item to view a video window), the view sends its hwnd to another class which controls access to a DLL. The DLL calls SetWindowLong(theCviewHwnd, GWL_WNDPROC, callbackFunc) so that the mouse clicks can be passed back to the original window. The results are as I stated before - if I right-click in the black border area (not covered by the live video stream window), the view responds as expected with a popup menu being displayed, but if I click on the rectangle containing the video, the mouse click is ignored.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I just found out what I was doing wrong (or more accurately, not doing at all). It's got to do with an interface in the COM object. I wasn't calling a function that directs messages to the owner window (because the documentation implied that it only forwarded video events to the parent window, and not regular windows commands).
Sometimes, MSDN help sucks.
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
please help me to solve this problem:
when graphic primitives (rectangles) are printed being filled with standart brush (CreateSolidBrush(...)) it's OK
BUT when filled with custom (CreatePatternBrush(...)) nothing is printed.
SOMEBODY PLEASE HELP MEEEEEE.
|
|
|
|
|
You mean printed to paper ? This is a common question - when you print with a pattern brush it cannot be stretched, it repeats itself. This makes pattern brushes unacceptable for printing, because a print DC is so much bigger than a screen DC. Use a bitmap and stretchblt instead.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|