|
Add
#pragma once
to the top of datagrid.h
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Use preprossor if condition to check datagrid.h file included already or not.
mean you have to write the datagrid.h codes inside the #define directive.
Example..
#if !defined(DATAGRID_H__INCLUDED_)
#define DATAGRID_H__INCLUDED_
......
#endif // DATAGRID_H__INCLUDED_
regards
Vallikumar A
|
|
|
|
|
The #pragma once solved the error !
Thank you !
sdancer75
|
|
|
|
|
My application writes the avi-files using the VFW Windows API-calls.
But the problem I encounter now is the size limit of the avifile using VFW. I understand that using DirectShow instead of VFW solves this problem. But DirectShow is quite new to me.
Could anybody give me some hints how to use DirectShow for writing avifiles? (Using interfaces like IGraphBuilder?)
I am looking for a DirectShow-function that is a equivalent for AVIStreamWrite. At this function it is possible to present a data pointer. I have been looking in the DirectShow-documentation but I cannot find a function to which I can present a data pointer from a bitmap/frame.
|
|
|
|
|
Will directshow is different from VFW API
First it is com based, so no more flat API calls, just com objects
Second, DirectShow framework depends upon waht is called a Graph and Filters.
So I think what you need is to develop your own data stream filter (there is examples with directshow) and build a graph to capture from your stream filter to the avi file.
Data Stream Filter ----> VIDEO ENCODER Filter (if any) ---> AVI MUX Filter ---> File Writer Filter.
Hope this helps to figure out what reading you need in directshow to do your work
Hesham
|
|
|
|
|
I added the splash window component from the VC6 components in my application, usually, as far as I remember, this is really a simplistic procedure, and should not cause any problem at all.
but alas, things started to go wrong.
at some point, when the splash screen is visible, my application receives a message ( WM_SIZE ) and in the handler, I call AfxGetMainWnd and it returns a pointer to my splash screen CWnd instead of the real mainframe CWnd.
CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
in the debugger, pMainFrame is wrong, and shows as a CSplashWnd.
in MSDN, the AfxGetMainWnd documentation says this :
If AfxGetMainWnd is called from the application's primary thread, it returns the application's main window according to the above rules. If the function is called from a secondary thread in the application, the function returns the main window associated with the thread that made the call.
Would that be the case ? I don't have multiple thread, but the splash CWnd could be the secondary thread ?
Any idea ?
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
DOes your application's main window exist while the splash screen is visible, or does it get created after the splash screen goes away?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
the splash window is created at the end of my main frame OnCreate ; does not work either if it is done at the beginning.
I tried different things, and i seems to "work" if I SetFocus back to the main frame class as soon as the splash window is created.
but this hack doesn't look good to me, it might show something that is completly wrong with what I do with mainframes and other windows; I have a complex top level UI.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
ignore the resize event if the window is a splash screen.
-Prakash
|
|
|
|
|
but it's not the splash screen ( CWnd ) that receives the WM_SIZE, it's another CWnd, which is part of my UI.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi Friends
I am developing a dialog based MFC application in which I need to disable and enable all the sounds at certain time. I need to disable sound which comes when an IM receives instanant message from Yahoo and you get a sound, a sound of warning and all such sound should be disabled....
Is there any application which helps me do this ?
Or any idea ?
Mahesh
|
|
|
|
|
Are you wanting to mute all input devices? If so, this article might help.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I am using SQl SERVER 2000 as database, and visual c++ 6.0.
I want to write my sql server path in a variable and to access it in my program so to write the path.
secondly, i want to have in my program the name of my computer and user name.
How can I do it ?
I learn my self
-- modified at 9:32 Tuesday 17th January, 2006
|
|
|
|
|
Using environment variables is usually not a good idea. In any case, you can get them via the following registry keys:
HKEY_CURRENT_USER\Environment
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment
Also GetEnvironmentVariable() .
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I want to solve a problem that I have; my main problem is to execute my program outside my PC. As i use SQL SERVER 2000, I usually change manually in my program this variable :
dbinit.AddProperty(DBPROP_INIT_DATASOURCE,OLESTR("sem1");
"sem1" is the name of my sQl SERVER 2000 path.
Now I need to replace this path by a variable so that if I install my program any where, I will put the environnement variable and i my program I use it because the name of this variable must be the same.like :
dbinit.AddProperty(DBPROP_INIT_DATASOURCE,VARPATH);
VARPATH is an environnement variable.
How can I remplace "sem1" by an environnemnt variable ?
How to to do it
I learn my self
-- modified at 10:25 Tuesday 17th January, 2006
|
|
|
|
|
I'm not sure exactly what you are asking, but is SetEnvironmentVariable() of any help?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Help me to access this environnment variable in Visual c++ 6.0 please
|
|
|
|
|
Like David said:
Search the MSDN for GetEnvironmentVariable().
If you dont want to use it, look for Registry Access Methods and use the path he mentioned.
You also could use a higher-level file access which evaluates the "Command Line"-Variables and use that instead.
Or, if your app is merely a test and not productive, you could pass the name as a parameter (e.g. "myExe -server=sem1"). Using that approach, you could then write a batch file which gets the "-server="-parameter from an environment variable.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
|
With getenv it works well.
thanks
|
|
|
|
|
You can use 'GetComputerName' and 'GetUserName' to retrive name of computer and user name resp.
Set/GetEnvironmentVariable API should help you work with the environment variables.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
those variables are not known in Visual c++,
I have an error undeclared variable:
my sentence is :
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, getComputerName() );
I insert these libraries :
#include <stdlib.h>
#include <stdio.h>
but the error is there,
what to do ?
|
|
|
|
|
Hi, i have some troubles with a CListCtrl... I want to do a Report Clistctrl, like an exel, with 5 columns and unlimited rows. Well,my problem appears when i need to put 2 or more lines in one possition of the ClistCtrl, then my question is, is it possible? it means, can i put a paragraph with 60 characters in each line? or the only thing configurable is the colum width...
Thanks in advance, to see if somebody can remove to me from this doubt. If that cannot be done with the CListCtrl... what do you recommend to utilize?
Bye!
|
|
|
|
|
David_27 wrote: Hi, i have some troubles with a CListCtrl
don't we all ???
codito ergo sum
-- modified at 8:36 Tuesday 17th January, 2006
|
|
|
|
|