|
Hello Every body,
I had developed an application of attendenceManagement, where Payslip is generated at every 30th of month and that should be sent to each employee mail address, so how can i save a payslip and forward to every empolyee.
Help me.
Sundeep
|
|
|
|
|
Wrong forum, try here, C#[^]
|
|
|
|
|
Oh an C#.Net question on the C++ forum?;)
|
|
|
|
|
Hello
If I want to perform a web based installation like what Symantec anti virus provides for installing updates, what are the things we have to take into consideration. I am new to web based development and unaware of the various factors to be considered during web based development. Is it possible in VC++ ?
Thanx.
|
|
|
|
|
How to write partial scanline to other TIFF file?
|
|
|
|
|
The Tiff file consist of tags and to insert the scan line the 256 and 257 tag should be added to tiff file which denotes the acutal scanline width and hight, and other tags attributes should be filled appropriately.
Its better to insert these tags and scan line data at end, if it is inserted in between then we end up shifting the details of each tag by that offset
I hope this will help in finding the right solutions.
Regards
Sunil Tonger
|
|
|
|
|
Hi all. Im having trouble finding a simple example of CloseHandle. Does anyone know of a place where i can see a simple code using this function? Thanx in advance!
|
|
|
|
|
Please refer http://msdn2.microsoft.com/en-us/library/ms724211.aspx[^].
For example,
HANDLE hFile;<br />
<br />
hFile = CreateFile(<br />
lpFileName,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile
);<br />
<br />
::CloseHandle(m_hFile);
|
|
|
|
|
How could you have difficulty ? Did you try google, MSDN, etc ?
Here is a very basic example:
HANDLE myHandle = CreateMutex();
...
if(!CloseHandle(myHandle))
{
}
regards,
|
|
|
|
|
Could someone help me in linking two projects..
I have two projects namely common and iolib...the project common has to access some of the header files in iolib and vice versa.I am using vc++ 2003. I added two projects in under the solution container..I changed the project dependency settings too..but when i build the solution I get errors like
fatal error C1083: Cannot open include file: 'common/EnumsStructsUnions.h': No such file or directory
How do I link two projects so that both the projects can access the header files of each others..
Thanks in advance
|
|
|
|
|
You just need to get the path right. Perhaps something like
#include "..\common\Enums....h"
|
|
|
|
|
I tried that also but still iam getting the error...
fatal error C1083: Cannot open include file: '../common/Constants.h': No such file or directory
|
|
|
|
|
What is the relative path from the file that has the #include to the file you want to include?
|
|
|
|
|
Relative path in the sense..I am not clear with your question..but I can sense something that your aksing for the path information..I am just posting the error msgs which I am getting when building the two projects i.e common and ioLib combinedly..
c:\Documents and Settings\Vijayalakshmi\Desktop\ioLib\ioLib\ModelFileIO.cpp(3) : fatal error C1083: Cannot open include file: 'common/Exception.h': No such file or directory
c:\Documents and Settings\Vijayalakshmi\Desktop\RBF\RBF\common\Model.h(7) : fatal error C1083: Cannot open include file: 'ioLib/NmFileIO.h': No such file or directory
|
|
|
|
|
valli_guru wrote: c:\Documents and Settings\Vijayalakshmi\Desktop\ioLib\ioLib\ModelFileIO.cpp(3) : fatal error C1083: Cannot open include file: 'common/Exception.h': No such file or directory
This is the path the compiler is looking for but it does not exist
c:\Documents and Settings\Vijayalakshmi\Desktop\ioLib\ioLib\common\Exception.h
if Exception.h is in this folder
valli_guru wrote:
c:\Documents and Settings\Vijayalakshmi\Desktop\RBF\RBF\common\
Then the #include in ModelFileIO.cpp should be
#include "..\..\RBF\RBF\common\Exception.h"
You should be able to figure out the other one
|
|
|
|
|
Yes, Its working now..thanks ..thanks a lot...
|
|
|
|
|
valli_guru wrote: thanks a lot
You are welcome. Does it link correctly?
|
|
|
|
|
Yes, it does...It is linking perfectly... Thanks
|
|
|
|
|
hi, i've been posting posts asking around questions regarding multithreading, and however my multithreading code never worked, so i'm thinking some other approach.
The problem i having is:
I need to create a MFC dialog with bunch of slider controls, the position of each slider will be stored into a data array.
So if i have 20 sliders, i'll have a array of 20 elements storing the postion of each slider. the data of the array will be transfered to a hardware and outputted.
I want this output to be continuous and can be changed real time. so if changed a slider position and output will be changed correspondingly.
i created a worker thread.
the thread function is:
UINT Start(...){
while(//some condition){
....
GetData();//this is the function store the position into data array
OutputData(Data)//output through hardware
}}
GetData(){
for(int i=0,i<20,i++){
Data[i]=Slider[i].GetPos()
}
there's a problem with this approach which is that my worker thread implicitly query the GUI object which is slider through GetData() function, which cause my program to enter a deadlock and the thread can't be terminated properly.
If I put the Getdata() in the main dialog thread, i could use the CEvent to create some communication between the thread, however, that would require me a loop since the data has to be continously output.
I haven't try this method yet, but i'm afraid the loop will cause the program to freeze.
I have another idea which doesn't involve the GetData()
CMYDlg::OnCustomDrawSlider1(.....){
SuspendThread(...);
Data[0]=Slider[0].GetPos();
ResumeThread(...);
}
CMYDlg::OnCustomDrawSlider2(.....){
SuspendThread(...);
Data[1]=Slider[1].GetPos();
ResumeThread(...);
}
then in the thread function, there's no more GetData() and no accessing GUI object which should be safe, however, i'm not sure the effect of SuspendThread()and ResumeThread() on my worker thread, what if the OutputData() is running and the thread is suspended??
I know this is a long post and thx for the patience for reading it.
Could anyone give me some suggestions on my approach to this program?
|
|
|
|
|
alberthyc wrote: If I put the Getdata() in the main dialog thread,...
I think that is the right way.
To communicate between the thread and the main dialog you can send some messages:
You can send the messages using PostMessage((WM_USER+10??), Param)
You can catch they override PreTranslateMessage or DefWindowProc , and:
DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
if(message==(WM_USER+10??)){
... do something
return TRUE;
}
Russell
|
|
|
|
|
Should you wait until the user has finished moving the slider control before sending out its position? If so, respond to the TBN_ENDDRAG notification.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
I am new with DirectX and I need to get access to a joystick.
So I have written the following code, but I am getting an error when I try to SetCooperativeLevel the return is E_HANDLE. I have checked the sample code and I am doing everything the same, and yet I am getting these error. Can anyone tell me why. I have attached the code:
HRESULT hr;<br />
if ( FAILED( hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**) &di, NULL ) ) ) {<br />
return hr;<br />
}<br />
<br />
<br />
if ( FAILED( hr = di->EnumDevices( DI8DEVCLASS_GAMECTRL, enumCallback, this, DIEDFL_ATTACHEDONLY ) ) ) {<br />
return ;<br />
}<br />
<br />
if ( joystick == NULL ) {<br />
return ;<br />
}<br />
if ( FAILED( hr = joystick->SetDataFormat( &c_dfDIJoystick2 ) ) ) {<br />
return ;<br />
}<br />
<br />
if ( FAILED( hr = joystick->SetCooperativeLevel( this->GetSafeHwnd(), DISCL_EXCLUSIVE | DISCL_FOREGROUND ) ) ) {<br />
int test = 0;
return ;<br />
}
|
|
|
|
|
E_HANDLE
"The HWND parameter is not a valid top-level window that belongs to the process"
What window are you calling this from?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I created a SDI application in MFC and passed in a viewclass's hwnd.
Is this not correct.
Thanks for the help
|
|
|
|
|
It should be a top-level window. The main frame window should work.
One way to get it is AfxGetApp()->GetMainWnd()->GetSafeHwnd()
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|