|
As I already said, I don't want to use a full-blown library for such a small and simple skinned area with just a few buttons. And there's also the matter of personal interest; I would really like to know how it's done. Using a library just because you don't know how to do something, is a wrong reflex.
|
|
|
|
|
Does anyone know if the Visual Studio 2010 documentation includes the Visual C++ 2008 Feature Pack documentation sections (specifically the MFC Feature Pack related stuff) or do 2010 users still rely on the online MSDN documentation for the feature pack topics.
|
|
|
|
|
Hi, In my MFC application,im invoking one console application,using ShellExecuteEx() and im passing value like "MODEL" to that console application and im receiving this string using argv[] in console application.
Like the same way, i want to receive one string from console applciation to MFC.
How can i do that?Pls help me..
char szFile[20]={0},szDir[500]={0};
memset(szFile,0,20);
memset(szDir,0,500);
strcpy(szFile,szModelName);
strcat(szFile,".EXE");
sInfo.lpFile = szFile;
sInfo.hwnd = NULL;
sInfo.lpParameters ="MODEL";
strcat(szDir,"\\Sources\\");
sInfo.lpDirectory = szDir;
sInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
sInfo.cbSize = sizeof(SHELLEXECUTEINFO);
sInfo.lpVerb = "open";
sInfo.nShow = SW_HIDE;
sInfo.hwnd = NULL;
BOOL bFlag = ShellExecuteEx(&sInfo);
Console application coding
int main( int argc , char *argv[] )
{
char str[50];
strcpy(str,argv[1]);
getch();
}
Anu
|
|
|
|
|
You could PostMessage[^] from the console app to the MFC app (or send it using SendMessage[^] - depends on the context).
It's time for a new sig. Seriously.
|
|
|
|
|
Hi. I want to ask you an long question : I have an CRectTracker and an CLineTracker , ( base simple projects could be taken from here[TestTracker] and from here[TestLineTracker2] . How can I combine those clases , ( CLineTracker & CRectTracker ) to have a CScrollView with CRect object and CLinePos object , and an line object between two rects keep tracks with rectangles ? A kind of object net map ... see somehere an CMultiRectTracker but for is not sufficient , because I need an LineTracker too , and I like to be an portable code somehow , I mean , if I have an CMultiLineRectTracker class , that class to reuse in any other project... any kind of hint will be appreciated !
|
|
|
|
|
Hi sir,
I want to use the arithmetic operation
A = AExp(_0.324 * t/T).
How can i use it in VC++,
The values A,t and T i am reading from controls(edit box)
Thanks
Raj
|
|
|
|
|
std::exp() is your friend - it takes one parameter and returns e raised to the power of it's argument. It's declared in cmath. With that function you can write your expression in almost the same way as you've written it in the question.
Cheers,
Ash
|
|
|
|
|
raju_shiva wrote: AExp
What is AExp ? You mean A power of ... ?
What is the '_' in front of 0.324 ?
Anyway, I think the only "difficulty" here is the power of functionality, which you can have by calling the pow[^] function.
|
|
|
|
|
Cedric Moonen wrote: '_
Yes its A power of
Cedric Moonen wrote: What is AExp ? You mean A power of ... ?
sorry its not _ ..its -0.324
Raj
|
|
|
|
|
Well, did you have a look at the link I provided ? You have everything you need to do what you are looking for.
|
|
|
|
|
Yes sir,i referred the link,which you had provided,
it was really helpful.thank you
I used this code to ghet the current date :
COleDateTime time;
CString str;
time=COleDateTime ::GetCurrentTime();
str.Format("%d:%d:%d",time.GetDay(),time.GetMonth(),time.GetYear());
//code to get the diff between current and previous date
COleDateTime currentDate, PreviousDate;
currentDate.ParseDateTime(str, 0, MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT)); // str is current date()
PreviousDate.ParseDateTime(Junk, 0, MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT));
int j = currentDate - PreviousDate;
current date foormat is 12:7:2010
previous date format is 12-06-2010
Any idea where i am doing wrong
Thanks
Raj
|
|
|
|
|
The - operator doesn't return an int but COleDateTimeSpan object. You should check the documentation.
BTW, please don't mix your different questions. This question was about the arithmetic operation, not the date difference.
|
|
|
|
|
Just a hint :
What about using a function ?
to get the data from edit box, well, you can read it all about it following this link : CWnd::GetWindowText[^]
Watched code never compiles.
|
|
|
|
|
In MS-DOS we had File Control Block and Bios file input output functions.
ex. FILE *fp and using fopen, fread, fclose and read, write, open for bios...
Is it directly supported in 32bit C (win32 sdk) Besides CreateFile ... etc...
And How we do interrupts in windows... I learned that system objects will not be in the same memory locations and the memory is divided into pages...
Is there anything like monitoring file creation and access so that we can prevent files being created... .
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
I think that depends on how you mean it. Hacking into an application to monitor its file operations is probably possible with API hooking, you probably can even do this for multiple applications, however, monitoring every file operatinon overall the system (including Windows' own file fiddlings) is a much much bigger pill to swallow. Not to mention low level monitoring (what goes on in the hardware)...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I can't really tell from your question but you appear to be trying to find out:
- whether C stdio (FILE *) still exists. It does and works just as well as it always did. Please note that DOS FCBs were nothing to do with C's stdio library although ancient C compilers may have used them internally.
- whether the low level BIOS wrapper interface from 16 bit versions of C still exists. The answer to that one is that even if it does you won't be able to call it from a Windows app as Windows has a habit of killing apps that try using the BIOS to write to things they shouldn't.
You don't need to issue interrupts to get system services in Windows. Interrupts were just a way of providing a small (but complex) interface to the operating system. These days the userland libraries in your OS do that for you. In Windows they're NTDLL, GDI and KERNEL. Just call the functions and don't worry about the underlying details.
There are ways of monitoring file behaviour - security software does it all the time. You have to write a file system filter driver to do this though. If you do a Google search you'll find loads of confusing information to sift through.
Cheers,
Ash
|
|
|
|
|
Voila. That's a punch. Thank you.
Let me try those.
meanwhile... if people finding this thread and would like to drop some notes then please do so... so guys like me will get some useful info from that.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Hello everybody !
Now ,I want to convert the vc project to vs2008.
when I complied this dll in vs2008:
it throw this error code :
1>c:\program files\microsoft sdks\windows\v6.0a\include\sdkddkver.h(217) :
fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting
I search the macro "_WIN32_WINNT" in my project,but it isn't found defined this anywhere.
Now I add this code in the "stdafx.h":
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
At last, I delete the new SDK Include path in the vs2008.
but it failed too.
Why doesn't this error produced ,and how to solve it ??
Thans for you reply !
Best Wish for you ! 
|
|
|
|
|
Looks like the compiler is mixing up files coming from different SDK versions.
WINVER _WIN32_WINNT and _WIN32_IE should be defined so that the "components" are not newer than the API they run on.
Just give a look to the order of the directory search (include, libraries, DLL etc. should refer to the various SDKs in the same order).
Also, check if no ".h" file is missing in a new SDK (so that an older one is found in another)
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Yes ,you're right !
I install this version:
A、Microsoft Visual C++ 6.0
B、Visual Studio 2008
C、Microsoft Platform SDK for Windows Server 2003 R2
D、Microsoft Windows SDK v6.0A
So I try to uninstall the 'C' and 'D', and then to compiled it .
Thanks !
Best wish to you ,and your family !
|
|
|
|
|
I mean correct _WIN32_WINNT and _WIN32_IE on stdafx.h or define your header file.
On stdafx.h, You can see these definitions.
Code Snippet
#ifndef WINVER
#define WINVER 0x0501
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0600
#endif
Bolded value can be modified.
So you shoud change value .
It's up to your target machine's OS or API functions.
|
|
|
|
|
Hi sir,
I want the difference between two dates.
Suppose if the previous date is 11-07-2010 (in this format.)
I need to find the current date.
and also the difference between them.
Current Date - previous date.
how can i do this.
Thanks
Raj
|
|
|
|
|
You can use a COleDateTime[^] class for that purpose (by using the + and - operators).
|
|
|
|
|
Hi sir,
Suppose if i have one date in 12:7:2010(Current Date)
and other in 12-06-2010(P Date)
How can i find difference between them(P Date - Current Date)
Thanks
Raj
|
|
|
|
|
Why do you ask your question again ? Did you follow the link I provided and tried to understand the concept ?
|
|
|
|