|
You might also try adding the following line to the InitInstance in your application:
AfxGetModuleState()->m_dwVersion = 0x0601;
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hi all.
Can I write code that works in Win32 and dont works in Service?
|
|
|
|
|
Can you explain more and provide some details on exactly what you want to achieve?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi.
In my service I use 'CopyFile', 'CreateFile' and some more function that worke
with files and if I try copy, rename or delete some file, My service stoped.
Sow I wont to konw why?
|
|
|
|
|
david bagaturia wrote: In my service I use 'CopyFile', 'CreateFile' and some more function that worke with files and if I try copy, rename or delete some file, My service stoped.
Have you handled the exceptions properly, especially during file handling?
Absence is to love what wind is to fire; it extinguishes the small, it enkindles the great - Comte Debussy-Rabutin
|
|
|
|
|
Yes I have.
But . . .
Sometimes I can copy file, sometimes can't . . .
Sometimes Service works, but max 5 sec.
and sometimes it stops after 1 sec.
But my Service Manager tell me that service is runing.
I write Win32 project and paste thare my code [I use Sellect all ---> copy--> paste] and thare it works. I run this progrum 3 day and Rezult wos 100% but in service rezult is 0%.
Can help?
|
|
|
|
|
Does your service create a log? Have you tried analysing the log for possible causes?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
I have made menu using staictext control and convert all static text into Hyperlink.
through the following code.
<br />
hwndLnkSignUp = GetDlgItem(hDlg,IDC_STATIC_SIGNUP);<br />
ConvertStaticToHyperlink(hwndLnkSignUp);<br />
Now ,I want replace the existing font of static text with my custom
fonts and style also want to make it transparent.
-- modified at 5:51 Monday 5th March, 2007
|
|
|
|
|
Hello,
I wnat to create my own child windows without document - view architecture.But I am facing problems in understanding fundamental theory relating CMDIFrameWnd, CMDIChildWnd and CView.Is there any article that can explain me the relations and how to go about it.
Prithaa
|
|
|
|
|
I made it in this way :
I derive my own Frame from CMDIChildWnd.
At the construction of this Frame i create the Initial-View with the function "CreateView"
So you don't want to use the Templates?
I also don't use the templates, but i have many troubles. Because if you don't
use the standard-MFC-Way you need to manage yourself all functionalities
( for example that the focus rests on the control if you switch to another application, ... )
So, i'm not really the best to explain you these things.
But if i can help you, i will do my best
|
|
|
|
|
Thanks
For your help
But is there any article that can help
Prithaa
|
|
|
|
|
I started with this arcticle.
My Frame-Class is based (nearby the same) on this example.
http://www.codeproject.com/docview/nodoc_views.asp
I hope it helps you.
|
|
|
|
|
Thanks,
I went through the article. it was good.
Thanks once again
Prithaa
|
|
|
|
|
Hai..
I am developing VC++ application to write data to a pen drive.
Can any one help me how to proceed for it...
I want to move data of any type or complete folders into the pendrive without the help of driver..
Sample code may be more helpful..
Thanks in advance
Regards
vijay
|
|
|
|
|
when pen drive is connected to your system it is recongnized as a regular drive. So i think you can use standard api(for example CopyFile etc ) for writing data.
If u can Dream... U can do it
|
|
|
|
|
Thanks...
But there is no driver in my PC..
That too data should be sent through USB port...
I hope u got me..
Regards
vijay
|
|
|
|
|
Are you working in embedded domain ?
Without any driver (USB ) i think it is not possible, u need to check the usb standards and write a simple driver..
If u can Dream... U can do it
|
|
|
|
|
Hi
i run into this code.. :
void CVidTestDlg::OnCapture()
{
CString Filter;
CString Filename;
CRect Rect;
Filter = "Bitmap Files (*.bmp)|*.bmp|AVI Files (*.avi)|*.avi||";
CFileDialog FileDlg(FALSE, "BMP", NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
Filter,
this);
if (FileDlg.DoModal() == IDOK)
{
RedrawWindow();
Filename = FileDlg.GetPathName();
Capture(m_VFWImageProc, Filename);
m_VideoDisplay.GetWindowRect(Rect);
ScreenToClient(Rect);
m_VFWImageProc.EnablePreviewVideo(*this, Rect.TopLeft().x,Rect.TopLeft().y);
}
}
BOOL Capture(CVFWImageProcessor &ImageProc, LPCTSTR Filename)
{
ULONG Length = 0;
CFile File;
BOOL Ret = FALSE;
CHAR Ext[_MAX_EXT];
_splitpath(Filename,NULL,NULL,NULL,Ext);
if (stricmp(Ext,".avi") == 0)
{
Ret = ImageProc.CaptureAVI(Filename,4.0,10,10);
}
else if (stricmp(Ext,".bmp") == 0)
{
BITMAPINFO *Bitmap = NULL;
BITMAPFILEHEADER bfh;
ImageProc.CaptureDIB(&Bitmap,0,&Length);
if (Bitmap)
{
File.Open(Filename,CFile::modeCreate |
CFile::modeWrite |
CFile::shareDenyNone |
CFile::typeBinary);
bfh.bfType = 0x4d42; // 0x42 = "B" 0x4d = "M"
bfh.bfSize = (DWORD) Length + sizeof(BITMAPFILEHEADER);
bfh.bfOffBits = (DWORD) sizeof(BITMAPFILEHEADER) +
sizeof(BITMAPINFOHEADER) +
Bitmap->bmiHeader.biClrUsed * sizeof (RGBQUAD);
bfh.bfReserved1 = 0;
bfh.bfReserved2 = 0;
File.Write(&bfh,sizeof(bfh));
File.Write(Bitmap,Length);
File.Close();
Ret = TRUE;
delete Bitmap;
}
this is the code that is resposible for capturing a image from usb webcam and saving to hard driver
Function : CaptureDIB
Arguments : Bitmap (output) - Pointer to bitmap to receive image.
If *Bitmap = NULL, then allocation will
be performed automatically.
BitmapLength (input) - Size of Bitmap if *Bitmap is not NULL.
RetBitmapLength (output) - Actual size of image.
Return : TRUE Success, FALSE Failed.
Description: Captures a DIB image from video capture device.
As you see he uses some structs BITMAPINFO BITMAPFILEHEADER wihich togheter is the bitmap file. and writes it down to file.
now my problem...
i must make a dll wich exports symbols and a function within it , lets call it Capture that will return a bitmap (whole bitmap including header)
but i dont know how to copy the both struct within a buffer or something and return it.
can someone help. does someone get me..
sorry for bad explanation . i`m not champion at c++
|
|
|
|
|
Can I download a file (like DirectX SDK) in chunks using CInternetSession/CHttpFile ? I built a program that downloads a whole file using CInternetSession/CHttpFile, but I can't do that whith huge files in just one session in dial-up connection. When I use CHttpFile::Seek(), the method returns immediately, but the subsequent CHttpFile::Read() takes as much time as reading from the beggining of the file. If not, is there another way to do it programmatically ?
|
|
|
|
|
if (GetAsyncKeyState(VK_XBUTTON1){
getasynckey doesn't disable the VK_
lets say, if i want xbutton1 to do something, it does, but will work simultaneously with the real mouse4 function, wich is backing pages in internet explorer
what could i do? thanks
|
|
|
|
|
tulio ribeiro wrote: if (GetAsyncKeyState(VK_XBUTTON1){
getasynckey doesn't disable the VK_
It is not supposed to be.
Can you explain, what you want to achieve.
|
|
|
|
|
i want to, like, anulate the key, not just get the state, and don't know how i should do
|
|
|
|
|
Can you explain a little clearer ? I really, cant understand, what you are trying to say.
|
|
|
|
|
the mouse4 works together with the mouse1
like, mouse4 will be hold, but i dont want that windows detect the mouse4 being hold, i just want mouse1 clicks, you know? thanks
|
|
|
|
|
Can you elobarate , what this mouse1 and mouse4 are ?
|
|
|
|