|
Sir.....is it possible to access/use java class from VC++ ? If so...please let me know the mathod
Thanks a lot !!!!!!!
C.R.Naik
|
|
|
|
|
well I don't think it is possible...
|
|
|
|
|
Yes, but its ugly. We did it for a project at work. You have to use COM, which means you have to use MS J++ (or J# now) and expose a COM interface to be accessed from the C++ side. I don't know it well enough to go through the details.
If you are using .NET, then you should probably be able to access the J# Java classes seamlessly. At least that's what I've been told about VS.NET though I haven't played with it much yet.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Thanks a lot for showing me "a window of good hope".
I will go further on this way and if will found the way then I will write you.
Thanks again.
C.R.Naik
|
|
|
|
|
Dear Guys,
Can someone help me how to display the Percentage ("25%") font inside a Progress Bar as the bar moves, the way it displays while installing some software.
Neel.
|
|
|
|
|
One solution is to derive a class from CProgressCtrl. A simpler solution is to download a module someone has worked on already. Look in CodeProject code section.
Kuphryn
|
|
|
|
|
Dear Guys,
Can someone help me how to update an editbox control in a modeless dialog box on the fly. That is for example I've added this piece of code in "OnMouseMove" function.
CClientDC dc(this);
int xcordinate,ycordinate;
char str[100];
xcordinate = point.x;
ycordinate = point.y;
sprintf(str,"X->%d Y->%d",xcordinate,ycordinate);
dc.TextOut(600,20,str);
This code displays the X and Y co-ordinates on the fly in a SDI or MDI.What I mean by on the fly is you know, the way the number moves in a VCR while rewinding. The same functionality I would like to have inside a dialog box's edit box. I tried the usual m_edit=str; UpdateData(false) and SetDlgItemText but to no effect. It displays only the co-ordinate where the mouse was at first, but it doesn't update when I move it. Please Help.
Neel.
|
|
|
|
|
Are you sure that onmousemove is called inside your modeless dialog?
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
I may be going at this all wrong, but here goes: I wrote an app that uses tabs. I put a child dialog under each tab that hides and shows as the tab is clicked, in that child dialog I put a Listbox, then DDX_Contol'ed is to a CCheckListBox class. The listbox resource has fixed owner-drawn capability. I added AfxEnableControlContainer() in the WinApp InitInstance(). So here is my problem. I get an error when I hit the VERIFY(bitmap.LoadBitmap(AFX_IDB_CHECKLISTBOX_95)) statement under _AFX_CHECKLIST_STATE::_AFX_CHECKLIST_STATE() in winctrl3.cpp (VS .NET). This is all after I do the AddString() function for the box. I would assume that it's when it tries to paint. But why? and how do I fix it?
|
|
|
|
|
Sorry, I checked the mother of documentation, MSDN, and found my problem. I needed to derive my own class from CCheckListBox and call create(). This brings up an interesting question: why do I need to derive some classes and not others? I don't need to derive from CString and others but I do from CDialog and CCheckListBox. Is it that I need to derive when it has a WndProc()?
Thanks anyway.
|
|
|
|
|
Hi. I have a bunch of controls dynamically created in a CWnd and i want to jump between them with the TAB.
Just adding WS_TABSTOP to the dwstyle isnt working.
Is it because i have to be in a CDialog or CFormView (parent)class?
If so, is the best solution to emulate it by tracking the TAB button and using CWnd::GetNextDlgTabItem ?
Other related question: how do i set the tab order in dynamic created controls? Creation order?
Thanks in advance!
|
|
|
|
|
I think it should work with a CWnd. To set the tab order dynamically, call SetWindowPos, like this
pWindowBefore->SetWindowPos( pWindowAfter, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE );
where you want pWindowAfter to be the control that gets tabbed to when pWindowBefore has the focus and the user hits Tab.
Creation order should set the initial tab order, so if you create your controls in the order that they should be tabbed between, you should be OK. If you are using a fully custom control, there's some wierd issues with focus (like needing to manually call SetFocus when you get a WM_LBUTTONDOWN). I can't really remember the specifics, but mess around with the SetFocus, and see where it takes you.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
I finally got some code to compile in visual studio .NET 2003, by using the #include <iostream>
using namespace std;
i.e. std::cout << "Hello world" << std:: endl;
It finally compiled, but i dont know how to execute it. please help.
Michael
|
|
|
|
|
choose "start" from the Debug menu.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
if you are using namespace std;, you don't need to specify the namespace again when using the cout stream. ie, just cout on it's own without std:: is fine.
Jon
#include <beer.h>
|
|
|
|
|
I'm the poster...and a library called <beer.h> is not legal when you are using the new ones ... i.e. <iostream> and <string> when you put th ".h" in there it screws it up bigtime. I found I actually did get better results when i put in std::cout <<..... then if i simply did cout... Thanks anyways =) Also, to the first person, thank you too. Now i can execute my programs =) =)
|
|
|
|
|
Since I have overrided this call, I can no longer easily create multiple views in my CHTMLView MDI. I have done some searching but I am getting lost.
My overrided CMyappView::OnFileNew()
opens a CMyPropertySheet.
so my question, How can I open another view so I can send an html file to be viewed? So the user will be looking at the original view plus the newly created. Thanks
Later, JoeSox www.joeswammi.com Constitution Party[^]
|
|
|
|
|
CDocTemplate::OpenDocumentFile opens the specified document for you. So if you've created an appropriate doc template, calling this function will succeed. So could it be the doc template added in the InitInstance of your app.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
Schlaubi wrote:
So if you've created an appropriate doc template,
which is this correct?
CMultiDocTemplate* pDocTemplate;<br />
pDocTemplate = new CMultiDocTemplate(<br />
IDR_JSNFLCTYPE,<br />
RUNTIME_CLASS(CJSMLB03Doc),<br />
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CJSMLB03View));<br />
AddDocTemplate(pDocTemplate);
Now I am having a problem, mostly on my part, correctly calling the OpenDocumentFile function.
example:
pDocTemplate->OpenDocumentFile(....<br />
pDocTemplate::OpenDocumentFile(...
etc. Plus can I only call this in MyClassDoc or can I also call it in MyClassView?
Thanks again.
Later, JoeSox www.joeswammi.com A Season in Hell[^]
|
|
|
|
|
JoeSox wrote:
Now I am having a problem, mostly on my part, correctly calling the OpenDocumentFile function.
example:
pDocTemplate->OpenDocumentFile(....
pDocTemplate::OpenDocumentFile(...
etc. Plus can I only call this in MyClassDoc or can I also call it in MyClassView?
It's no static function, so the former way is correct (pDocTemplate->OpenDocumentFile() ). And it can be called from nearly everywhere you want - you only need the pointer to the doc template.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
|
I am developing a WYSIWYG MDI interface. The graphics look good on screen, now I am venturing into getting the print preview and printed version looking good. All of my drawing code in the CScrollView::OnDraw method. I am using an off-screen bitmap to draw into and at the end of the function I blt it into the CDC. Here are some of my questins:
- Will the the off-screen approach work for print preview and printing?
- If this is not the way to do print and print preview, the other problem I have is that some of the graphics I draw are transparent. I draw them by blting with SRCINVERT, SRCAND, SRCINVERT rop codes. Can this be done with 'print' DCs?
Thanks for any help with printing.
Craig Smith
|
|
|
|
|
cdsmith wrote:
Will the the off-screen approach work for print preview and printing?
yep
cdsmith wrote:
Can this be done with 'print' DCs?
i've heard that the typical transparent-blt techniques don't work with printer DCs; and my experience agrees. but, you might get lucky and find a printer driver that can handle it.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
cdsmith wrote:
- Will the the off-screen approach work for print preview and printing?
It should do, but it may be possible that you could hit an upper limit on the size of the bitmap. As some printers work in very large resolutions (3000 by 3000 or larger), this can cause a very large bitmap to be created. I think there was some upper limit on the size in earlier versions of windows (9x)
cdsmith wrote:
the other problem I have is that some of the graphics I draw are transparent
In my experience, BitBlt works ok for the preview by does not produce output in the actual print for most printers. As you cannot guarantee what printer your user may have, I would suggest moving to the more generic StretchDIBBits() function which I haver never known not to work on a printer. The only issue you may have is that StretchDIBBits() may not support your transparanecy stuff. As I have never used it for that, you will have to investigate using the documentation.
Hope it works out for you. Printing can be hard work.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Hi,
Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place.
What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible?
Thank you.
P.S. I am using VC++ v6
Michael Thomas
|
|
|
|