|
kirk he wrote:
Baris, thank you, you are my hero of today.
That reminds me of a MCSP advertisement in my ex-company saying "How does it feel to save the world everyday?"
Glad to help.
|
|
|
|
|
The background: I have some ascii files in my project for use with custom build.
They all have the same file tag (*.PMC)
These files have specific formatting, so I want have VC++ (6) recognise them, and
use keyword colouring, auto indent etc. MSDN implies that you can do this (they give
a custom html (*.hlx) example) but it doesn't work.
Has anyone succeeded in this? What steps did you follow that I may have missed?
I can work without it, but I'm lazy and like to get my IDE to do the work for me!
Iain.
|
|
|
|
|
I have seen a few of Tree/list Ctrl combinations, but all of them are showing tree in the first column of the list, and the parameters of nodes in the rest columns.
I need to write <b>Ctrl that would show tree nodes in columns of the list</b>( nodes of the same level in the same column).
Has anybody solution or some guidlines how to do that?
Please, don't forget that parent nodes has to make column span if the grid is shown
I think that somthing similar I have seen on some web pages but i can't find if now ;(
<b><big>Any help would be appreciated !!!!!! thx!</big></b>
Preky
|
|
|
|
|
write your own control ! much work but full satisfaction !
//be cool
I am the mighty keeper of the book on knowledge . Contact me to get your copy .
|
|
|
|
|
Yes I'm going to do that
Any suggestion where to start from? What kind of base class to use, or just do I have to start from CWnd ?
Anyone?!??!
Every suggestion is welcome!
Preky
|
|
|
|
|
hi,
Is it possible to clear the contents of the debug window programatically?.
thanx
viraj
|
|
|
|
|
Does anyone know how to use IAMVideoAccelerator or where to find a sample ?
Thanks a lot
Olivier
|
|
|
|
|
dear all,
i'm facing a very wierd problem in the following code (only SDK, No MFC)
int i= GetPrivateProfileString("Paths", "InputFile", " " ,inp,MAXCHARS, IniPath);
i get the following error ->
C:\Documents and Settings\rishabhs\Desktop\Source\source\window_click\window_click.c(123) : error C2143: syntax error : missing ';' before 'type'
now when i use following code, every thoing is fine ->
int i;
i = GetPrivateProfileString("Paths", "InputFile", " " ,inp,MAXCHARS, IniPath);
i've no clue whatsoever regarding this problem
any ideas!!!!!!!!
regards
|
|
|
|
|
There is a subtle difference between the two statements. The first is an initialization. The second is an assignement. Maybe you are receiving an error because the compiler is refusing to initialize an int with a DWORD ? Note that the assignement is legal due to built-in type conversions.
|
|
|
|
|
Hi ,
I am trying to set the WS_EX_LAYERED and WS_EX_TRANSPARENT
for child window( using WS_CHILD ), but am unable to do so.
Can someone tell me how can it achived.
Thanks,
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
1) ModifyStyleEx(NULL, WS_EX_TRANSPARENT );
or you can just call SetWindowPos directly....
Use Spy++ to verify styles.
|
|
|
|
|
Thanks a lots,
Works cool
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
any body know
Is it neccessary to make Psuedo Header to send TCP Packet.
Can I send the packet without it.
Can I use
SOCKET s = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
directly
instead of SOCKET s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
Plz help me and tell me the way i can do without it because the packet is not been sent on to the network using Psuedo Header.
Reply me soon
|
|
|
|
|
If you dont want the TCP headers then create a datagram socket (SOCK_DGRAM, protocol 0) and then you can manage everything yourself. From memory, the SOCK_RAW is only available to privileged programs (although this may not apply in a windows environment)
|
|
|
|
|
I want to use the TCP headers but the tcp packet is not going on to the network.
Plz if you can help me in sending the TCP packet.
Any website,code for sending the TCP packet.
Reply me soon
|
|
|
|
|
If you set up the socket correctly then the TCP headers will always appear on the network, you dont need to create pseudo ones or even know they are there. I always use this:
int handle = socket (AF_INET, SOCK_STREAM, 0);
|
|
|
|
|
this code works if compiled with VS6, but gives wrong results with VC++.NET
int Y,U,V,R,G,B;
Y = lYUVColor.rgbRed;
U = lYUVColor.rgbGreen - 128;
V = lYUVColor.rgbBlue - 128;
R = (int)(Y + 1.403 * V);
G = (int)(Y - 0.344 * U - 0.714 * V);
B = (int)(Y + 1.770 * U);
replaceing the declaration of Y, everything is ok.
int U,V,R,G,B;
float Y = lYUVColor.rgbRed;
U = lYUVColor.rgbGreen - 128;
V = lYUVColor.rgbBlue - 128;
R = (int)(Y + 1.403 * V);
G = (int)(Y - 0.344 * U - 0.714 * V);
B = (int)(Y + 1.770 * U);
where is the bug? in the compiler or in the code?
|
|
|
|
|
Hi,,
I think the problem is in the code
Y + 1.403 * V<br />
Y - 0.344 * U - 0.714 * V<br />
Y + 1.770 * U (do you write a jpeg decoder/encoder?)
you use U (an int) and Y (an int) so te hole equation uses ints which means loss of accuracy (int truncates what comes after the period)
so when you use Y (float) the compiler does not truncate them...
|
|
|
|
|
hspc wrote:
do you write a jpeg decoder/encoder?
it's for CxImage
you'are right, but 1.403 is not an integer, so the * operator should give a floating point result, while in this case the result seems an integer.
in fact, another way to fix the problem is writing the constants with the "f" suffix: 1.403f and the routine works
|
|
|
|
|
Does any one knows where can i find the details / help about the API interface of VSS. ??
Any sample programs, tutorials etc. ??
I looked into MSDN and found only 1 page of documentation
I want to devlop an Addin which listens to the events of VSS(client / server) and performs some actions.
Please help.
thanks and regards.
- Vikram
|
|
|
|
|
|
Hi,
I insert a string table in my dll resource eidtor, and then export a fuction from this dll. in that function one of string IDs in the string table is showed by a Messagebox. The problem is: this message box shows nothing.
the following is my code:
Inside DLL
<br />
#include "Resource.h"<br />
<br />
__declspec(dllexport) void LoadMaya();
void LoadMaya()<br />
{<br />
CString strMaya;<br />
<br />
strMaya.LoadString(IDS_MAYA);<br />
AfxMessageBox(strMaya);<br />
<br />
}
Inside EXE
#include "..\MyDll\Maya.h"<br />
<br />
void CDllExeDlg::OnOK() <br />
{<br />
LoadMaya();<br />
<br />
CDialog::OnOK();<br />
}
<br />
Inside String Table
ID Value Caption
------------------------------------
IDS_MAYA 100 Maya Culture
Please single out the bug for me, thank you
Extreme programming. Do the No.1
|
|
|
|
|
Try:
void LoadMaya()
{
CString strMaya;
HINSTANCE hsav= AfxGetResourceHandle();
AfxSetResourceHandle(theApp.m_hInstance);
strMaya.LoadString(IDS_MAYA);
AfxMessageBox(strMaya);
AfxSetResourceHandle(hsav);
}
rechi
|
|
|
|
|
I have a problem with windows Medai Format SDK API .Iam trying to find if a ASF file is valis file or not .
IWMReader *m_pReader;
WCHAR wszFullUrl[ MAX_PATH ];
/*..create reader*******
.............
........*/
Here this represents a callback object
hr = m_pReader->Open(wszFullUrl , this, NULL );
if ( SUCCEEDED( hr ) )
{
//WaitForSingleObject( m_hOpenEvent, INFINITE );
_tprintf( _T( "successfull to open (hr=0x%08x)\n"), hr );
hr = m_hrOpen;
}
if ( NS_E_NO_STREAM == hr )
{
_tprintf( _T( "Waiting for transmission to begin...\n") );
//WaitForSingleObject( m_hOpenEvent, INFINITE );
hr = m_hrOpen;
}
if ( FAILED( hr ) )
{
_tprintf( _T( "failed to open (hr=0x%08x)\n"), hr );
return( hr );
}
When a give a invalid file name ,it gives the following output
successfull to open (hr=0x00000000)
failed to open (hr=0x80070002)
WHy does it give both the error messages ??Can somebody help me on this ??
|
|
|
|
|
Hi All,
I am trying to use a gradient control in my mfc app. And for that I downloaded the code from this website
http://www.codeproject.com/miscctrl/gradientprogressctrl.asp
I am using the GradientProgressCtrl.cpp class to implement in my mfc program. NOw one question is, since I am using the vertical control, how am I supposed to show the filling from BOTTOM TO TOP. The sample code shows the filling from top to bottom. I have looked into the code but nothing happened .
MY xyz.cpp uses it in the foll way where m_progbar is the instantiation of GradientProgressCtrl class. m_progbar is declared in xyz.h file.
m_Progbar.ShowPercent(TRUE);
m_Progbar.SetStep(20);
m_Progbar.StepIt();
My problem is that, after completion of 100 in the bar ctrl. I have to restart the app as filling of the bar stops after it completes the filling of the control.
I have triied lookin in the code but no use
Can you please help me with this.??
Thank a lot!!!
|
|
|
|