|
Hi,
We can't help you, when we haven't any information about your ActiveX or your source code ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Thank you for the answer from you!
I am sorry I don't tell about the Print ActiveX.
This ActiveX is made by VC6.0 and MFC,and about a grid ctrl.
So I want to create the methods of Print and Printpreview in the ActiveX and I can call the method in other app to print the report.
but when I create the printpreview method I have a trouble :That I must
have CFrameWnd point,but I don't how to get the CFramewnd point in the
ActiveX.
That is all,Please give me a hand!
Thanks.
|
|
|
|
|
Have no idea how to add new caption button (like close(x), minimize(_) etc.) to title bar, like it is in GetRight (Docking button (.)). Answer if you know...
|
|
|
|
|
Paul DiLascia wrote about this back in '97, here is the link to the article.
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0697/c++0697.htm
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
I have a problem I just don't get.
I have created two programs, a ProgramApp and a ProgramDLL. The ProgramApp is a SDI and I create a standard modeless dialog when it starts up. Next I load the ProgramDLL so the ProgramApp can use it. I call a function in the Program DLL called ChangeDialogText( lpDlg ), this function sends the lpDlg pointer to the ProgramDLL when calling the ChangeDialogText( lpDlg ).
ok, so far so good,.. now the ProgramDLL has a singal line that does this lpDlg->SetWindowText( "DLL Text" ).... bang here I get an assert that the lpDlg doesn't have a m_hWnd??!?!?!
I have the AFX_MANAGE_STATE(AfxGetStaticModuleState()) in the beginning of the ChangeDialogText function.
I just don't understand it,... it should work. what am I doing wrong.
|
|
|
|
|
I had the same problem through a COM ATL DLL, but the solution is the same, just build a release version of your DLL, it should work (ASSERT only in debug).
Celhtar
|
|
|
|
|
What you can't see won't hurt you
|
|
|
|
|
err, now you are confusing me even more
Peter Marino ( www.marino.dk )
|
|
|
|
|
That isn't a very good solution. I do need my debug version... for debugging and if it asserts then I'm doing something I shouldn't. The assert comes from the ::IsWindow( m_hWnd ) , the m_hWnd comes from my ProgramApp and I can use the lpDlg->SetWindowText( "Whatever" ) without anyproblems,.. but sending the lpDlg over to the DLL and using the same lpDlg->SetWindowText( "Whatever" ) asserts in the ::IsWindow function. The m_hWnd and lpDlg are the same both in the ProgramApp and ProgramDLL.
For some reason the ProgramDLL can't see that the m_hWnd is a valid window in the ProgramDLL?! and this confuses me,.. I have now used 3 days and nights trying to solve this problem.
Peter Marino ( www.marino.dk )
|
|
|
|
|
Try building both the exe and the dll using MFC in a shared DLL. I found this problem too, and using shared dll's it was solved...
Somehow when you use MFC in a shared DLL both the EXE and the DLL will use the same heap or something and pointers can do their work better...
You can find the option in the project settings of the project (left tab).
Please, let me know if it helped you.
Structured programming vs. chaotic mind boggling
|
|
|
|
|
Hi ,
I'm developing the component which calls the stored procs
in oracle. My component is being called in the threads
released by a TCPIP server. I want to know.
1) Is it ok to accept the ADO connection object ( same obj
every time) from the caller, if yes how can i pass it thru
interface?
2) Or should I accept the connection string everytime and
try to connect to oracle.
Can anyone suggest better and safe scenario to get my
work done
Thanking in advance.
Regards
Popsy
.
|
|
|
|
|
I'm going to build a server application, which will be divided into 4 different services. Those services might run on different servers...
I have done a lot of thinking about the communication between those services. They will all run on the same machine, or different machines on a LAN, so the communication protocol don't need to be routable...
I was thinking about going for Named Pipes, be cause I know how to work with those. But Named Pipes doesn't scale well. I mean I meight have 4 threads in service 1, that all might want some data from service 2.
Any thoughts? COM+, DCOM, Sockets, whatever?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
How about DDE? It may be old, but it might fit your needs. You can send any type of data with it, and the applications don’t have to be on the same computer. Plus its relatively easy to learn and use.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Im trying to push buttons within a form on a web site. Is there any events or commands that anyone knows of that will allow me to do this? for example ebay has a form with a "Submit Bid" button.. I would like to be able to push the "Submit Bid" Button with my app..
Any help would be appreciated!
Thanks,
Rob
|
|
|
|
|
I know I can use GetDocument->UpdateAllViews(0) to clear the screen in VIEW.CPP ..... but how can i clear the screen if my function is located in another non-MFC file??????? I just use something liked
::InvalidateRect(Handler, NULL, FALSE);
to update the view.....
Can you help me????
What i want to do is keep printing a list of number.....for example,
1
2
3
4
5
6
7
and the program has to compare the previous number....if the previous number is 7...then I have to erase the 7 and put an A there......but I have to display "7" first...then when it's going to display another .....let say 8....then the list should be
1
2
3
4
5
6
A
8
|
|
|
|
|
Hi!
Is there a way to emulate the WinNT VirtualAllocEx() function on WinCE.
In other words, I am trying to reserve and commit a region of memory within
the virtual address space of a specified process in WinCE, but am not able to
do so because WinCE only supports VirtualAlloc().
I am also trying to create a thread that runs in the virtual address space
of another process in WinCE, and since the CreateRemoteThread function is not
defined I am unable to do so.
I would greatly appreciate if a solution to either of the above could be found.!
|
|
|
|
|
Hi!
I want to create a console application that looks like the Lotus Server, i.e. like a normal console but all the input goes on the last row with other things (logs in that case) being updated while I can write commands. Does anyone know how to create an app like this, an example would be great!
|
|
|
|
|
In my MDI app I made a class that derives from CDocument and another that derives from CView. I also added the CMultiDocTemplate in the InitInstance method of the App class.
My problem is in trying to add the GetDocument() function to my new view. This line in the view's header file:
CVideoDoc* GetDocument() {return (CVideoDoc*)CView::GetDocument();}
gives me these compilation errors in the header file:
error C2143: syntax error : missing ';' before '*'
error C2501: 'CVideoDoc' : missing storage-class or type specifiers
error C2501: 'GetDocument' : missing storage-class or type specifiers
I've compared this to working code, and I don't know the problem. It's gotta be something simple that I just didn't think of. Any help is appreciated.
thanks,
Jake
|
|
|
|
|
Include your document class header file in the appropriate file.
you can simply put #include "videodoc.h" in your view class.
HTH
Jignesh
|
|
|
|
|
I had been including VideoDoc.h in the view's .cpp file. I changed that to include it in the view's .h file, and it's good to go. Thanks,
Jake
|
|
|
|
|
I want to use the status bar in my Dialog based app!
but this code doesn't show the status bar!
m_SB.Create(this);
m_SB.Indicator(indicator, sizeof(in..)); // I think the funck was Inicator or spmething!
but there is no control when my app is running!
I wrote it in OnInitDialog
|
|
|
|
|
Here is the codes
float a,b;
a = (( (AlphaTotal - PrevAlphaTotal) / PrevAlphaTotal ) * 100 );
b = (( (BetaTotal - PrevBetaTotal ) / PrevBetaTotal ) * 100 );
CString testing;
CStringList ReturnedData;
testing.Format("Alpha Percentage %f", a );
ReturnedData.AddTail(testing);
testing.Format("Beta Percentage %f", b );
ReturnedData.AddTail(testing);
(--->ReturnedData will be used to output in view class)
The results would be:
If a or b = 65.50...it displays 0.00
If a or b = 180.50...it displays 100.00
Why i know that because.....I try just type some number in the formula...for example,
a = ((700-500)/500)*100;
b = ((81-60)/60)*100;
Then output is:
Alpha Percentage 0.00
Beta Percentage 0.00
How to fix it??????????????????????
|
|
|
|
|
Are AlphaTotal, PrevAlphaTotal, etc. all integral types? Probably so. Use floating point types (or cast the variables to doubles) otherwise the division operator does an integer divide, which throws away any remainder. That's why 200/500*1000 is 0 - 200/500 is an integer divide and returns 0.
--Mike--
http://home.inreach.com/mdunn/
"Holding the away team at bay with a non-functioning phaser was an act of unmitigated gall. I admire gall."
Lt. Cmdr. Worf
|
|
|
|
|
Oh thanks!!!! It works now...
but i have one more question. For example,
a = 180.98763
I just want to display 180.99....and save it to a char or CString because i want to save to my CStringList........what can i do???
can i use:
char Buffer[128];
sprintf(Buffer, " %f %f", a,b);
I have a and b......I want to display liked:
| 180.98 | 123.56 |
??????
|
|
|
|
|
When i use this code to save the result to a char,
char Buffer[128];
sprintf(Buffer, " %f %f", a,b);
my program is forced to terminate....why?
|
|
|
|