|
Hi.
Is it possible to combine openGL and GUI interface in one window? If it is possible, how do I go about doing it in SDI? But if it is not possible, is there any idea that I could use to create an application which is as follows: For the GUI part, I want to have three picture control to display three graph, say, on the right hand side of the window. And for the openGL part, I want to display a 3D model (on the left hand side of the window) using the data from the three graph.
Any idea is really appreciated. Thank you.
|
|
|
|
|
It's very possible. Basically you just create your application like you would a normal windows app, then add an opengl window to it.
Check out this forum: http://www.codeproject.com/opengl[^]
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
For instance:
I want to implic the function :When i Rbuttondown the dialog,there is a pop-up menu.if the pop-up menu caption is "stretch",it can change to "shrink" when clicked.
Thx advance!
Where did the good times go?
Don't try it, just do it!
*Archibald*rever dragon!
|
|
|
|
|
In MFC you can use ModifyMenu (or SetMenuItemInfo for Win32 api):
ModifyMenu( MF_BYPOSITION, MF_STRING, indexOfYourMenuItem, "shrink" );
ModifyMenu( MF_BYCOMMAND, MF_STRING, ID_YOURMENUITEM, "shrink" );
See here for more info: http://msdn2.microsoft.com/en-us/library/89c2aa4b(VS.80).aspx[^]
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Does anyone know of some example code (C++) to enable extraction of keys from a PKCS12 file into memory. This will then be used to digitally sign an XML document etc...
|
|
|
|
|
Since dealing with PKCS involves using many of cryptographic promitives, you should look into some crypto libraries. OpenSSL has an application, PKCS12 (download their archive and look at apps/pkcs12.c) that deals with PKCS#12 storage.
Look here ("Parsing PKCS#12 files"):
http://www.drh-consultancy.demon.co.uk/pkcs12usg.html
On your place I'd retro-engineer the pkcs12.c to see how the command line in that section works.
Hope it helps,
- Dmitry.
-------------------------
Don't worry, be happy )
|
|
|
|
|
Thanks, very appreciated. I have downloaded the source and will investigate it.
|
|
|
|
|
Hello all,
I feel a little bit stupid by asking this, but I've run out of ideas...
I'm trying to register and use an OCX control.
The steps that I'm following are this ones:
1. from a DOS window: regsvr32 ocxname.ocx
2. Once I receive the message saying that the control has been registered I start the Visual C++6.
A)
3. PROJECT -> ADD TO PROJECT -> COMPONENTS AND CONTROLS -> REGISTERED ACTIVEX CONTROLS -> ocxname.ocx.
Once I click on the just registered OCX control, I receive the message:
---------------------------
Microsoft Visual C++
---------------------------
C:\krc\LIB\Cross.ocx
Unable to open this ActiveX Control. Make sure the control contains a valid type library.
---------------------------
OK
---------------------------
B)
3. Right click on the dialog I want to use that OCX, select insert activex control (and select the just registered OCX control).
This inserts an icon of the OCX in the dialog, and if I go to the class wizard I can see that the control ID has been added, but I cannot add a new variable for that OCX, if I try to add a new variable for that OCX, I get this message:
---------------------------
Microsoft Visual C++
---------------------------
The ActiveX Control "KUKA-Cross-OCX" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it.
---------------------------
OK Cancel
---------------------------
When I select OK, then this message appears:
---------------------------
Microsoft Visual C++
---------------------------
The ActiveX Control is not registered properly, or its type library version number is incorrect.
Try registering the control by removing and importing it in the Component Gallery.
---------------------------
OK
---------------------------
I'm lost, I don't know why do that ActiveX control don't want to get registered properly on my system. And moreover I cannot get support information from the manufacturer...
Could you give me any idea on that?
As always, thank you in advance.
|
|
|
|
|
Seems to be something wrong with the typelib.
Open the ocx-file with OLE/VIEW to verify that it contains a typelib.
If it does, have a look in the registry at the following:
Locate the ProgID of the ActiveX below HKCR to get hold of the CLSID.
Locate the CLSID below HKCR\CLSID. Below that key there should be a 'TypeLib' key with the GUID for the typelib as default value.
Locate that GUID below the HKCR\TypeLib path. Below it you should have at least one key that corresponds to the typelib version of the control. Below that key you should have at least one key that corresponds to the language used by the control, the LANGID where zero means "language neutral" and is usually the only one present. Below that key you should find a 'win32' key where the default value is the path to the file that contains the actual typelib, usually the ocx-file.
Verify that the file is present at the designated location. You could correct it if it's erroneous.
If the information above doesn't exist, try and deregister the control with "regsvr32 /u ocxname.ocx" and verify that all keys are deleted.
Register it again and verify that the keys are written.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Wow Roger!
That has been a complete answer!
Well I've tried that, I've opened the OLE Viewer and then I selected the first option in the menu in which you can view the type library. Then I've selected the ocxname.ocx control.
Once I've done that a messagebox appeared a couple of times telling me:
---------------------------
OLEViewer 2.0 Interface Viewers
---------------------------
Could not decompile selected item
<no system="" message="" defined=""> TYPE_E_CANTLOADLIBRARY ($80029C4A)
---------------------------
OK
---------------------------
Do you know if this is a problem? and if it is one, do you know if it has any solution?
Thank you in advance for your time and help.
|
|
|
|
|
It looks to me as if the ocx-file doesn't contain a typelib, or the file is corrupt.
Did you by any chance get other files with this ocx-file, like *.tlb or *.olb files?
If you didn't, it means that you don't have the typelib for the ActiveX control and you probably should contact the support department of the supplier.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I've found a .tlb file but it has not the same name of the ocx control.
Do you think that this can be a problem?
Can I import a TLB file?
Thank you in advance!
|
|
|
|
|
Joan Murt wrote: I've found a .tlb file but it has not the same name of the ocx control.
Open it with OLE/VIEW and have a look.
See if it could be the typelib for the ActiveX control.
What does it say? What's the name of it?
Is the ActiveX control part of a larger package?
Joan Murt wrote: Can I import a TLB file?
Absolutely.
But you'd better select the right one.
If you f.ex. choose to run office application through automation, you #import .tlb and .olb files.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I have a program that graphs data from a device on the fly. To update the graph every second I call the InvalidateRect function. When the program runs for a while (e.g 1 hour) it's fine, but when I run it over night and come back in the morning to check it, the whole computer monitor is white. I then minimize my program (when I scroll over the buttons on the taskbar they start to appear) and everything is back to normal. It seems the InvalidateRect function messes up my refresh rate or it some how invalidates the whole screen even though i specified a small rect on the window. Anyone know how I can solve this?
------------------------
Impossible is Nothing
|
|
|
|
|
Do you have a screen saver? ( even a screen blank) It can cause some refresh problem also.
Are you certain you do not have resource leaks or memory leaks ?
|
|
|
|
|
This may be a tall order.
Looking for a VC++ 6.0 MFC IDE template.
Something similar to Altium DXP.
I guess a combination of split view - with tree control in left pane ( inside tab control would be nice) and a tab control in right pane.
There are plenty of piece parts in CodeProject, but I have not seen a complete IDE application here.
Thanks for reading.
Vaclav
|
|
|
|
|
Use AppWizard to create your basic SDI application. In the CFrameWnd -derived class, add a CSplitterWnd member. In the frame's OnCreateClient() method, do something like:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
m_wndSplitter.CreateStatic(this, 1, 2);
m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftPaneView), CSize(70, 0), pContext);
m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRightPaneView), CSize(0, 0), pContext);
return CFrameWnd::OnCreateClient(lpcs, pContext);
} You'll then need to use ClassWizard to create two views, one for the left pane and one for the right pane.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all
hi all
how can i change the CMenu Font..
Thanks in advance
Vishal
|
|
|
|
|
|
Do you want to change font of a foreign application?
|
|
|
|
|
|
hi all
how can i change the CMenu Font.. ... i want to change the font of File , Edit .. etc .. and their submenuitems
Thanks in advance
Vishal
|
|
|
|
|
In a simple way, you cannot do it with CMenu as you'd do with CWnds. Instead, you should have custom drawn menu to define the way it is painting its items.
--
======
Arman
|
|
|
|
|
Hi
Vishal
u have to use LOGFONT and use typeface property of this.write this code in OnDraw() function.Ok....In which company ur working now.
Regards
At
at
|
|
|
|
|
Hi Atul
Thanks for the mail
Is it possible that u can elobrate ur hint a bit more with a code sample ???
Regards
Vishal
|
|
|
|