|
LaHaHa wrote: I would like to know how to stop function recv and run it again?
any specific reason for doing same!
|
|
|
|
|
hi
Im developing a application for color calibrator using eye-one but i dont have a sdk with me
does anyone of you have one... I already wrote to gretagmacbeth through there website but dont have any replies from them yet...
thanks in advance...
|
|
|
|
|
Hi all,
I would like to set transparency to IE pages using VC++. I searched for information regarding this. I could not find any. If anyone knows about it. can you please help me in this.
Thanks in advance.
Regards,
Ram
|
|
|
|
|
|
I have a dialog bar in which i have placed several bitmaps as static controls and using them as buttons to activate different Child Frames.
I want to change the bitmap as i click on the button so as to show which child is activated...
I am using the following code in the message handeler...
<code>
void CTabDialogBar::OnDLInstructions()
{
CMainFrame* pMainWnd = (CMainFrame*)AfxGetMainWnd();
pMainWnd->TToolTab(2);
HBITMAP m_hBitmap = LoadBitmap(NULL,MAKEINTRESOURCE(IDB_InstructionsD));
if (m_hBitmap == NULL)
{
MessageBox("Error loading bitmap");
return;
}
m_button_instruct.SetBitmap(m_hBitmap);
}
</code>
But its not working the bitmap is'nt changing and it gives an error at runtime. Please help me in the problem.......
Keyur Bhatnagar
|
|
|
|
|
What do you mean by "I want to change the bitmap as i click on the button so as to show which child is activated" ?
redindian
|
|
|
|
|
dharani wrote: What do you mean by "I want to change the bitmap as i click on the button so as to show which child is activated" ?
As i click on the bitmaps i am using this message to activate a MDI child. Now what i want is that the bitmap which i have clicked should change to a different one specified my me.
|
|
|
|
|
|
WhiteSky wrote: What errors?
I am not getting any compilation errors but error at runtime(Dialog) which says Debug assertion failiure!
File: afxwin2.inl
line:472
Tell me if u can help
|
|
|
|
|
So, use your debugger. You know what line caused the problem. Look at that line, read what it says, look in the debugger's watch window to see what the values of the variables are. Then open the call stack, go down the stack until you get to your own code. Look at the variables in your code at the line supplied to you by the call stack. One of those variables will have an invalid value that you can figure out by looking again in the watch window.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Is there any otherway of doing this i.e not using CStatic????
I am not able to solve the problem.
Keyur Bhatnagar
|
|
|
|
|
Yes, there are lots of ways to do this. But CStatic is the easist way. Did you try to use the debugger? If you had you would quickly figure out that your bitmap handle is invalid. You are running into a variable scope issue.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Its a runtime error so I guess maybe On your program you have an invalid pointer or a null handler.
|
|
|
|
|
Tell me sm other way to do this like can i draw the bitmap using OnPaint???
|
|
|
|
|
if you want to show images with WM_PAINT you can use of CImage class its easy for example:
<br />
CImage m_Image;<br />
m_Image.Load(yourfile);<br />
Now on WM_PAINT you can use of
Image.BitBlt(dc.m_hDC,0,0,640,480,0,0,SRCCOPY);
with these codes you can show your image.
|
|
|
|
|
Dear All.,
I need a help from you all about IPADDRESS control.
How can i use IPADDRESS control ?
IPADDRESS usage Article ?
Thanks.
|
|
|
|
|
|
if i use task scheduler service which is allready provided by microsoft than i have to execute a exeternal exe so my application will be depand on another exe.
but i want to execute a callback function at scheduled time if it is possible with task scheduler than please tell me.
if not than I think, i have to implement own task scheduler.
also i am looking for other windows service which works like task scheduler.
i want source code of that service so with the help of this service i can build own task scheduler.
if any body have idea for the same please share with me.
thanks & regards
bankey
|
|
|
|
|
Do you need to ITaskScheduler ?
|
|
|
|
|
thanks for quick reply
my problem :
suppose i have started my application but at scheduled time(i.e daily,weekly etc) i have to execute some code snippet example a function from my application which is i allready started.
is it possible ITaskScheduler if yes please tell me how can i do this?
thanks
bankey
|
|
|
|
|
For first question see Using the Task Scheduler[^] and for second question
<br />
HRESULT hr;<br />
ITaskScheduler *pITask;<br />
hr = CoInitialize(NULL);<br />
<br />
hr = CoCreateInstance(CLSID_CTaskScheduler,<br />
NULL,<br />
CLSCTX_INPROC_SERVER,<br />
IID_ITaskScheduler,<br />
(void **) &pITask);<br />
...<br />
...<br />
|
|
|
|
|
thanks for your observation on my problem.
i am using task scheduler as you are saying but here problem is that i have to use another executable but i want to execute a function.
i am trying to explain you as follows:
at no.5 the statement
hr = pITask->SetApplicationName ( T2COLE( (LPCTSTR) m_sProgramPath ));
here value of "m_sProgramPath " is c:/abc.exe
is there any method from i can call a function(e.g callback function ) "not another executable "which execute at scheduled time.
please help if you have any idea about the same.
HRESULT hr;
ITaskScheduler *pITask;
hr = CoInitialize(NULL);
1. hr = ::CoCreateInstance (
CLSID_CTaskScheduler,
NULL,
CLSCTX_INPROC_SERVER,
IID_ITaskScheduler,
(void **) &pISched );
2.hr = pISched->Activate ( T2COLE ( szTaskName ), IID_ITask, &pIUnk );
3.hr = pISched->NewWorkItem ( T2COLE ( szTaskName ), CLSID_CTask,
IID_ITask, &pIUnk );
4.hr = pIUnk->QueryInterface ( IID_ITask, (void **) &pITask );
5.hr = pITask->SetApplicationName ( T2COLE( (LPCTSTR) m_sProgramPath ));
6.hr = pITask->SetAccountInformation ( T2COLE( (LPCTSTR) m_sAccount),
T2COLE( (LPCTSTR) m_sPassword) );
7.hr = pITask->CreateTrigger ( &wTrigNumber, &pITaskTrig );
8.hr = pITaskTrig->SetTrigger ( &rTrigger );
9.hr = pITask->QueryInterface ( IID_IPersistFile, (void **) &pIFile );
10.hr = pIFile->Save ( NULL, FALSE );
thanks & regards
bankey
|
|
|
|
|
you use of hr = pITask->SetApplicationName ( T2COLE( (LPCTSTR) m_sProgramPath )); instead you can use
<br />
LPCWSTR m_sProgramPath = L"C:\\Windows\\notepad.exe";<br />
hr = pITask->SetApplicationName(m_sProgramPath );<br /> and...
--------- ------------- ----------
For call a function instead a program I dont know
|
|
|
|
|
thanks for your observation
but i have to prepare own scheduler program because i do not want to depand on other executable.
thanks & regards
bankey.
|
|
|
|
|