|
The first order of business would be to break the problem down into more manageable pieces. Rather than try to solve the overall problem at once, instead try and solve the individual pieces and the larger problem will solve itself.
Roughly:
Get input from an edit control
Tokenize that input
For each token, determine if it is 2 digits and if the sum of the digits is 9
If so, print that token
"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
|
|
|
|
|
Hi All
How can i get MSSQL Installation path?There is any command Plz help me
|
|
|
|
|
What has this to do with C/C++/MFC?
|
|
|
|
|
Well, although he did not specify it but he might want to know the path programatically.
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: Well, although he did not specify it but he might want to know the path programatically.
-Saurabh
He might want to know the time in Timbuktoo ... It would help if people specified clearly what their problem is in the first instance.
|
|
|
|
|
Yes but that is the sad reality of programming forums. I have accepted the situation and stop fighting it. This way it is so much more easier.
-Saurabh
|
|
|
|
|
|
Look in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for a key that matches however MSSQL lists itself. In that key, get the UninstallString value. That path should get you in the near vicinity.
Other places in the registry to look might be HKLM\SOFTWARE\Microsoft\MSSQLServer\Setup and HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\<instancename>\Setup.
"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
|
|
|
|
|
I've been searching for some good articles / resources on threading but haven't been able to find anything that covers it will enough. I've searched around a bit on code project and google and all i can find is wrapper classes for win32 threads. I just want to know how to create threads, manage resources that are shared between threads, send messages between threads, etc.
I've already done a bit of experimentation using CreateThread() and ResumeThread(), which was pretty simple - though I didn't try to share resources between threads.
I also understand what mutexes are, however I don't know anything about their implementation. Any help would be appreciated
edit: I would also appreciate any information on fibres as well
|
|
|
|
|
|
thanks...
...and happy birthday too
|
|
|
|
|
You're welcome.
Sauce! wrote: ...and happy birthday too
Ah, thank you very much.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I am facing an awkward problem. I need to maintain an application which prints lines with pen style as PS_DASH.It has Mapping mode set as SetMapMode(MM_LOMETRIC)however it is working for some machines and not working on others.I not getting any clue what could be the reason,any suggestion please tell me know..
|
|
|
|
|
Shivani .B wrote: I am facing an awkward problem. I need to maintain an application which prints lines with pen style as PS_DASH.It has Mapping mode set as SetMapMode(MM_LOMETRIC)however it is working for some machines and not working on others
Are you talking about PCs or printers?
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 talking about printers.
|
|
|
|
|
I guess you may try using GetDeviceCaps to ask some valuable info about scaling.
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]
|
|
|
|
|
Thought of sharing the some information for anyone how might be facing the same issue. After spending some time trying to figure out the problem, I observed by setting the DPI to 300 or less, the dash line gets printed in PDF file as i am using cutePDF writer to take print.
|
|
|
|
|
Hi,
From all the system processes, I'm trying to get window handler for the excel processes.
At line,
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_NATIVEOM, __uuidof(Excel::Window), (void**)&pWindow);
I'm getting "FAILED" message. Complete code is given below. Please guide me to get value in pWindow. Thanks in advance.
#include "stdafx.h"
#include <stdio.h>
#include <windows.h>
#include <tchar.h>
#include <psapi.h>
#include<oleacc.h>
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
#import "libid:00020813-0000-0000-C000-000000000046" auto_search no_dual_interfaces \
rename("DialogBox", "excelDialogBox") \
rename("RGB", "excelRGB") \
rename("DocumentProperties", "excelDocumentProperties") \
rename("SearchPath", "excelSearchPath") \
rename("CopyFile", "excelCopyFile") \
rename("ReplaceText", "excelReplaceText")
int _tmain(int argc, _TCHAR* argv[])
{
DWORD aProcesses[1024], cbNeeded, cProcesses;
unsigned int i;
if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
return 1;
cProcesses = cbNeeded / sizeof(DWORD);
for ( i = 0; i < cProcesses; i++ )
{
if( aProcesses[i] != 0 )
{
TCHAR szProcessName[MAX_PATH] = _T("<unknown>");
HWND hwnd;
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, aProcesses[i] );
if (NULL != hProcess )
{
HMODULE hMod;
DWORD cbNeeded;
if ( EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded) )
{
GetModuleBaseName( hProcess, hMod, szProcessName, sizeof(szProcessName)/sizeof(TCHAR) );
if(_wcsicmp(szProcessName,L"EXCEL.EXE") == 0)
{
std::cout<< szProcessName << "--" << aProcesses[i] <<endl;
Excel::Window* pWindow = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_NATIVEOM, __uuidof(Excel::Window), (void**)&pWindow);
if (hr == S_OK)
{
}
else
{
std::cout<<"Failed";
}
}
}
}
_tprintf( TEXT("%s (PID: %u)\n"), szProcessName, aProcesses[i] );
CloseHandle( hProcess );
}
}
return 0;
}
|
|
|
|
|
North 2009 wrote: I'm getting "FAILED" message.
You need to collect more information. When you get the failure you need to get the actual Windows error code value to determine why the call did not succeed. Merely printing the message "Failed" is very poor practice.
|
|
|
|
|
North 2009 wrote: From all the system processes, I'm trying to get window handler for the excel processes.
1) If you have Excel's process ID, call EnumWindows(). In the callback function, call GetWindowThreadProcessId() and check if it matches the process ID.
2) If you have Excel's process handle, call GetProcessId() and then do step 1 above.
"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
|
|
|
|
|
how to disable alert script in webbrower ?
thanks
|
|
|
|
|
Q) How to get answer to question in internet?
A) Ask something that's non-specific, unclear & generally unpleasant to read.
Which browser?
What "alert script"?
|
|
|
|
|
Hello Friends,
Is there any way to detect when user selects a file and presses CTRL
+C or select copy from the context menu.
I found that IFileOperationProgressSink will notify when a copy
operation is about to begin but i am looking for a way to get notified
when user selects a file for copying from windows shell explorer.
Please advice,
Thanks in advance,
Joe
|
|
|
|
|
Does ICopyHook help?
"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, ICopyHook only works at folder level. I want the notification on Individual files also.
|
|
|
|