|
I think because there're many types, so it makes me confused.
I just want to use the simple way,
And, dataBox.GetTime(tmpTime) works, I get the correct value I need
|
|
|
|
|
yes.
i did say dataBox.GetTime(tmpTime) may not work, i used 'may', not 'must'.
lol.
it due to your implement, if you use its inner point, of course it work, right? lol
|
|
|
|
|
you're right,
so i'm lucky because it works, even I don't know what is inner point, I just let dataBox is the member of the dialog.
can you show me the document about inner point so I can read about it.
thank you, kcynic,
|
|
|
|
|
dateBox.GetTime( tmpTime );
in this line, you might only want to retrieve a time value from your dialog. what i said inner point means in the tmpTime, if it isn't a CTime object, you should use points the new values and return, otherwise, you can't return the right value via tmpTime, right?
especially, for c++ class, there are two copying ways: simple copy and deep copy. Almost every C++ book will refer it, you can look up it.
modified on Tuesday, July 1, 2008 11:11 PM
|
|
|
|
|
Hi,
I want to able to have tabs with different CView classes in each tab, how is this done? Is there any tutorials or sample code to do this?
Thanks in advance!
|
|
|
|
|
I did something similar to it sometime back. check this, this and this
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
|
Hi, Im working on an accessibility application. I am using visual C++ with mfc in visualstudio2008.
In windows vista, if you right click on desktop >> go to colors and appearance >> click "Advanced...", you reach an 'appearance settings dialog box where you can change the colors of anything in windows. Windows xp also had this app, i think you right click on desktop, choose backgrounds, and then go to the appearances tab and click advanced (or something like that).
Here you can change color of title bars, menus etc. You will notice in this dialog box there is a view, and in this view are a few little windows. As you choose different colors from the options, the view updates to reflect the changes. So if you, say, change the title bars to red, then in the little view the title bar of the windows will turn red.
My question is how do you simulate this behavior in your own app. My app too has similar features by which the user can change some colors, and i want to have that same sort of view in it so the user can see what a change looks like. Is it possible to make a little view box with some windows inside the way microsoft has done there?
Note, I am already aware of how to use setsyscolor function to make system colors change. What I want is to simulate that view microsoft has over there so my app is as easy to use as the default one in windows.
In addition, is there some way to simply open that 'appearance settings' dialog box from within my own app? I might just opt for that if it seems like the best option..
|
|
|
|
|
See here for XP[^]. See if this helps
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I am currently writing an interactive cloth simulation program and I am going to need the GUI to be displayed on a variety of platforms including a native PC application and the web. The problem is with the latter. I am currently writing this app using C++ and OpenGL, and I'm not quite sure how to get it to display web side. I know that there are OpenGL implementations for Java, but I don't know Java that well and do not have the time to really learn it.
I've considered separating the simulation code into it's own dll and writing a renderer for each platform, but I'm not even sure what data will need to be sent between the two applications. Should the simulation dll actually include an OpenGL implementation and simply pass final rendered scene to the display app, or should the display app handle all of the rendering.
Any suggestions or advice would be very helpful. Thanks in advance,
Dustin
|
|
|
|
|
A way to do it would be to render the image to a memory bitmap within an ISAPI extension[^]
That way you could use the same C++ OpenGL code for both the desktop and web version.
|
|
|
|
|
Have you had any experience doing this with real-time 3D and know what the performance would be like? Most of the rendering will be done by user interaction, i.e. user controlled rotation, but we may need a free-spinning model as well. Also, it has been quite a while since I've done any web programming. How exactly would I embed this in the web page. I understand if I was generating a static page I could just write all of the HTML out via the WriteClient function, but if I am just using the program to display an ever changing image what would be the best process. I know I could use JavaScript controls to pass parameters to the dll, but how do I actually place the image on the page? Am I writing raw image data to the stream or do I need to save an image to disk and have the page load it?
Sorry for all of the questions, I'm just trying to wrap my head around all of this so I can detail an accurate time frame. If you had any examples of displaying an image using an ISAPI extension it would be greatly appreciated.
Thanks,
Dustin
|
|
|
|
|
Dustin Henry wrote: Have you had any experience doing this with real-time 3D and know what the performance would be like?
No, not really
Dustin Henry wrote: How exactly would I embed this in the web page.
I would have a web page being a plain old html, and the ISAPI extemsion would produce only the image. That is, you would have an img tag with href pointing to the ISAPI extension.
Something like this article shows[^], except that you would not read the image from a resource file, but generate it on the fly.
|
|
|
|
|
Thanks for the help. I think I might try to use a java applet image viewer that can constantly ask for updates from the ISAPI dll and display the generated raw image data. Hopefully that will limit the amount of Java I need to learn but still get the job done.
|
|
|
|
|
I am very new to creating Windows DLLs and I am trying to create a plugin for iTunes but I need this plugin to have a window that runs alongside iTunes. When I open iTunes it does create the window but I get "Unhandled exception at 0x10911758 in iTunes.exe: 0xC0000005: Access violation reading location 0x10911758."
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(_T("iTunesLyrics"));
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH: InitWnd(hInstance); break;
case DLL_THREAD_ATTACH:
case DLL_PROCESS_DETACH:
case DLL_THREAD_DETACH:
break;
}
return true;
}
int InitWnd(HINSTANCE hInst)
{
static TCHAR szAppName[] = TEXT("iTunesLyrics");
MSG msg;
WNDCLASSEX wndclass;
wndclass.hIcon = LoadIcon(0,IDI_EXCLAMATION);
wndclass.cbSize = sizeof(WNDCLASSEX);
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = (WNDPROC)WindowProcedure;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInst;
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = _T("Testing");
wndclass.hIconSm = NULL;
if(!RegisterClassEx(&wndclass))
MessageBox(NULL, _T("RegClass Failed"), _T("Error"), MB_OK);
hWnd = CreateWindow(_T("Testing"), _T("This is a test"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInst, NULL);
ShowWindow(hWnd, SW_SHOW);
return 0;
}
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_DESTROY: PostQuitMessage (0);
break;
case WM_CREATE: return 0;
break;
case WM_NCCREATE: return true;
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
Any help would be greatly appreciated.
|
|
|
|
|
I can't tell from the code where the problem lies, but this is caused by memory trying to be used without being initialized first. How are you debugging your DLL? Are you just compiling and then running iTunes to load it? If so, you should try launching iTunes from within the dev environment so that you can see at what point the dll if failing. If you're using VS, under your project properties there is a 'Debugging' tab and a 'Command' argument. You can place the path to iTunes.exe in here and it should launch iTunes when you run your program. It probably needs some command arguments in order to load your dll, but you will have to consult the iTunes documentation for that.
Not sure how helpful this is. If apple has an SDK there is probably more info on the message boards for it.
Dustin
|
|
|
|
|
The Way I debug is I try to open iTunes after putting the compiled dll into the plugins folder a Visual Studio Just in Time Debugger pops up and gives me the option of using visual studio to debug so I click yes and that is when I get the violation reading location error.I tried adding iTunes.exe to the debugging tab but it says debugging information cannot be found or does not match. Unfortunatly I was not able to find any information for any arguments to put in for the debugger. Also I have not been able to find an iTunes debugging message boards either...
|
|
|
|
|
My application stores its settings in an XML file on user's PC. But the data inside the xml file can be easily read and changed by anyone who can see that file. I want to lock that file so that no one can open that file except my application.
Is there any way to achieve this without encrypting/decrypting whatever I dump into file?
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
|
Locking alone will not do the job. If a file is on my system then I can view it. Period. Your best best is encryption in such a case.
Saurabh
|
|
|
|
|
Can you add an ACE to the file's ACL?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Suppose, I add write restriciton for the user but won't that restrict my application too from writing to that file?
I am yet to look into this.
the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions.
..surviving in autumn..in love with spring..
|
|
|
|
|
If access to your file was limited to a certain user, then you could run your program as that user. I've not done this before so it may or may not work for your situation.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello
I have problems with a few "things" and "circumstances" and so need help.
Prologue:
many years ago i learned to create progs in C, later on I tried a bit of "C++",
but i never left my pc-environment. Now, i had to send data to a server - that's
very exciting for me - especially cause i don't know the basic "terms" and "procedures".
Perhaps someone can explain me the following problems:
Problem:
1. Get data out of my existing programm and create a xml-file.
2. Include additional files in this xml-file (like jpg's) and code it in base64-manner.
3. Send this file to a server
4. Get an answer from this server ...
5. ...and work with it further more in my prog.
The items 1, 2 and (soon, i hope)5 are solved, but i can't understand the mechanism of
"talking" to a server out of my c-programm???? I never had to do this in the past,
i'd always opend lokal files or databases via ODBC or other lokal things. When i had to send
files to a server, i used a ftp-software on my desktop, but I have never done this from my code...
I've got a documentation from the server-admin, which tells me the following:
1. create a xml-file, insert all the stuff which is needed and then "...name it xmlpackage..."
what is this? - no extension (perhaps xml) for a file? for me, it seems "unusual" but this
isn't the "real problem" - this looks like a "wrong behaviour" to me...
2. then, use the following address to send the data:
https://www.theservername.com/XML/interface.php?postTheNewData
what does this mean? Is this the adress i had to send my file to?
but: is it right, that the expression after the questionmark is a parameter? so why is it
called "postTheNewData" and not "xmlpackage" like a few lines above?
3. i used the function WpPost of the mfc to try sendng files, and the wizard asked me a lot
of things and at the end - an error occured....(and my file isn't send)
4. and this is only the sending -part - what shall i do for retrieving new data?
Additional Question:
Is it possible to send and retrieve data with the mfc and without using third-party-programms?
How can i get a response after sending - if the sending is ok or not?
Perhaps, someone can help me out of this situation, because after i asked the admin in the
past, the only answer i've got from him, is: "...in every programming - language must be
a function to post data to a server, but i can't help you now - good luck..."
So please, be patient with me. I dont know someone to ask for, so i contact this group because i
will code the answer in "c/c++".
Thanks a lot for an quick answer.
|
|
|
|
|
fish4fun wrote: 2. then, use the following address to send the data:
https://www.theservername.com/XML/interface.php?postTheNewData
what does this mean?
HTTPS is Secure Sockets over HTTP
http://en.wikipedia.org/wiki/HTTP[^]
http://en.wikipedia.org/wiki/Https[^]
fish4fun wrote: Is this the adress i had to send my file to?
It appears so.
fish4fun wrote: Is it possible to send and retrieve data with the mfc and without using third-party-programms?
Yes it is. There are several ways, one might be to use the WinInet classes like CInternetSession[^]
fish4fun wrote: How can i get a response after sending - if the sending is ok or not?
It depends. Learn HTTP then ask more questions.
fish4fun wrote: Perhaps, someone can help me out of this situation, because after i asked the admin in the
past, the only answer i've got from him, is:
After you get more knowledge of HTTP and HTTPS perhaps you can ask more specific questions of the admin and he will be able to supply the answers you need.
led mike
|
|
|
|
|
Wow....downvoted for that? Brutal
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Sorry, if i used the wrong button!
That was a very good answer, because it was quick and an answer!
|
|
|
|
|