|
|
Thank you PJ.I'll read it very soon.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Hello everyone,
I want to display the controls on the view class which is not derived from CView.( The application is not using the Doc / View arch.)
Is there any way in which I can load the entire dialog template instead of calling the Create / CreateControl for each control that i want to display on the form?
thanks and regards
|
|
|
|
|
You want to display a view which is not derived from CView What are you trying to do, then? Could you please ellaborate?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Mangesh Sardesai wrote:
entire dialog template
How about CFormView?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Whats the difference b/w CreateThread and CreateProcess ???
Case1: Suppose in the main program I use the function CreateThread. When i close the main program, the thread associated with the main program automaticaly ends.
Case2: Suppose in the main program i use the function CreateProcess. A new process created ie an external exe may loaded in the memory. Now when the main program terminates, whether child process close with main program like that of threads in Case 1 or not?????
|
|
|
|
|
In Case2, "child" processes do not close when the main one does. Actually, there's no parent-child relationship among a process B created by A with CreateProcess , you can think of them as separate programs without any special dependency to each other.
Anyway, fifferences between threads and processes extend far beyond this issue.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I have created a simple ActiveX ATL project in VC++,
How do I add member variables in the Object. Its like
I want to store some information that can be accessed
from all my functions.
Thanx in advance
Sameer
|
|
|
|
|
You can add the variables directly to the class if you only want them to be used internally.
However if you want to be able to access these variables externally through a COM interface, the easiest way to add a variable is to go to your class view tab of your ATL activex component workspace. Then right click to get the context menu, and select Add member variable. After you fill at that form, the IDE will modify your IDL file and CPP files to add that variable to your class and COM interfaces.
Good Luck.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanx a lot.!!
I have one more Problem. I have Declared a Method as
method([in] LPSTR str, [out, retval] int *retvat)
and when i call this function through ASP, it gives the
error as
Automation Variable not supported.
Please help
|
|
|
|
|
You cannot use the LPSTR datatype if you want your COM objects to be portable outside of C++. You will need to use the BSTR datatype.
Here is a little bit of information about BSTRs.
They are UNICODE strings, so you will have to use the ATL conversion macros to convert between your ansi single character string and the wide char UNICODE string in ATL. Lookup A2W in MSDN and you will find some info about it.
A BSTR is special in the fact that it contains the size of the BSTR encoded in its format. When you deal with a BSTR you are given a pointer to the string portion of the BSTR. However, the 4 bytes preceding that pointer contain the size of the BSTR.
example:
pointer
|
size | string data wide chars
4 bytes V 12 bytes, as the size fild indicates
[12] [\0H\0e\0l\0l\0o\0\0]
You can also use the CComBSTR class in ATL to manage your BSTR variables for you, it simplifies things a lot.
You will also want to become familiar with the ::SysAllocString and ::SysFreeString functions. These are the functions that you will use to allocate a new BSTR.
good luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi,
Thanx for the reply.
Actually I want to pass a string as a paramter from my
ASP code (in the ACTIVEX-ATL component) and in the
component I am using the parameter as a string for
some purpose where I want a char * type
What should i do
Sameer
|
|
|
|
|
Hello All,
I am currently unable to print / print preview properly from my SDI application. I am using a class derived from CSplitterWnd to split my screen up into 4 windows. The left hand window may be switched between 3 different views. I can print when viewing my default view (defined in the document template), but when viewing either of my other views (all derived from CView), selecting Print from the menu does not do anything...
In which class should I define my printing events (i.e. OnBeginPrinting etc) so as to be able to print no matter which view is on display? Is there an easy solution to this?
Thanks in advance. Any help with this will be greatly appreciated
Steve
|
|
|
|
|
|
Thanks Jonathan. This is exactly what I was looking for. Great advice!
Steve
|
|
|
|
|
Hi, pals!
I want to add a shortcut of my program to the
toolbar of IE. Can you show me a simple sample
codes about how to do it?
Best regards,
George Ma
|
|
|
|
|
Enjoy.
http://www.codeproject.com/atl/ietoolbartutorial.asp
==============
www.design.kg
|
|
|
|
|
Thanks, Karavaev pal!
It is a nice article!
Have a nice day,
George Ma
|
|
|
|
|
how to send a virtual key in a service when the Winlogon desktop is the input desktop?
|
|
|
|
|
Hi.
I am trying to implement a basic static toolbar. Here is the design.
- create a dialog box
- add a button (just consider one button for now)
- use CDialogBar to create the dialogbar at construction
- use GetDlgItem(IDC_Button) to get a pointer to the button
Okay. The design above works well. I have two major problems. First, the button does not look like a normal button. The button looks flat and is out of focus. Secondly, I am not sure where to add the message handler for the button.
What I have done is difficult to explain. I hope the brief explanation above is enough. Here is a simple code for it.
-----
CDialogBar m_MyDlgBar;
CButton *m_pButton;
int CMainFrame::OnCreate()
{
...
if (!m_MyDlgBar.Create(this, IDD_MYDLG, CBRS_BOTTOM, IDD_MYDLG))
{
TRACE0("Panel creation failed");
return -1;
}
m_pButton = reinterpret_cast<cbutton *="">(m_MyDlgBar.GetDlgItem(IDC_BUTTON));
ShowControlBar(&m_MyDlgBar, TRUE, FALSE);
-----
So basically, I need to somehow set the button to look like a normal button. Secondly, I need to know where to add a message handler for the button.
Thanks,
Kuphryn
|
|
|
|
|
Okay. The solution is to update the button with ON_COMMAND_UPDATE.
Kuphryn
|
|
|
|
|
Does anyone know of a good freeware source code printing program. I use to have a great program, but have recently re-imaged my machine and can't remember the programs name. If anyone can recommend a good utility it would be most appreciated.
- SAK
|
|
|
|
|
http://sources.redhat.com/sourcenav
|
|
|
|
|
I have a few issues with this. I haven't changed anything from the standard File->Open message handler. My app crashes if I try to select File->Open without saving or performing some other file operation first. If I open a file, I can't say File->Open until after I have either closed the current file or saved it or something like that. I'm not sure why this is happening since I haven't touched any of that code. Does anyone have any thoughts about where I can look to try to figure this one out?
|
|
|
|
|
A little more info. It looks like I'm having a problem getting junk data in a lot of my variables in the app. for instance, the filename string being passed as "filename" to the DoPromptFileName procedure used to open the Open File dialog contains the maximum (260) possible number of characters in it. They are junk characters, though. What's weird is that the informaion is placed in the variable upon declaration of the variable. Any ideas. This is becoming a real issue for me.
|
|
|
|