|
|
Hello,
I'm working with boost::wave and I need to set all macro definitions for the project (like _WIN32, _DEBUG etc )
How can I get ALL macros defined for project?
|
|
|
|
|
I hav a dataset object which i would like to link to an access file upon verification of input from user. Can someone Please help me on this. TKS in advance...
|
|
|
|
|
how to open the exe after a particular time?
JAYARAJ
|
|
|
|
|
set a timer and in that timer use function
ShellExecute
or
CreateProcess
nave
|
|
|
|
|
There are a few ways to do that.
1- Keep the main window hidden until the time to show. Using the Timer.
2- Keep another small application running (hidden) to run the main program. (using timer, or thread, etc).
3- Install a service that runs a thread, which checks the system time after certain Sleep() intervals. (Could create problems, while reading the registry etc).
4- Use some form of the task scheduler.
5- Some other way.
this is this.
|
|
|
|
|
Khan++ wrote
"5- Some other way"
Like that, I would use this method
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
Phil.Benson wrote: Like that, I would use this method
Which Method
|
|
|
|
|
hai friends,
i have got a problem with multi-line editbox control.i want to display some of the lines in a multiline editbox with a different color.so how to change the color of the text in an editbox?
sathish
|
|
|
|
|
this might be possible if u r using richedit contol. In that case u can change the color using the functions
SetDefaultCharFormat and SetSelectionCharFormat
nave
|
|
|
|
|
I can compile my C++ MMC app non-unicode with no errors.
If I make it unicode I get one linker error:
uafxcwd.lib(afxinl2.obj) : error LNK2005: "public: __thiscall
AFX_MAINTAIN_STATE2::~AFX_MAINTAIN_STATE2(void)"
(??1AFX_MAINTAIN_STATE2@@QAE@XZ) already defined in mmc.lib(apimfc.obj)
The release version links correctly, but not the debug version.
Any ideas?
simwall
|
|
|
|
|
Hi
Is Gdiplus Image considers each image as color image when creating or taking from another Bitmap. If not why it is increasing the size of the image? Please help me.
Thanks
|
|
|
|
|
I have a client application that works fine provided that the user hits the connect/disconnect button. If the connection gets severed, my application will detect this and notify the user and allow them to reconnect by hitting the connect/disconnect button.
I have a requirement to have my application reconnect automatically, which will be used on an un-manned test later on.
I have one class that inherits from CAsyncSocket and a class for the dialog that contains the GUI/data that needs to be sent to the server. I have been trying to use this code:
int error = pSocket->Send( (char*)&CServerMsg, sizeof( CServerMsg));
if(error == SOCKET_ERROR )
{
m_pMainApp = ::AfxGetApp();
CMainDlg* dlg;
dlg = (CMainDlg *) m_pMainApp->GetMainWnd();
dlg->m_ConnectButton.SetCheck(TRUE);
dlg->OnConnectButton();
}
but I keep getting an error that causes my app to die. I stepped through and it dies on the socket Create() method in my OnConnectButton, which is the same method I call when the user hits the connect button. It then throws me to the method
void* CMapPtrToPtr::GetValueAt(void* key) const
When I do a GetLastError(), I get the error code 10038 which says I am performing a socket operation on a non-socket.
The strange thing is that the send works perfectly fine if the server doesn't go down and I am connected to the server the entire time.
Please help, this has been driving me crazy for 3 days! Thanks!
|
|
|
|
|
I think the error would come depending on how you are calling the Send method. Do you use a thread, or a timer etc?
My suggestion would be to call the function using PostMessage(...). Like:
PostMessage(WM_COMMAND,MAKEWPARAM(IDC_BUTTON1,0),0);
(If it is sent from the dialog's thread.)
Where the code for Send is written in the Button1's press event.
this is this.
|
|
|
|
|
Two suggestions:
- create a socket only once and call Close();Connect() in your OnConnectButton() method. I am using my own network class, but I think to remember that am instance of CAsyncSocket needs to be closed before it can be reopened again.
- consider making your reconnect logic timer driven, e.g. allow only delayed reconnects and set a top limit for number of reconnects per hour. Best is to work out a reconnect policy, something like reconnect only if the server was at least identified once in current session, etc. This will prevent harming the network with reconnects going berzerk.
Hope it helps.
|
|
|
|
|
I have added a picture control in my dialog. While moving mouse over the picture I want to change the control style to "ModalFrame". In Classwizard I could see only WM_CLICK message for this control. So I want ot know, How to enable mouse move message handling function for the picture control?
Vel
|
|
|
|
|
To receive notifications static controls must have the style...
SS_NOTIFY
Change the ID of the static control from IDC_STATIC to something else.
Nibu thomas
Software Developer
|
|
|
|
|
Hi
Is Gdiplus image will take any image as color image. Please help me.
thanks in advance
|
|
|
|
|
Hello all,
I have a LogIn Form which should close and destroy itself upon verification of password and username.
How can I link the text inputed to be verified from an Access file?.
Also,I want the logIn form to be closed and load a diferent Form (Not CDialog form). Any help is highly appreciated. Tks
---------------------------------------------------------
new to Visual C++, bt we gonna make it catch-a-fi-er
|
|
|
|
|
My friend was going through an interview the other day, and he came up with a interview question: find at lease 8 problems out of the following code snippet.
#define max (1*1024*1024)
int main()
{
char *f;
char tmp[max];
int i,j;
f = "In the second season, the show's writers introduce numerous new storylines for";
for(i=0;i<=max;i++)
{
if(f[i]='\n')
{
tmp[j++]=f[i];
tmp[j]=0;
printf(tmp);
j=0;
}
else
{
tmp[j++]=f[i];
}
}
return 0;
}
when I trying to debug, I was confronted with "stack overflow" initially, I wonder what's wrong with 'f'
all the comments are my answers, but it doesn't anywhere near to 8 problems, so what do you think where the other problems lie and why.
-- modified at 9:16 Tuesday 14th March, 2006
|
|
|
|
|
1. Should be char *f = "In the second season, the show\'s writers introduce numerous new storylines for"; . Initialize f immediately.
2. Note the escaped single quote in the string constant.
3. The for statement is commented out. The statements inside the braces are executed once.
4. for(i=0;i<=max;i++) will overflow the bounds of the tmp string.
5. for(i=0;i<=max;i++) may overflow the bounds of the f string. Would be better to use
i = 0;
while (f[i]) {
6. if(f='\n') : assignment within an if condition.
7. tmp[j++] : j is never initialized.
Software Zen: delete this;
|
|
|
|
|
Gary R. Wheeler wrote: The for statement is commented out. The statements inside the braces are executed once.
really ?
~RaGE();
|
|
|
|
|
He's updated the post. The original one had the for statement commented out.
Software Zen: delete this;
|
|
|
|
|
LiYS wrote: f = "In the second season, the show's writers introduce numerous new storylines for";
better use a strcpy in this case, such an assignment cannot work.
~RaGE();
|
|
|
|
|
Actually, it does. f is defined as char *f , so assigning a constant string is perfectly valid. strcpy(f,...) would work only if you had allocated memory to f previously in the code.
Software Zen: delete this;
|
|
|
|