|
You'd certainly need to restart DevStudio, but I'm not sure that either of these will work. Just a hunch.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Try adding .cc to :
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Is there any algorithm for comparing two filenames and determining the likelyhood of them being similar?
Something more complex then checking length and seeing how many characters are different in each?
Can I use regex to execute a slightly more than trivial comparison?
How do I print my voice mail?
|
|
|
|
|
You could use the Soundex[^] algorithm to check if the filenames sound similar.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I remember seeing this in FoxPro? Oracle? Cant be sure. But it is a useful thing! Thank you for the link !
Bikram Singh
I believe we should all pay our tax with a smile. I tried - but they wanted cash.
|
|
|
|
|
oh wicked that's cool
Thanks
How do I print my voice mail?
|
|
|
|
|
while( true )
{
cout<<"Send: ";
cin>>szBuffer;
send( client, szBuffer, sizeof(szBuffer), 0 );
if( strcmpi(szBuffer,"exit") == 0 ) break;
}
if szBuffer is something like "Hello world"
then the server recieves the string in two parts
the first being "Hello" and the second being "world"
so i think you get my point, it seems to be breaking the data by spaces and sending each word
it may be appending the space too, (havnt tested)
now i want it to send "Hello world" all at once instead of by each word, i thought about replacing the spaces with something else, but i dont really want to do that
anyone know what i can to do to solve this?
|
|
|
|
|
Take a look at the WSARecvEx routine - it will tell you if the received message is a partial message.
Steve
|
|
|
|
|
Look at the line
send( client, szBuffer, sizeof(szBuffer), 0 );
I presume szBuffer is comething like LPTSTR , LPSTR , TCHAR * or char * , in which case, the sizeof operator will return the size of the pointer, not the buffer. You need to pass in the size of the buffer, or use strlen (may be vulnerable to buffer overflows).
--
Andrew.
|
|
|
|
|
actually, szBuffer is defined as
TCHAR szBuffer[512];
notice its not defined as a pointer,
im not stupid, if it were defined as a pointer then
sizeof(szBuffer) would return 4
but since its not a pointer it should return 512
how did you get that line to show up with a tan background?
i have tried [code]somecode[/code] before it doesnt seem to work
|
|
|
|
|
> im not stupid,
Are you sure? TCHAR szBuffer[512] makes szBuffer a pointer, without a subscript it is synonymous to saying &szBuffer[0]...
Being rude won't get you any help in these forums. Hope that was useful.
--
Andrew.
|
|
|
|
|
»Archer282« wrote:
how did you get that line to show up with a tan background?
i have tried [code]somecode[/code] before it doesnt seem to work
»Archer282« wrote:
im not stupid
How do you reconcile these two comments ?
Code blocks are easy, if you have the ability to read ( hint: check the formatting links below if you can't work it out for yourself ).
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
remember this:
send(client,szBuffer,strlen(szBuffer),0); // so use strlen when sending
recv(server,szBuffer,sizeof(szBuffer),0); // so use sizeof when receiving
gabby
|
|
|
|
|
I have problem with drawing PNG with alpha channel using DrawImage. It works fine if I draw on screen but when I am using off-screen buffer all pixels which are transparent are drawn in black. Strange thing is that if I insert another DrawImage before this first everything starts working again. Apparently this additional DrawImage changes state of Graphics object. I dumped CompositingMode, CompositingQuality, SmoothingMode and etc before and after this magical DrawImage but all values are the same before and after this first call to DrawImage.
Does anybody know what is changed in Graphics object when DrawImage is called?
Regards,
Damian
|
|
|
|
|
Damian2 wrote:
It works fine if I draw on screen but when I am using off-screen buffer all pixels which are transparent are drawn in black
Probably because the memory bitmap you are drawing to is all black before anything is drawn, but the screen is white. Do a FillRectangle with a white brush before calling DrawImage.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
I clear this off-screen buffer with Graphics.Clear on the beginning. This is not the reason
|
|
|
|
|
Ok, then post your code here. How are you allocating your memory buffer? How are you loading your image file?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Reading all the articles about hooks I've found out how to monitor keyboard input but is there a way to disable key combinations on this level of interception? For example when windows is hooked by my program and user presses Shift+Insert I wouldn't like the text to be inserted from the clipboard but do some other actions. And vice versa how can I emulate different key combinations presses?
|
|
|
|
|
As you said that it is possible using keyboard hooks (as you said there are lots of artciles on codeproject)... I think I have disabled the ctrl+alt+del in one my applications and instead of restarting it was calling my About Dialog...
Well... I am a beginner ...
|
|
|
|
|
Use GetAsyncKeyState API to determine whether Shift or Control buttons were pressed.
|
|
|
|
|
Once I have created a dialog using DoModal() is it possible at runtime to make it a modeless dialog after a button has been pressed???
Thanks
How do I print my voice mail?
|
|
|
|
|
How about instead always creating a modeless dialog and calling its behaveAsModal() method to make it behave as a modal/modeless dialog?
void CMyDialog::behaveAsModal
(bool bModal)
{
GetParent()->EnableWindow (!bModal);
} Remember to call behaveAsModal (false); when the user dismisses the dialog, otherwise there will be no way to transfer control back to the parent dialog.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
it's for a shell extension so I imagine the parent is the desktop...
Would that be a good idea still do you think?
How do I print my voice mail?
|
|
|
|
|
Ah. Then you probably don't want to use a modal dialog (unless you intentionally require it to be system modal).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i m trying to program a parallel port and i just want to ask inport and outport functions are in which library
|
|
|
|