|
Use one of the templates in Visual Studio, it contains all the framework code for the SDI client. You just need to add the actual display part, in the child window's OnPaint() [^] function.
Use the best guess
|
|
|
|
|
I have VisualC++ Ver 5. I have been using it for close to 20 years. I know it's old but so am I.
My problem is that my version of VC++ crashes frequently when used on a WinXP computer.
But on a Win2K computer it runs for hours before crashing.
Is there something I should know about running VC++ on a WinXP computer?
Bob Macklin
Seattle, Wa.
|
|
|
|
|
You can force App/UI compatibility back to Windows 95.
Create a shortcut to the VC 5 exe or IDE, and right click on the shortcut then click the compatibility tab.
I used to have problems with Photoshop 5.
|
|
|
|
|
Thanks,
I have done this to two computers running WinXP. I'll see if it works better.
Bob Macklin
Seattle, Wa
|
|
|
|
|
I know that we're all very reluctant to forego something we're really used to, but you have to upgrade to newer compilers and IDEs.
They have amazing features and you will be able to get much more out of it with relative ease.
Give it a shot!!!
|
|
|
|
|
I'm 80 years old and living on Social Security.
I was a member of the group the built the first PC (8080/Z80) running CP/M in 1974.
Bob Macklin
Seattle, Wa
|
|
|
|
|
macklinbob wrote: I was a member of the group the built the first PC (8080/Z80) running CP/M in
1974.
Wow!!! And I was born 1972.
macklinbob wrote: I'm 80 years old and living on Social Security.
I understand how the upgrades can be difficult, but the truth is that as you move to newer Windows OSs, certain softwares may be incompatible.
So you would either need to upgrade the software or use the older OS.
|
|
|
|
|
You could always use Windows 2000 running inside VirtualPC. And upgrade.
|
|
|
|
|
Sometimes we have no choice but to user older tools.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi,
I am working on a project in which I am using DirectShow for Capturing and Displaying Videos.
It works fine for Windows XP and Windows 7, but when I try to play the same video on Windows 8, its output gets corrupted. It doesn't display the actual videos colors, instead the color turns into Grey for the whole video. I tried to update DirectShow for Windows 8, checked in the code also, but all in vein....Still the same issue.
I am trying to play a file of .wmv format. Issue persists for other formats also.
Do I need any missing codec in Windows 8 or any other solution for this problem.?
How it could be possible that a video displays fine for Windows XP, and 7 but not for Windows 8.
Anybody have any idea regarding this.?
Any help will be appreciated.
Regards,
Mbatra
modified 22-May-13 8:35am.
|
|
|
|
|
mbatra31 wrote: How it could be possible that a video displays fine for Windows XP, and 7 but not for Windows 8.
For a start they removed DVD playback capability. But the 'other' codecs maybe missing as well, so you might have to get the Media Center Pack which is $10. (was free for a while to upgraders of XP/Win 7)
|
|
|
|
|
I am building my first real DLL. I am using DirectShow “Base Classes” library to build a custom DirectShow filter based on sample code from DirectShow SDK.However, this is not DirectShow question.
I managed to build VC 6.0 DLL, however, the problem is that it builds “External Dependencies” - in this case basetsd.h taken from the original VC6.0 installation which is now hopelessly inadequate for this application.
My basic question to the gurus here – what exactly is “External Dependencies” as used in MFC DLL (VC6.0) wizard? Is is similar to “additional include / library links? So far I cannot see it in command line.
Any help would be greatly appreciated and if such thing exists in later MS IDE please let me know and I'll look for it there. But from my recent experience I am reluctant to download any VS after 6.0!
Cheers Vaclav
Addendum:
Here is MSDN 2001 definition:
Note The External Dependencies folder lists files that are not part of the project but that are needed to build the project. You can add a file to the project by simply dragging it from the External Dependencies folder to any of the project folders, or to any top-level project node.
So, it means that "standard" "include" path is used to load the OLD "basetsd.h".
I guess I'll modify the original basetsd.h to make things fly.
-- modified 19-May-13 13:49pm.
|
|
|
|
|
External dependencies in a project are normally header files that are not part of your project, but defined as part of the OS or some library.
This is different from external DLL dependencies.
For example, take the example of STL.
You could be using one of its header like algorithm .
This is an external dependency for your project.
The algorithm header internally includes several other headers recursively like xmemory , xutility , new , limits , cstdlib , exception etc.
So all these headers become external dependencies for the project.
Similarly, DirectX has its own dependencies.
Modifying an external dependency is not a good idea because one such file may be dependent on many others.
So you either upgrade to a later compiler or write all routines from scratch (Which is also not a good idea).
Also, VC 6.0 is outdated. Newer compilers are much better in terms of the error checking capabilities and the optimized output it generates.
|
|
|
|
|
OK. so it is somewhat related to preprocessor #include. Just noticed that VS 2010 expanded the External dependencies on the same project where VC 6.0 had only one “external dependencies “ header.
Great, but still would like to know here is it coming from – it cannot be “automatic”, perhaps derived from additional library references as you said?
For example I have been having a heck of a time finding which version of a header file is actually included due to several SDK's I am using. Now each included header in question has #pragma message identifying the file being compiled.
I just do not trust any “defaults” or “automatic” stuff when it comes to compiler.
When stuff like that goes wrong it is a bear to troubleshot when one does not have a clue where it is coming from.
Cheers
Vaclav
|
|
|
|
|
getting linking error for a class which implements IMPLEMENT_RUNTIMECLASS_T macro.
|
|
|
|
|
Well unfortunately, we cannot see your screen, so have no idea what the error or its solution might be.
Use the best guess
|
|
|
|
|
- I've created a CPngButton from CBitmapButton.
- It overrides DrawItem() and draws the given PNG image using GDI+.
- The wm_erasebkgnd and wm_ctlcolor is taken care.
- while displaing the CMainFrame its displaying properly.
- Later if we resize the window couple of times, the transparent portions of button becomes black.
- OS is Windows 7 with Aero enabled.
- Screenshot is here[^]
- Any idea what I'm missing here?
(Some more information: The buttons are hosted on a CWnd as container. This CWnd is placed over left of menubar to looks like a quick access toolbar, which is a requirement).
Best Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
hi all,
I am using
static char alphabet[] =
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789";
static int alphabet_size = sizeof(alphabet) - 1;
CString str_val=_T("");
void brute_impl(char * str, int index, int max_depth)
{
int i;
for (i = 0; i < alphabet_size; ++i)
{
str[index] = alphabet[i];
if (index == max_depth - 1)
{
str_val.Format("%s", str);
}
else
{
brute_impl(str, index + 1, max_depth);
}
}
}
void brute_sequential(int max_len)
{
char * buf = new char[max_len + 1];
int i=0;
while(buf[i] != NULL)
{
if(i==max_len+1)
break;
buf[i]='\0';
i++;
}
CString str=_T("");
str.Format("size of array is %d\n", i);
for (i = 1; i <= max_len; ++i)
{
memset(buf, 0, max_len + 1);
brute_impl(buf, 0, i);
}
free(buf);
}
but its time consuming and very slow
anybody have more efficient and fast method for this.
thanks.
|
|
|
|
|
Use a passwords list; you can find them freely on the web.
|
|
|
|
|
hi guys recently i started to work with open gl in dev c++ 4.9.9.2. I downloaded the glut package and all the dlls and object files. After installing it i tried a sample program. But i got lot of linker errors and it didnt run eventhough my syntax was correct. Anybody please help
|
|
|
|
|
adding only header (*.h) is not enough. You have to also add proper lib or cpp to your program in order to linker could see definitions of functions you are using in your program.
To add lib, see the linker options, there has to be some place to include additional libraries.
|
|
|
|
|
Hello,
I've just started to programm in C++, using Builder C++. I need to stablish comunication via internet between two computers. I've succed using the ClientSocket Component and the ClientServer but only if the computers are in a local network but not if the computers are in different networks. Here is my code for the server:
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm1::BAbrirClick(TObject *Sender)
{
ServerSocket1->Port=StrToInt(Npuerto->Text);
ServerSocket1->Open();
BAbrir->Enabled=false;
BCerrar->Enabled=true;
BEstado->SimpleText="Servidor Conectado!";
NOnline->Text=IntToStr(ServerSocket1->Socket->ActiveConnections);
BEnviar->Enabled = true;
}
void __fastcall TForm1::BCerrarClick(TObject *Sender)
{
ServerSocket1->Close();
BAbrir->Enabled=true;
BCerrar->Enabled=false;
BEstado->SimpleText="Servidor Cerrado!";
NOnline->Text=IntToStr(ServerSocket1->Socket->ActiveConnections);
BEnviar->Enabled = false;
}
void __fastcall TForm1::ServerSocket1ClientConnect(TObject *Sender,
TCustomWinSocket *Socket)
{
BEstado->SimpleText="Conectado desde "+Socket->RemoteAddress;
NOnline->Text=IntToStr(ServerSocket1->Socket->ActiveConnections);
}
void __fastcall TForm1::ServerSocket1ClientDisconnect(TObject *Sender,
TCustomWinSocket *Socket)
{
NOnline->Text=IntToStr(ServerSocket1->Socket->ActiveConnections-1);
BEstado->SimpleText="Desconectado de "+Socket->RemoteAddress;
}
void __fastcall TForm1::ServerSocket1ClientRead(TObject *Sender,
TCustomWinSocket *Socket)
{
char * buffer;
int len;
AnsiString Mensaje;
int i;
int *tam;
tam = new int;
*tam = Socket->ReceiveLength();
len=Socket->ReceiveBuf(buffer,*tam);
buffer[len]=0;
TTime hora = TTime::CurrentTime();
AnsiString MensajeIn = Socket->RemoteAddress;
MensajeIn += " A las " + TimeToStr(hora) + " Dice" "----->";
ChatBox->Lines->Add(MensajeIn +StrPas(buffer));
BEstado->SimpleText=IntToStr(len)+"Nuevo mensaje entrante!";
Mensaje = StrPas(buffer);
strcpy(buffer,Mensaje.c_str());
for(i=0;i<ServerSocket1->Socket->ActiveConnections;i++)
ServerSocket1->Socket->Connections[i]->SendBuf(buffer,strlen(buffer));
delete[] buffer;
}
void __fastcall TForm1::BEnviarClick(TObject *Sender)
{
char buffer[256];
int i;
AnsiString Mensaje = CampoMensaje->Text;
strcpy(buffer,Mensaje.c_str());
for(i=0;i<ServerSocket1->Socket->ActiveConnections;i++)
ServerSocket1->Socket->Connections[i]->SendBuf(buffer,strlen(buffer));
TTime hora = TTime::CurrentTime();
ChatBox->Lines->Add("Servidor a las " +TimeToStr(hora)
+ " dice----->" + Mensaje);
}
void __fastcall TForm1::LimpiarClick(TObject *Sender)
{
ChatBox->Clear();
}
void __fastcall TForm1::CampoMensajeKeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if (Key == 13)
TForm1::BEnviarClick(CampoMensaje);
}
void __fastcall TForm1::NpuertoKeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if (Key == 13)
TForm1::BAbrirClick(Npuerto);
}
void __fastcall TForm1::TcpServer1Accept(TObject *Sender,
TCustomIpClient *ClientSocket)
{
TcpServer1->RemotePort = StrToInt(Npuerto->Text);
TcpServer1->Open();
BAbrir->Enabled=false;
BCerrar->Enabled=true;
BEstado->SimpleText="Servidor Conectado!";
NOnline->Text=IntToStr(ServerSocket1->Socket->ActiveConnections);
BEnviar->Enabled = true;
}
void __fastcall TForm1::TcpServer1CreateHandle(TObject *Sender)
{
NOnline->Text=IntToStr(TcpServer1->Active-1);
BEstado->SimpleText="Desconectado de "+TcpServer1->LocalHostName();
}
How can I implement comunication (a simple chat is enough) between the two computers?
|
|
|
|
|
It is exactly the same, you just need to configure your firewalls to allow access between the two systems.
Use the best guess
|
|
|
|
|
AntonioJesus wrote: computers are in different networks
Hola Senor - I think anyone reading this would need to know how your network was set up and what exactely you mean by 'different networks' .. for example, you could mean in two different subnets/zones, or talking over the internet
In both cases, its likely your code doesnt need any change, but your networks may need routes, firewall rules etc
'g'
|
|
|
|
|
With different Newtworks I mean over the internet. Both computers are conected to internet via wi-fi both running windows.
|
|
|
|