|
Thanks,
Could you tell me how to add "script" tag? I try IHtmldocement2::createElement, but it doesn't work?
Thanks
Benben
|
|
|
|
|
Hi!
What does &255 do?
I have microseconds in 6 integers, and will place them in a 3 byte unsigned char[3] = {1, 2, 3};
I'm trying to use &255, but it doesn't work so well.
Can someone help me with my problem?
|
|
|
|
|
It's the bitwise AND operator, which in this case, is ANDing with the value 255.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi! I'm new to programming in VC+++, maybe someone here could help me out.Im using an 'InvalidateRect' in my application's 'OnIdle' message handler and it is returning an error.
here is the code :
InvalidateRect( hwnd, NULL, TRUE);
and the error:
hwnd : undeclared identifier
hwnd seems to be a pointer to the main window? do I have to define it?
|
|
|
|
|
mortishroom wrote:
hwnd seems to be a pointer to the main window?
Probably a window handle, rather than a pointer.
mortishroom wrote:
do I have to define it?
Not to pacify the compiler, but it must be declared. At runtime, it must be defined with a valid value.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Are you using MFC or win32, The api that you are calling is of win32.
For win32 api you need to have a valid window handle to send the notification to.
if you are using MFC then first parameter is not required.
In win32 you can use IsWindow(HWND) api to check wheather the hWnd is valid or not.
Since you say you are biggener, You should check in ur code wheather you are creating any window, if so are you storing the pointer somewhere else.
In Windows, The ui are targeted for certain function or api using the windows handle.
Simple speaking you need a valide windows handle to call the above api.
Hope i clear ur problem.
"Fear not of those who can kill the body and not the soul, rather fear Him who can kill both body and soul" - Bible
Prakash,
India.
|
|
|
|
|
Mr.Prakash wrote:
Are you using MFC or win32, The api that you are calling is of win32.
Im using MFC w/the vc++ mfc app wizard.
passing it NULL instead ov hWind worked just fine.
thank you.
|
|
|
|
|
Strange, dont know how it works, I need to go back to books to understand that.
Is it really working the way you are expecting it??
If you dont mind try replaying the NULL with m_hWnd its a predifined window handle in MFC.
"Fear not of those who can kill the body and not the soul, rather fear Him who can kill both body and soul" - Bible
Prakash,
India.
|
|
|
|
|
'm_hWnd' gives me an undeclared identifier error.
Null is working exactly how i expected; and my code refreshes the screen at 90 million mph, causing everything to flicker uncontrollably.
I geuss the next thing i need to learn is about 'frame rate'.
|
|
|
|
|
1. If you pass InvalidateRect(NULL, rect) , it invalidates all application windows. So I don't wonder, that it flickers.
2. Where are you calling the InvalidateRect from? Generally, in MFC you must retrieve a pointer to redrawn window (CWnd* ) and then call CWnd::InvalidateRect(CRect rc, BOOL erase) . You needn't to deal with HWND 's.
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
a pointer? hmm. thanks for the info - I'll have to look into it next time I get a chance.
|
|
|
|
|
You can just use this->Invalidate(TRUE); from within the window you want to repaint's loop.
|
|
|
|
|
this->Invalidate(TRUE); gives me 'Invalidate' : is not a member of 'CMyApp'. I think I am calling it in the wrong place. how do I access one object's members from another object?
|
|
|
|
|
How can i add a background image for a slidercontrol.
|
|
|
|
|
|
|
Hi
I'm using SRVANY for using an existing program as Windows service.
I have too problems with it.
--- First problem:---
I get this error in my windows event viewer 'application'.
I only get this error when the service runs, the user logs off and the user logs in the second time. Then something really weird happens (don't know why). I can't navigate using the application's menu. It's like the application has frozen, but this isn't the case neither. I have some sort of scheduler which checks every minute what to do inside the program, and the scheduler runs and quits perfectly. So the program doesn't "freeze".
I only get this when the application runs as service on my Windows 2000 computer. I installed it at another PC too and there it works great (same OS). WinXP does the job well too.
Error:
The COM+ Event System detected a corrupt IEventSubscription object. The COM+ Event System has removed object ID {FAF488EC-AE99-48A8-8550-07AD2EBDDFAE}. The subscriber will no longer be notified when the event occurs.
<just edited="">
Before that error, i get this error too:
The COM+ Event System failed to fire the Logoff method on subscription {99582471-B2F3-4F46-A30B-4E22AF2E24A4}. The subscriber returned HRESULT 800706BA.
There is something that happens on logoff that isn't correct.
--- Second problem ---
I have read some articles about services which use either the local system account (which has access to local resources and can be interactive) and you can alsoo use it with a domain user which would have access to the netwerk, the ennoying part of the second choice is that the application can not be interactive anymore. The problem is that the application has to be interactive and has to have access to shares.
Is the changing of 'Registry: Lanmanserver parameters' the only workaround this? Is it possible to connect to a share with other users' credentials? (given you know his domain user account and his password) so the program uses the credential's of the user instead of the localsystem account.
Anyone can help me with this?
Greetings,
Jens
|
|
|
|
|
Hello there,
currently I develop a W2k service with Visual C++ 6. In the last few days this service crashs without an assert- or access-violation-message. Has anybody some experience with this behaviour?
Thanks,
Gero
|
|
|
|
|
It is not neccessarty that you should get an assert or access violation message before it crashes... It could be the logic of the service that is causeing the windows operating system to interminate without notice.
One reason could be stack overflow, normally (as to my experience) applications terminate without notice if there is a stack overflow, recurssive function, or infinite loop, etc.
1.Why do people not wearing a wrist watch look at their wrist for time when people ask for time.
2.Why do people ask for time from people who are not wearing a wrist watch.
Prakash,
India.
|
|
|
|
|
The crash also occured as the application ran in a console window and not as a service. And it also runs in Debug-Mode. So shouldn't be there an error message?
Gero
|
|
|
|
|
As i told ya it is not always neccessary that there should be a error message, I guess its a serious problem in the code that is causing premuture termination.
1.Why do people not wearing a wrist watch look at their wrist for time when people ask for time.
2.Why do people ask for time from people who are not wearing a wrist watch.
Prakash,
India.
|
|
|
|
|
Hello Mr. Prakash,
may be you're right. We do have ONE recursive function in our code. I also created a dummy recursive function which is called with no end condition. And I got the exact same behaviour as in our service app... no error message...
Thanks,
Gero
|
|
|
|
|
No Problem, just sharing my experience.
"Fear not of those who can kill the body and not the soul, rather fear Him who can kill both body and soul" - Bible
Prakash,
India.
|
|
|
|
|
Require some help in relation to the problem illustrated below
struct THREAD_CONTROL
{
HNADLE hDevice;
HANDlE hEvent;
};
HANDLE inThreadControl;
inThreadControl.hDevice = hDeviceWrite;
inThreadControl.hEvent = WriteEvent;
_beginthread(ThreadEZUSBWrite,0, &inThreadControl);
void ThreadEZUSBWrite(THREAD_CONTROL pThreadCtrl)
{
// TODO HERE
}
error C2664: '_beginthread' :
cannot convert parameter 1 from 'void (struct THREAD_CONTROL)' to 'void (__cdecl *)(void *)'
None of the functions with this name in scope match the target typ
Suggested appreciated
Kind Regards
Kevin
|
|
|
|
|
This is wrong way to pass multi paramater in thread, instead use
#include "process.h"
beginthread(MyFun,0,reinterpret_caste<cmyclass*>(this));
.
.
MyFunc(LPVOID pThis);
DWORD CMyclass::MyFunc(LPVOID pThis)
{
CMyClass *pThisObj = static_cast<cmyclass*>(pThis);
pThis->UseurClassFunctions.....
.
.
.
}
regards
Balkrishna Talele
|
|
|
|