|
Sorry, but your title asked for information on "skinned UI". I'm not sure how to do the buttons you are asking for, but probably something similar. Try the articles here on CodeProject, it's quite likely some other CP member has written about it.
It's time for a new signature.
|
|
|
|
|
Rather than using 3rd party gui library its hard to say its possible. If you can use some library like SkinCrafter then you can easily get what you want.
|
|
|
|
|
Please reply to the poster of the original question.
It's time for a new signature.
|
|
|
|
|
Of course it must be possible, I'm pretty sure that no library was used in the WMP desk band either. SkinCrafter looks like it's hugely overkill for my (relatively simple) problem.
|
|
|
|
|
OK, I've done some more searching, but unfortunately, I couldn't find any examples of how to use such a multi-colored mask.
However, I think that I should take the following approach: for each color in the multi-colored mask, create a 2-color mask with the current color replaced by black, and all other colors replaced by white (by using something like ReplaceColor at How to replace a color in a HBITMAP[^]). Then, those 2-color masks can be used to BitBlt the individual segments (that might come from different state images) into one single image.
Is this the right approach? I want to be sure that I haven't missed anything before starting to implementing this.
|
|
|
|
|
Tim De Baets wrote: Is this the right approach?
Sorry but I couldn't say as I've never tried it. I offered the window skinning tutorial as that was something I have done in the past.
It's time for a new signature.
|
|
|
|
|
I cant understand why you are going towards complicity. Just use SkinCrafter or some other Skining library like DSkin which has Vista, Windows MPlayer skins and lots more. you just need to use their .dll and .cpp and .h in your project and a few lines of coding.
|
|
|
|
|
Please post your suggestions to the original poster of the question, who is the one looking for answers, not to me (second time of asking).
It's time for a new signature.
|
|
|
|
|
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
|
|
|
|