|
|
i know how to create project of ddk mirror driver
but i dont know how to debug it
i use ddkbuild but i dont know to use it.
may give some project with ddkbuild
|
|
|
|
|
|
Hi,
I use connection to sql server:
Internal::_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance( __uuidof( Internal::Connection ) );
when I am currently testing my application in remote (server sqlserver in another machine) everything works as it should.
But when I simulate a network outage (disconnect and reconnect the cable network) and I run a query to read attributes (for example) I noticed that my application does not know the basis which has been connected even though the tests on the connection it gives me yet opened(pConnection->GetState() = adStateOpen)!
So I wonder how to know if there is a network outage or how to create a connection attempt and also the best test on the connection that it is still connected to my database.
Thank you
|
|
|
|
|
With MS VC6.0 :
Can printf() and the other derivatives such as CString::Format() be made to produce comma thousand seperated formated numbers ?
I tried the following code but it does not seem to be supported:
long n = 4523123 ;<br />
printf("%'ld", n) ;
Expected Result : 4,523,123
|
|
|
|
|
Hi Neil,
I would suggest using the GetNumberFormat Function[^] with the locale id of English_USA.1252.
TCHAR szFormatted[MAX_PATH] = {0};
LCID lc = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
GetNumberFormat(lc,0,_T("4523123"),NULL,szFormatted,ARRAYSIZE(szFormatted));
Best Wishes,
-David Delaune
|
|
|
|
|
Neil Urquhart wrote: Expected Result : 4,523,123
Tak a look at the "N" type on the MSDN Format specifiers[^] page.
[edit]Sorry my mistake this does not (as David points out below) apply to printf() . I was on the .NET MSDN page and did not look at the header closely enough. [/edit]
modified on Friday, October 23, 2009 8:57 AM
|
|
|
|
|
Richard MacCutchan wrote: Tak a look at the "N" type on the MSDN Format specifiers[^] page.
For printf() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks; my bad 
|
|
|
|
|
Is this implemented in VC6.0 ? MSDN suggests it is VS2003 onwards only.
|
|
|
|
|
Neil Urquhart wrote: Is this implemented in VC6.0
No, sorry my previous post was originally wrong. I've changed the message to correct my mistake.
|
|
|
|
|
Hello Friends
I m very close to one of my target If u help me to solve this.
I hv to get value from SendMessage.and I m using like this.
Int ID;
int view = (int) SendMessage(pshell,WM_COMMAND,ID,0);
But it is returning always same value for ID.
I also tried WPARAM wparam in place of ID too but no result.
PLZ suggest me some solution.
Actually I m getting tht value for view in dialog.
thx
|
|
|
|
|
What are you trying to do ? The 3rd parameter of SendMessage is a WPARAM which depends on the type of message you are sending, it doesn't return something to you...
yogeshs wrote: I also tried WPARAM wparam in place of ID too but no result.
What do you mean ?
|
|
|
|
|
I m getting view type from dialog
while setting I m using
0x7029 Icons
0x702B List
0x702C Details
0x702D Thumbnails
0x702E Tiles
default for each view
But how do i get tht for different view?
|
|
|
|
|
The only thing I can reply is Liquid Nitrogen[^].
Now, if you want a more serious reply it would be nice to explain what you are trying to do (at a higher level). I'm really totally confused about what you are trying to achieve
|
|
|
|
|
yogeshs wrote: Actually I m getting tht value for view in dialog.
You appear to have asked this same question previously although in different ways, and yet nowhere have you clearly explained what you are trying to do. All I can determine is
- you are using a dialog, for some unknown purpose
- you need to do something with a view somewhere
- you have some reason to use an
OPENFILENAME structure in or from the dialog - you think
lpfnHook is an answer to something - you do not understand the
SendMessage() call
Can you please try reposting the question with a clear definition of what your program is trying to do and what bits are not working. Place any code you post between <pre></pre> tags, and try spelling words in full rather than using 'txtspk', so that we can understand the problem and work to a resolution for you.
|
|
|
|
|
I want to add notification icon. and Balloon for that but ballon containing come links and how that hnadle?
|
|
|
|
|
KSagar wrote: I want to add notification icon. and Balloon for that but ballon containing come links and how that hnadle?
Are you needing something like CPPToolTip v2.1[^]?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
|
I have a CWnd Derived window. I have added several Child windows.
[main window]
[title_win]<-child window
[main_view_win]<-child window
I create the child window [main_view_win] using WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL the scroll bar exists and works however there are two problems.
problem one.
the scroll bar buttons initially are not drawn. ( thumb and middle part are drawn ) Once they are clicked on they are drawn properly.
when the child window [main_view_win] is covered by another window ( for example notepad ) the scrollbar's do not redraw until they are physically clicked on.
I have tried the following with no luck.
Made sure no other child window was overlapping.
Tried with clipchildren clip siblings turned on
turn off all painting functions to make sure i was not doing something stupid.
turned on and off erase background.
I did a quick test adding a scrollbar as a seperate child window and it worked just fine.
I was about to change my code ,illiminating the WS_VSCROLL and WS_HSCROLL, then I thought the smart people of codeproject might know what is happening.
|
|
|
|
|
|
I want to add 2 matrices (2 dimensional), using 2 methods.
1. Pointer To Array Method
2. Base Address of Array Using Int Pointer
Anyone please help me.
|
|
|
|
|
What is your trouble about?
It's basic pointer handling...You know, proper pointer handling is required to access the real programmer initiation.
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]
|
|
|
|
|
ratprita wrote: I want to add 2 matrices (2 dimensional), using 2 methods.
Does this get you started:
void main( void )
{
int A[2][3] =
{
{0,1,2},
{9,8,7}
};
int B[2][3] =
{
{6,5,4},
{3,4,5}
};
int C[2][3];
for (int x = 0; x < 2; x++)
{
for (int y = 0; y < 3; y++)
C[x][y] = A[x][y] + B[x][y];
}
}
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Newmat10 is a very powerful and neat library for matrix manipulation containing many useful functions. It might be helpful to you. Go to internet download it and try it!
|
|
|
|