|
I would recommend you this excellent book for MFC if you are advanced [^] and this useful tutorial if you are beginner [^].
Life is a stage and we are all actors!
|
|
|
|
|
Very helpful link. Thanks Hristo!
|
|
|
|
|
|
|
hello guys...im newbie and wanted to learn pocketpc 2003 programing using c++ (using MS VS 2008), but could not find the appropriate book (may be could not find porper key words for query to google). I will be thankful if you suggest me one. Also, I wanted to learn MFC using MS VS 2008, a book on this topic will also be appreiated (i found books on MFC but not MFC using VS 2008).Thanks in advance.
|
|
|
|
|
Muzammil Saeed wrote: may be could not find porper key words for query to google
What could be easier than this[^]?
It's time for a new signature.
|
|
|
|
|
So long story short, I am investigating using Winsock/UDP to communicate between two software packages on separate computers hardwired together.
The issue i am having right away is, on the client&server how do you specify what port/adapter is going to be sending the packets if you have multiple?
I want to be just doing pure UDP broadcast packets(255.255.255.255) as its a point to point connection and setting up IP addresses every time would be too much of a hassle for reasons i wont go into.
|
|
|
|
|
Member 2598478 wrote: setting up IP addresses every time would be too much of a hassle for reasons i wont go into.
Well if you use the IP address of the target machine the network layer will automatically use the adapter that links the machine with that IP address.
It's time for a new signature.
|
|
|
|
|
Sending a UDP package to the universal broadcast address 255.255.255.255 should work on all network interfaces... at least on Windows. Broadcasting is only guaranteed to work within the LAN, in case you have a bigger (company) LAN the broadcast could be limited to your network segment. UDP is commonly used for service discovery in the LAN, once peers have found each other you can switch to another protocol, because UDP is not the most reliable transport available.
Give it a try!
|
|
|
|
|
Thanks for the replies.
When you say it should work on all network interfaces, when i open a socket how do i know which adapter/port it will do it on? Im assuming it wont broadcast it on all ports, or will it?
The issue comes in is this...
The testing machine would be on two networks, the corporate and then this "link" to the other machine under test(neither of which have an IP address assigned on that link).
I absolutely can not be sending broadcast packets across the corporate network, it must go over the other port im just confused looking at the inputs for the Winsock functions how you would specify which port to use if there was no IP address on either end.
|
|
|
|
|
|
Hi,
I would like to create something similar to the Windows Media Player miniplayer in the task bar. I don't expect many problems with coding the desk band (plenty of documentation about that), but I'm still wondering how to start with coding the skinned UI.
When looking into Windows Media Player's resources, I have found the following images: http://img130.imageshack.us/img130/5195/wmpbandimages.png[^]
The first image is obviously a mask, and then there are images for normal, disabled, hottracked and pressed states. I guess that I should take the different parts of the 'state' images (according to the state of each part), and merge these into a single image that shows the current UI. But how can I do this?
I would prefer not to use any libraries, just C++ and the plain Windows API.
Thanks.
|
|
|
|
|
Here[^] is a really good tutorial that should help you.
It's time for a new signature.
|
|
|
|
|
Thanks for the link, but that tutorial only shows how to create non-rectangular windows with a bitmap background. I don't need a non-rectangular window, but a normal window with non-rectangular buttons on it, by using a colored mask (the top image in http://img130.imageshack.us/img130/5195/wmpbandimages.png[^]).
|
|
|
|
|
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
|
|
|
|