|
You could try attending class
|
|
|
|
|
I am doing to embedded programming with a footswitch, I want a CButton to be 'pressed' when the footswitch is pressed and released when the footswitch is released?
Does anyone know how I can programatically give the CButton the 'Pressed' look?
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I suggest creating an owner drawn button that draws itself as pressed when it's truly pressed as well as when it's pressed property is true . Them it's a simple matter of doing:
m_button.setPressed (true);
m_button.Invalidate();
m_button.UpdateWindow();
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
When you want to have the program press the button use:
::SendMessage(hwBtn,BM_CLICK,0,0);
Art
|
|
|
|
|
so that a Windows Media Player control 9.0 can be run at full screen mode.
If the control be run at full screen mode directly without sucking in keyboard presses, the system would hang after any non-system key pressed.
I am using VC++ 6.0. However, I still have some problems make the control run well at full screen mode.
Anybody can help? If you have some related articles or sample source codes?
Appreciate your help!
JW
DJ
|
|
|
|
|
hello,
i have a little problem when i want to capture bitmap.
I work in MDI project, i want to capture a view in Childwindow.
I can capture the view and save it in bmp file,It's work fine.
But if i my app is not in the foreground i capture a bitmap of the foreground app.
How can capture a bitmap of a view wich is not in the foreground (minized,or background) ??
thx for your help
Excuse for bad english
|
|
|
|
|
You do this by hiding your window, capturing the picture, and then showing your window again.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
thx for your answer !
there isn't another solution? there is not good if i must hide the app in foreground to capture the bitmap and show the app again.
|
|
|
|
|
hi.
i´m using an ADO-Recorset (_RecordsetPtr) and i need to know the number of records mached in the last SELECT. So i´m trying to do it by RecordCount, but it doesn´t work
el hombre es libre cada vez que elige y eso es lo que lo hace libre
|
|
|
|
|
It depends on your Connection::CursorLocation value. If you specify adUseServer you cannot access the RecordCount property.
pConnetion->CursorLocation = adUseClient will make the RecordCount property returning a value.
|
|
|
|
|
Thanks you very much. now recordCount is working very good.
but, do you know if adUseClient is slower than adUseServer ?
el hombre es libre cada vez que elige y eso es lo que lo hace libre
|
|
|
|
|
here's what MSDN says:
RecordCount Property
The cursor type of the Recordset object affects whether the number of records can be determined. The RecordCount property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and either -1 or the actual count for a dynamic cursor, depending on the data source.
|
|
|
|
|
If you're going through all the records anyway then asUseClient won't be any slower.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Mhh... Yes perhaps, but explain your problem, it would be easier for us !
|
|
|
|
|
The target DLL specified in m_strName must be an absolute path (ex. : c:\bla.dll) or in one of the directories listed in your PATH environment variable.
|
|
|
|
|
You get this message at startup. But why did you post that piece of code? It tells nothing about your problem.
Could you be more specific, and also put the entire error string from Windows?
|
|
|
|
|
Ok, next question: what is name.dll and where is it?
|
|
|
|
|
Ok, let's see.....
The DLL is loaded run-time with your call to LoadLibrary . If you put the DLL away (removing it from System32 for instance), the program stops complaining it cannot find the DLL. Am I right??
If I am right, then when LoadLibrary fails, you return FALSE . But to who do you return FALSE ?.
|
|
|
|
|
so, what exactly is your problem then? What are you trying to achieve?
|
|
|
|
|
I want to Create a Frame/view/doc structure On a ActiveX Control,but It will be Found Memory leak! And I Found that the reasons is :
CDocManager* CDocManager::pStaticDocManager;
CPtrList* CDocManager::pStaticList;
How Can I avoid Memroy leak?
the Following is My Code :
BOOL Create()
{
if( m_pFrameWnd )
{
if( IsWindow(m_pFrameWnd->m_hWnd) ) return TRUE;
}
CSingleDocTemplate * pDocTemplate;
pDocTemplate = new CSingleDocTemplate(IDR_MAPTYPE,
RUNTIME_CLASS(CMapDoc),
RUNTIME_CLASS(CMapFrame),
RUNTIME_CLASS(CMapView));
// pDocTemplate in destructor function delete this!
CMapDoc * pDoc = new CMapDoc;// in destructor function delete this!
CCreateContext Context;
Context.m_pCurrentDoc = pDoc;
Context.m_pNewDocTemplate = pDocTemplate;
Context.m_pNewViewClass = RUNTIME_CLASS(CMapView);
Context.m_pLastView = NULL;
Context.m_pCurrentFrame = NULL;
CMapFrame * pFrameWnd = new CMapFrame;// in destructor function delete this!
m_pDoc = pDoc;
m_pFrameWnd = pFrameWnd;
m_pDocTemplate = pDocTemplate;
CRect rcMap;
GetClientRect(&rcMap);
BOOL ret = m_pFrameWnd->Create(AfxRegisterWndClass(CS_DBLCLKS), NULL, WS_CHILD|WS_VISIBLE, rcMap,this,NULL,&Context);
m_pFrameWnd->ShowWindow(SW_SHOW);
return ret;
}
ZHANGYIFEI
|
|
|
|
|
I'm not sure if this qualifies as a beginner's debugging question, but...
One of our apps (written in VC6) crashes on a few of a client's machines, and we can't reproduce the crash in our dev environment. He's getting a message such as the one in the subject line. The first address ("the instruction at [xxx]") always comes back the same on all his machines.
What are the basic steps I need to take in order to map this address back to a line of source code?
|
|
|
|
|
|
Excellent--this is *exactly* what I was after.
(as an aside, I've been meaning--for years--to look into how to do this)
|
|
|
|
|
:(Is there any way I can call the member function of a user defined "sniff" class when calling it from the function which is not the member of the "sniff" class.
The error that occurs when call is made
error C2352: 'sniff::show' : illegal call of non-static member function
Reply me soon
|
|
|
|
|