|
|
CImage class has good functions for work with images.
|
|
|
|
|
Hello everyone,
I want to develop an automatic tool or manually using existing tool (e.g. WinDbg) to watch when CoInitialize/CoUninitialize is called. I suspect CoUninitialize is not called the same times as CoInitialize, and I want to get the call stack.
Any ideas or reference documents about how to do this?
(I do not have the full source codes, but I have symbol files. My current ideas is either to add to system level COM Runtime hook to monitor when the two functions are called and get stack trace if possible, or using WinDbg to monitor the two specific function calls -- but I do not know the command in WinDbg. )
thanks in advance,
George
|
|
|
|
|
bp ole32!CoInitializeEx "~.;k"
bp ole32!CoUninitialize "~.;k"
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks David!
Two more comments,
1.
Previously I always use bm other than bp to set a break point. What are the differences between bp and bm?
2.
"~.;k" means?
regards,
George
|
|
|
|
|
Hi,
I am getting problem in retrieving tables from Excel 8.0. For some Excel files it is working fine. But some files it is giving dupicate fine names with garbage values.
like :
'Const#Liens-Book#Page$'
'Const#Liens-Book#Page$'_
'Const#Liens-Book#Page$'Z_1590EFBF_96D2_4D24_A4C9_842D6034FE78_#
'Const#Liens-Book#Page$'Z_3AFA2892_C4CC_49E4_9288_7102C55DF3DE_#
'Const#Liens-Book#Page$'Z_7609B60E_2B6C_4DBB_8D3C_4D38EC883EBD_#'Const"
It should retrieve 'Const#Liens-Book#Page$' only but its giving this many table names and giving error message like "object or provider is not capable of performing requested operation"
I have written code in VC++. Is there any seetings i need to do for excel file.
I am placing the code below :
CoInitialize(NULL);
ADO::_ConnectionPtr g_Connection;
g_Connection.CreateInstance( __uuidof(ADO::Connection) );
strConnection.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\test.xls;Extended Properties=Excel 8.0;");
g_Connection->Open( (LPCSTR)strConnection, "", "", ADO::adConnectUnspecified );
ADO::_RecordsetPtr recordset = g_Connection->OpenSchema( ADO::adSchemaTables );
CString strTableList;
while ( ! recordset->EndOfFile )
{
CString strTable = (LPCSTR)_bstr_t( recordset->Fields->GetItem( "TABLE_NAME" )->Value );
strTableList += strTable + "\n";
recordset->MoveNext();
}
AfxMessageBox( strTableList );
CString strColumnList;
recordset = g_Connection->OpenSchema( ADO::adSchemaColumns );
while ( ! recordset->EndOfFile )
{
CString strColumn = (LPCSTR)_bstr_t( recordset->Fields->GetItem( "COLUMN_NAME" )->Value );
strColumnList += strColumn;
recordset->MoveNext();
}
AfxMessageBox( strColumnList );
CoUninitialize();
Please help me for this issue. I am waiting for your reply.
Regards
Trinadh
|
|
|
|
|
Hi all,
I want to put a OS check in my program by os check i meant that if i am working on xp then particular work is to be done and if i am working on vista then particular work is to be done.....
How can i differentiate between both the os???
Thanks in advance
|
|
|
|
|
VCProgrammer wrote: I want to put a OS check in my program by os check i meant that if i am working on xp then particular work is to be done and if i am working on vista then particular work is to be done.....
This should help -> GetVersionEx[^]
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Does this [^] help?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am trying to develop a RTP Player in vc++.I downloaded vlc open source but compiled in cygwin and able to get exe but I too convert that code to vc++6.0. Can any one suggest me regrading the rtp player
|
|
|
|
|
yaminisridaran wrote: I am trying to develop a RTP Player in vc++.I downloaded vlc open source
Are you trying to develop an RTP player or download and use a third=party one?
yaminisridaran wrote: Does any one have an idea about streaming RTP
No - the RTP protocol is secret[^]
|
|
|
|
|
Yes I am tryiing to develop a rtp player
|
|
|
|
|
Hi everybody,
i perform a PostMessage(WM_NEXTDLGCTL); and the focus is not set on the next
control but is set on the second next control.
Is there a special thing to know?
Big thanks
|
|
|
|
|
do you set the "tab stop" property to true for that control.
Note: If the next control is a list control and you are trying to do a TAB for setting the focus on that control that list SHOULD contain atleast one item before it shows that it gained focus
modified:The tab order for your window can be changed by pressing ctrl+d in resource view(ie design time)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
modified on Tuesday, June 24, 2008 6:14 AM
|
|
|
|
|
Thansk for your answer
The next control is a DatePickerWnd.
All controls have "TabStop" to TRUE.
If i press the TAB-Key on the control, then the focus steps on the (correct) next control.
But via WM_NEXTDLGCTL it steps 2 controls farer.
If i remove the WM_NEXTDLGCTL, the focus stays on the initial control.
And 2 WM_NEXTDLGCTL sets the focus indeed 4 controls farer
|
|
|
|
|
Probably that's how you've set up the "Tab Order" in design time?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
The Tab-Order is correct at designtime and during the execution of the application.
Pressing the Tab-Key navigates me correctly trough the view ...
thanks for help
|
|
|
|
|
Did you read the fine print on the MSDN page[^]? (The parameters - wParam, lParam and the Remarks section)
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Yes, but i doesn't work for me
A PostMessage(WM_KEYDOWN,(WPARAM)VK_TAB); sets the focus to the previous control
but with silly sideeffects (insertion bar is still in the initial textbox and the new taped characters are inserted in the new textbox )
Thanks anyway
|
|
|
|
|
baerten wrote: A PostMessage(WM_KEYDOWN,(WPARAM)VK_TAB); sets the focus to the previous control
You told me that you read the documentation:
If wParam is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: baerten wrote:
A PostMessage(WM_KEYDOWN,(WPARAM)VK_TAB); sets the focus to the previous control
You told me that you read the documentation:
If wParam is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.
That was just for testing (in this case i use a WM_KEYDOWN and not a WM_NEXTDLGCTL )
|
|
|
|
|
baerten wrote: is not set on the next
control but is set on the second next control.
Try GetNextDlgTabItem(PrevWnd)->SetFocus() .
BTW read the docs carefully on WM_NEXTDLGCTL . It has some detail associated with it.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Yes, i already read the MSDN-Documentation.
I don't have a handle to the next control.
I call the WM_NEXTDLGCTL in a universal function, which sets only
the focus on the next control, wherever the control is placed.
In my case:
I hit the F2-Key on a certain textbox. A Dialog opens modal and shows a Grid.
The user selects a line and the Dialog places a string into the textbox (where the user hit's the F2-Key)
Then i post the WM_NEXTDLGCTL Message so that the next textbox is selected.
Thanks
|
|
|
|
|
baerten wrote: WM_NEXTDLGCTL in a universal function, which sets only
the focus on the next control, wherever the control is placed.
Well for testing purpose, I put this event call in a timer
void OnTimer( UINT Id )
{
PostMessage( WM_NEXTDLGCTL, FALSE, FALSE );
}
Works well for me, focus shifts properly around all controls in the dialog. Then I put it in a button event handler, after this the focus always moved to the Cancel button, guess why? So you need to watch out for such issues.
A wild guess! Are you posting WM_NEXTDLGCTL twice, since it's a post message you wouldn't know, a suggestion would be replace PostMessage with SendMessage (MSDN says don't) for testing purpose to find out where if at all a duplicate one is being posted, since it blocks. Don't forget to revert back to PostMessage .
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Tuesday, June 24, 2008 8:00 AM
|
|
|
|
|
Hi. I am programming c++ with MFC on VS2005. I was wondering how you can make your application draw outside its own window.
There are softwares out there that allow a user to scribble anything on the computer screen over any applications that are running or the desktop. A couple of them are
ActivePen (http://www.kongda.com/products/activepen/default.asp),
VBDoodle (http://www.hopkinsprogramming.net/software/vbdoodle/gallery/)
Draw-On-Screen (http://downloads.zdnet.com/abstract.aspx?docid=352162)
My question is how would I replicate this behavior? Im new to visual c++, and although i have experimented with making my own version of paint, I was only able to draw inside the screen of my MFC application which was made using Edit view class as base class. Did not see any way to draw just anywhere on the screen outside the window.
It would be great if you could maybe name a few built in classes/methods that can do this, or provide me with a link to a known resource on this topic. Thank you.
|
|
|
|