|
Hi,
My prob is like this...
1) I have a CMain wh is the parent of several propertysheets, eg CPptySheet1.
2) After pressing a button on CMain, a modal dialog box pops up, CModal.
3) I change some values using CModal and i want the changes to be reflected in PptySheet1.
4) I cannot use OnInitDialog coz the ppty sheets are initialized b4 CModal.
5) I have also tried using OnSetActive...and even OnShowWindow.....but it doesnt work. How can i dynamically show changes, if there are any, every time the property sheet is shown? Please advise...thanks!
|
|
|
|
|
Use Messages defined by oneself.
And SendMessage(...);
Hello World!
|
|
|
|
|
Erm...i'm nt too familiar with that...Could u elaborate? So do i need to specify where the message is sent to or where it is sent from etc? Thanks!
|
|
|
|
|
Hi,
I am using VC++ 6.0 to write a Win32 console app. Does anyone know how I can read all the file names in a directory if user specifies the directory for input file(s)?
Thanks a lot!
|
|
|
|
|
try doing...
_finddata_t fileinfo;
long hFile;
_chdir( --dirname-- );
if( (hFile = _findfirst( "*", &fileinfo )) == -1L )
--- no files in director ---
else
{
do
{
--- called per file ---
fileinfo.name contains the filname!
} while( _findnext( hFile, &fileinfo ) == 0 );
_findclose( hFile );
}
*¨¨`)
¸¸.·´ ¸.·*¨¨`)
(¸¸.·* ¸ .·*
¸¸.·*
(¸¸.~~> Joel Holdsworth.
|
|
|
|
|
Wow~! Thanks so much, guys!
Joel Holdsworth wrote:
_chdir( --dirname-- );
May I know what _chdir is? or what it means?
Is it part of the fileinfo structure?
Because I got an error msg for this.
thanks again.
|
|
|
|
|
hkl wrote:
May I know what _chdir is? or what it means?
It changes to the specified directory (i.e., CWD).
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
CFileFind finder;
BOOL bWorking = finder.FindFile("*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
cout << (LPCTSTR) finder.GetFileName() << endl;
}
|
|
|
|
|
Thanks. But CFileFind doesn't work in my case.
I am only writing a console app, not MFC.
(Or may be CFileFind can apply, but I don't know how.)
|
|
|
|
|
Try this:
HANDLE hFile;
WIN32_FIND_DATA wfd;
hFile = FindFirstFile("*.*", &wfd);
while ( FindNextFile(hFile, &wfd) != 0 )
{
if ( (strcmp(wfd.cFileName, "..") != 0 ) && (strcmp(wfd.cFileName, ".") != 0 )
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
}
FindClose(hFile)
|
|
|
|
|
|
hi
I want to spy all packets that my computer recieving from internet or network ,
are there any one help me and have a sample code ?
thanls alot
|
|
|
|
|
go to http://winpcap.polito.it for more details !
|
|
|
|
|
I have an app which start up another exe file at some point and what I am looking to do is have the newly opened program close down the program that started it. Is this possilbe to do without closing both programs? Win32 please.
|
|
|
|
|
|
I get this error for many different symbols and it says that they are already defined in func.obj
func.obj is a self contained file that does define these vars, but isn't used or call be the ones that the error is generated from.
So basically I have func.cpp that defines x then I have func1.cpp and it defines x. These are local to their files why would I get this error?
Thanks for the help
|
|
|
|
|
Because they're global in scope, the linker detects the duplicate symbol "x".
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
jimNLX wrote:
These are local to their files
but linker puts these files together
|
|
|
|
|
Make them static to force internal linkage.
eg:
-- func.cpp --
static int x; // internal linkage, global to func.cpp only
-- func1.cpp --
static int x; // internal linkage, global to func1.cpp only
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
&Hi,
How can i decode dtmf signals from telephone line? TAPI doesn't meet my requirements, there're circuits that decodes dtmf signals but i want to implement it on PC with software.
|
|
|
|
|
|
I recently reinstalled windows and Visual Studio 6. I almost forgot how fiddly it is to install all the SDK updates and all that. Now i finally managed to get it all i think but now when i try to compile any of my projects i get the following error:
c:\program files\microsoft visual studio\vc98\include\oleidl.h(5059) : fatal error C1021: invalid preprocessor command 'end'
Does anyone know how to fix this
Btw, the SDK update program installed the Windows 2003 server SDK and i'm running Windows 2000 professional (even though i don't think this has anything to do with it cause the include file is not in the updated SDK directory).
Kuniva
--------------------------------------------
|
|
|
|
|
You can probably just open up oleidl.h and replace #end with #endif, like maybe oleidl.h got corrupted somehow. Or if that solution worries you, just reinstall VC6 again.
Chris Richardson
|
|
|
|
|
Anyone know of a JAXB package that spits out C++? I'm looking for an alternative to manual development of C++ classes from an XML schema.
I've found one on SourceForge but it doesn't seem to be mature. I was wondering if anyone knew of an Apache or IBM/AlphaWorks C++ implementation.
Thanks!
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi, this is my first post on the forum, my name's Florian and I'm from Switzerland (where they make the cheese
Right now I'm beginning DDraw with c++ (where I'm still quite a beginner too), and I have started writing a DDraw class, a wrapper of a sort, to facilitate casual operations. One of the member functions is a function wich takes a LPDIRECTDRAWSURFACE7 as a parameter and should create a offscreen surface & point to it with the given LPDIRECTDRAWSURFACE7. But somehow it doesn't work, because when I check the pointer after having used the function, he's always invalid.
Here's the code:
<br />
<br />
ENUM_RESULT CDDraw::CreateOffscreen(int iWidth, int iHeight, bool bKey, LPDIRECTDRAWSURFACE7 lpSurface, int iMemFlags)<br />
{<br />
memset(&itsDdsd,0,sizeof(itsDdsd) );<br />
itsDdsd.dwSize = sizeof(itsDdsd);<br />
<br />
if(!bKey)<br />
itsDdsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;<br />
<br />
else<br />
{<br />
itsDdsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CKSRCBLT;<br />
<br />
itsDdsd.ddckCKSrcBlt.dwColorSpaceLowValue = itsTransColor;<br />
itsDdsd.ddckCKSrcBlt.dwColorSpaceHighValue = itsTransColor;<br />
}<br />
<br />
itsDdsd.dwWidth = iWidth;<br />
itsDdsd.dwHeight = iHeight;<br />
<br />
itsDdsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | iMemFlags;<br />
<br />
if(lpSurface)<br />
{<br />
lpSurface->Release();<br />
lpSurface = NULL;<br />
}<br />
<br />
if(FAILED(itsLpDD->CreateSurface(&itsDdsd, &lpSurface, NULL) ) )<br />
{<br />
return(VID_ERR_CREATEOFFSCREEN);<br />
}<br />
<br />
return(OK);<br />
}<br />
All the "its*" variables are class variables (of CDDraw), and I try to create the offscreen surface in another class, CMain, wich contains an instance of CDDraw ("itsVideo"), and a LP to a DD surface, "itsSprite". What I try to do looks like this:
<br />
itsVideo.SetColorKey(255,0,255);<br />
<br />
if ( (itsResult = itsVideo.CreateOffscreen( <br />
64,64,true,itsLpSprite) ) != OK)<br />
{ <br />
itsError.ShowMessage(itsWin.GetHwnd(), itsResult);<br />
}<br />
<br />
if(!itsLpSprite)<br />
{ <br />
itsError.ShowMessage(itsWin.GetHwnd(), itsResult);<br />
}<br />
And each time, I get an invalid surface...
Any advice/criticism (I'm sure there's alot to critic is welcome...
|
|
|
|