|
OH,
I have always just refered to them as a tab control. The tab is undesireable in my project.
Is there a way to use them without showing the tab. Not only is the tab undesireable I will have many pages to my project. Each tab "page" will possibly have it's own bitmap background. It seems that property sheet (in my limited understanding) does not lend itself to what I am trying to acomplish. Correct me if I am wrong.
Why do you think that the GDI+ approach mentioned above is reinventing the wheel? Are you familiar with the prject I mentioned above "myHTPC"?
I like the concept of the proptery sheets (tab control), it was actually the first approach I looked into. It doesn't seem to fit ????
Main Menu: Music Module
Slideshow Module
etc
Each module has a main page or tab or property sheet which has maintanance, options, and setup screens. Each module must persist when its page is no longer active.
Maybe my design is flawed, but that's why I am asking so many questions.
Steve
Knowledge is gained from experience, Experience is gained by making bad decisions.
|
|
|
|
|
No, a property sheet is not a tab control... well it seems a tab control, but it is not one...
let me explain:
you can add a tab control from your resource editor, but you cannot add a property sheet...
A property sheet is a class that contains property pages (independent dialogs) it can be parametrized in order to look like a installation wizard (as the Installshield...) once a property page is creaetd it persists until you destroy it as it would be a modeless dialog. well, a property page could be understood as a modeless child dialog embedded in the property sheet.
A tab control is not the same because you must hide/show things in a property sheet you have only to change the active page and the dialog (property page) that is intended to be shown will be shown. Each time a dialog gets hidden it doesn't loose any information, it only gets hidden, sothe information persist.
the only thing you should consider is that the pages are not created until you select them (remember that not only the pages can be selected using tabs, you can also parametrize the property sheet to look like a wizard and change from one page to another one using buttons...) in order to avoid that fact, you should create them using the flag PSP_PREMATURE (more in MSDN).
1. If you create a property sheet and you set the wizard mode then tabs are not shown (the pages appear like an installation wizard) (you can change of page using the "next >>" and the "<< back" buttons. (Also, you can hide those buttons and make everything in your way).
2. All the pages are independent dialogs that allow you to handle whatever you want...
3. As all the pages are dialogs, you can be sure that once they have been created they'll be persistent (until you destroy them)...
4. You can add and remove pages dynamically...
5. you can look for watermarks that can be placed as background bitmaps...
6. you can embed property sheets inside other property sheets...
well, I cannot imagine a better scenario to use a wizard... look further the msdn and here in CP to clarify yourself about how to use them.
|
|
|
|
|
Joan,
Okay, I see after doing some searching ( imagine that) it makes sense now.
thanks,
Steve
|
|
|
|
|
Thanks to you, this forum remains great because people ask and others share... you acnnot imagine how many questions I have posted here...
You know: if you need something else we are here...
|
|
|
|
|
|
I have a DLL that is loaded by a framework(I dont have the sourcecode) and I need to determine the process id of the exe(framework) that loaded my dll. It is a standard dll so I have the hinstance/hmodule from the DLL_PROCESS_ATTACH in the dllmain, but have not found a way to determine the process id that is loading the dll. It is possible to have multiple frameworks running so I cant enumerate processes looking for the dll, becuse there may be multiple frameworks running with my dll. I have to determine the PID progamatically within each dll when loaded. Thanks.......
|
|
|
|
|
|
About 3 minutes after submitting my question I found the _getPID() function. DOH!!!!, but thanks for your effort Mike
|
|
|
|
|
Does anyone knows a good tutorial on zooming functions (or how it works) in a CView class?
Thanks,
Ruben
|
|
|
|
|
See SetViewportOrg and SetWindowOrg in the online doc.
|
|
|
|
|
Hello,
I have a solution under VS.net with a dll project and an app project. THe app project uses the dll.
My current way of getting the app to compile is going into project setting for the linking and directing it to the .lib created with the .dll. I then copy the dll from the dll/debug directory to the app/debug directory in order to run the app.
Is there a better way? I could force the dll to be created int the app/debug directory but I want to be sure I am not missing some useful functionality that MS provides in this tool.
Thanks in advance.
KS
|
|
|
|
|
Add 'post build' event handling in the DLL project. Open the properties page for the DLL project and select build events. Select the post-build item. Enter the command line (or lines) you want.
Software Zen: delete this;
|
|
|
|
|
I have a win32 application that I create two Thread in it alternatively.It mean first I create the Thread No.1 and when it reached to the end of thread function I create second thread for anothre functuin and when second one reach to end,at the end of it I create first thread again. I want to know if one thread reach to end does it free its memory automaticly or my algoritm caused to any memory leak or anything else?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
That depends on how the memory was allocated. When a thread exits, its stack is destroyed and reclaimed, but any memory allocated on the heap (such as with new ) remains allocated since that memory belongs to the process, not the thread.
--Mike--
Mister Sparkle is disrespectful to dirt.
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
hmmmm,thanks.
Michael Dunn wrote:
any memory allocated on the heap (such as with new) r
What about something like char *?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Mazdak wrote:
What about something like char *?
If you do something like :-
char* p = new char[100];
in your thread, then you need to delete it manually when the thread exits, else it will remain in memory till the process exits (basically a leak as you lose the pointer value)
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
hmmm,got it. Thanks you both.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I got a question for you... My worker thread starts when my app starts. Reads a file parses it out.. downloads needed information.. and organizes some of the information in CArrays.
But when it is finished all of the information in the CArrays is gone.. the CArrays are member varibles and written (while locked, and prompty unlocked after writing), and I'm even able to confirm that they are writen to.
I try to even look at their size (after the thread is finished) and both report 0. (Not what it was when the thread was running, and nothing was called to remove it all).
-Steven "the yellow dart" Hicks
CPACodeProjectAddict
|
|
|
|
|
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Ok there are 2 blank Member variable/global CArrays at the start of the program.
When the program starts it starts another thread that reads a file and looks in the file for specific information. When it finds it, it places it in the CArray as a new entry.
But after the thread ends the CArrays are blank. Although during the thread I'm able to loop through all the contents and display it.
-Steven
-Steven "the yellow dart" Hicks
CPACodeProjectAddict
|
|
|
|
|
Nevermind I fixed it with a global class variable.
-Steven "the yellow dart" Hicks
CPACodeProjectAddict
|
|
|
|
|
Hiya I really need to know how to do this. I have to be able to pass parameters between 2 single document based apps...The parameter I need to pass is a string.
What is the best way to be able to do this??
If I was doing a c++ program, I would use the argv and argc in main().
Thanks,
grahamoj.
|
|
|
|
|
The command line params are readable in several ways. The easiest for you would probably be __argc and __argv , which are set up by the C library.
--Mike--
Mister Sparkle is disrespectful to dirt.
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
You can use WM_COPYDATA for that purpose. Alternatively, take a look at all the "inter-process communication" articles on this site
To get the application parameters you can use GetCommandLine() .
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If you already have a scheme in mind that would work using argv & argc you can do the same thing with a windows application by calling GetCommandLine(). Call it from your OnInit or other initialization function it will give back the appname, path and the command line arguments as a string. Then just parse the string to get the arguments. Have fun....
|
|
|
|