|
hi all,
could anyone tell me the character and the use of "static member function" in a class? i found that AfxBeginThread() need to pass only a static function in the new thread? any reason for that?
thanks,
jim
|
|
|
|
|
We had an interesting dicussion on this a while back - type 'casting thread' into the keyword filter box to locate.
This should be in the FAQ
|
|
|
|
|
hi Tim,
i can't locate and message with 'casting thread'... could you check this out for me?
regards,
jim
|
|
|
|
|
I think its here
Basically, member functions have an extra param tacked on - the this pointer - which means they can't match the callback's signature - static members don't have this problem, but can't access non-static member vars - the other thread has the whole story, and more!
|
|
|
|
|
I am using Dundas HyperView Studio ActiveX forms in an application. The forms work very well except for one problem I have encountered which is causing my customers (and me) quite a headache.
Just for reference: The application is an MFC MDI application using StingRay Objective Toolkit and Dundas HyperView studio together. I am using VC 6.0 Enterprise edition w/SP 5. The problem occurs on Win95, 98 and 2000. I have not tested it on NT or ME.
I have a a document which has a split frame with 2 sections (top and bottom). On the top frame I have a view in which I create (at run-time) a tab control. Each tab on this control corresponds to a different modeless dialog which is created on-demand. Presently there are 3 tabs. 2 are simple VC dialog resources displayed as modeless dialogs. The 3rd is a VC resource modeless dialog with a Dundas HyperView form created on it.
Everthing works fine except if the hyperview form is displayed and the user minimizes the app or ALT+TABs out, the user cannot ALT+TAB back or simply click the icon on the task bar. The only way to get back is to R-Click on the task bar and choose "Restore". This only happens with the hyperview forms, not the other modeless dialogs displayed.
If anyone has any experience with this problem, please respond.
Thanks in advance.
|
|
|
|
|
I am attempting to nest a CPrintDialog on another dialog window. Although I have been able to do this already for CFileDialog, it seems that something needs to be done differently for the print. Has anyone nested the CPrintDialog and can anyone provide sample code? Thanks.
-Andrew
|
|
|
|
|
From the MSDN:
"For all common dialog boxes except the Explorer-style Open and Save As dialog boxes, you modify the default template to create a custom template that replaces the default template. The custom template defines the type and position of the standard controls as well as any additional controls."
You can find the default template in the file PRNSETUP.DLG located in your vc\include directory.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I'm writing a custom AppWizard and have some problems customizing the projects that it generates. How do I add lib files to the linker settings? I guess I should override CCustomAppWiz::CustomizeProject() and manipulate the IBuildProject* parameter, but I can't find a good explanation on how to do this. Any ideas?
--------------
"Fabricati Diem, Pvnk"
|
|
|
|
|
I want to store my data in an xml file and have operations of file
new,open and save.I am coding in vc++ and not using CObject class which takes care of these default.How can I achieve this?
Thanks in advance.
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
Yeah, I know you guys get this one a lot, I've seen them...
But I have another instance of a program running fine in debug and crashing in release.
I have set up a configuration that basically mimics as many settings of "release" as possible, but allows me to go through in debug mode and trace code. Ok, here we go:
I have a dialog app.
The main dialog (we'll call it Dialog A) that opens has a button on it that results in opening Dialog B. Upon clicking this button I get an error of:
"The instruction at '0x004229dd' referenced memory at '0x00000401'. The memory could not be 'read'."
So I traced it. It occurs AFTER the DialogB::OnInitDialog() call.
This is a screenshot of the debug window showing where it 'died'
ftp://cabadam.homeip.net/sshot.jpg
I am unable to determine why it crashed, maybe one of you guys could help me out.
Thanks!
Adam
cabadam@houston.rr.com
|
|
|
|
|
m_pCtrlSite contais bogus value. Looks like you're overwriting it somewhere. Do you have access to diagnostic tools like BoundsChecker or Purify?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi All:
I´ve an aplication and I want to pass data between VC++ and VB, in this direction. How could I do it? Thanks
|
|
|
|
|
What kind of data and how much?
You could create a Simple object with the ATL app wizard, VB could create the object and the C++ app could pass its data via the object's properties.
Michael
|
|
|
|
|
I need pass strings asyncronous. Cuold you give me more details abuot it?
Thanks.
|
|
|
|
|
So when the string gets updated in your VC app you want VB to be notifed and pass the new string?
If this is what you want, you need to define a COM interface in your VC app and make uses of the Implements functionality of VB. The VC app then calls the VB implementation of the interface when it needs to notify VB of a change.
How much COM have you done before? The following articles will probably explain things better than I can
http://msdn.microsoft.com/library/default.asp?URL=/library/welcome/dsmsdn/drgui102599.htm
http://www.codeproject.com/com/connectionpoints1.asp
http://www.codeproject.com/com/connectionpoints2.asp
Hope this helps
Michael
|
|
|
|
|
I didn't understand ...
It means, for example if i create the ActiveX by MFC ActiveX, may be my control don't run in other programming language ?!!! (For example in VB ?)
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi,
You can use BSTR I think I saw an article on this technique in MSDN.
Good luck,
Dror
|
|
|
|
|
I want to pass data from VC++ application to VB GUI. For VB comunication to VC++ I have created a dispinterface with COM but now I need to create a dual interface with COM and I know how to do it? Thanks.
|
|
|
|
|
I want to be able to control printing to some print queues by
manipulating the spooler files directly. There are two files in a print
job: The .SPL file (which is the actual print job) and the .SHD file
(Shadow file). The .SHD file is the header file with all information about
the print job (User/Name/size/etc...).
Does anyone know what the file format for the .SHD file is? Or can
anyone point me to a location to look for the file structure definition?
Grtx,
Berry
|
|
|
|
|
Hello. I am a VC++ novice. Now I need to save a screen capture bitmap into a JPEG file. How can I do it? If you can post the source code, it will be very grateful. Thanx
Kidd
|
|
|
|
|
GDI+ does it with ease, CodeGuru has classes to do it, and paintlib ( www.paintlib.de ) also does it for a variety of formats.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Oh, Thank you so much. I surfed the website and found paintlib can realize the transformation. If I want the pure source code but not the DLL and library, where should I refer to? Thanx.
|
|
|
|
|
Paintlib comes with all the source code and also compiles linked in so you don't need to carry a dll. The actual source comes from the jpeg group and is a different library in the pintlib project. This is the same jpeg source everyone uses, AFAIK. The link is in the paintlib links page to just get that code.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hello, Christian
It is said the lib can transform the 8-bit and 24-bit bitmap file to jpeg file. But it seems only 8-bit is supported. So many features lost. Thank you. And can I save a bitmap in the memory but not a file to jpeg file? Thanx.
|
|
|
|
|
This is not so - I save 24 bit JPEG's all the time using my program, which uses Paintlib.
Yes, use the JPegEncoder class to save an image from memory, but it needs first to be a CBmp derived format, like CDIBSection ( which can be created from a HBITMAP )
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|