|
You can use
Create an object to the class and use 'DoModal()'
or
Create an dialog pointer and use ShowWindow(SW_SHOW)
DoModal() will disallow any actions in parent dialog untill the new dialog is closed
Do your Duty and Don't expect the Result
|
|
|
|
|
Is the window (dialog or window) part of your application? or and external application
For the dialog
You can call DoModal function of the dialog object
For SDI, MDI or or other type of windows, You can call ShowWindow function to show the dialog
It should be handled inside the message handler of the button
If an external application, you can Make use of CreateProcess API.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
if its another dialog then call it using DoModal() function of the instance of the dialog.
Eg MyDialog dlg;
dlg.DoModal();
if its a window then call the ShowWindow() method
eg ShowWindow(this->m_hWnd,SW_SHOW);
regards
Gopinath.
Gopinath MV
|
|
|
|
|
can u help me when i use this function i got the error
"
C:\myproject\newartz\newartzDlg.cpp(204) : error C2660: 'ShowWindow' : function does not take 2 parameters"
Sorry to bother u pls help me out
eg ShowWindow(this->m_hWnd,SW_SHOW);
|
|
|
|
|
oh just remove the this->m_hWnd argumtent ok
Get the window handle that you want to display and'
then call the showWindow function.
Eg CWnd *p = AfxGetMainWnd();
p->ShowWindow(SW_SHOW);
Gopinath MV
|
|
|
|
|
You can use CreateIndirect or CreateDialogParam or DoModal()
How do you open?
|
|
|
|
|
Hello, I have a single dialog with a custom control which is based on the CWnd class. From method in the custom control, I need to access a variable from the dialog's class. How would I need to make this call to say a getValue() method?
FYI, I am using VC6.
|
|
|
|
|
ctroyp wrote: Accessing parent dialog
Use GetParent(). This will provide you with a pointer with which you can call getValue().
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Im not sure, whether the GetParent call from a COM control will work out.
Anyway, call GetParent(), if you get a valid parent handler, type cast it to your Dialog class' pointer. using dynamic_cast will be safe for this. then you can call the public interfaces.
You may have to use the header file and other stuffs of dialog class in the control class.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
you should not directly access the members of the dialog using the pointer, in which case your custom control no more is a reuseable custom control. You should define user defined message handlers in target window and then try to set/get anything using it.
Vipin
http://www.explorewindows.com/Blogs
|
|
|
|
|
Thanks for the webpage u provided me... it was really helpful....however my boss doesn't want that... he wants me to encrypt the image... then dsplay it out beore saving it up.... haiz.... thanks anyway~~ TO THOSEWHO ARE READING THIS~ CAN ANYONE PLEASE HELP ME WITH MY PROBLEM????
A MILLON THANKS.............
THANKS
REGARDS
|
|
|
|
|
You can post this on my CP profile instead of posting here can't you display original image and by using a simple encryption function, convert the bitmap bits to to encrypted format and then save? I'm not sure whether I'm talking about your problem
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
You wrote:
You can post this on my CP profile instead of posting here... can't you display original image and by using a simple encryption function, convert the bitmap bits to to encrypted format and then save? I'm not sure whether I'm talking about your problem...
hey sorry.... but i'mm new in this forum haha... dono wad's CP profile...... anyway, regarding on the pointers u gave me, do u know how to do them? i don't know how to do it... could u guide me?
thanks
|
|
|
|
|
Yes I shall...
But today im a bit busy.
Seems you can so some stuffs with showing and saving an image. that's quite simple. you will get lot of information from the web itself.
On reading and writing to file, the real logic occurs.
You can make use of GetBitmapBits and Set bitmap bits. or directly modifying the bitmap buffer wtih your XOR logic.
ok try your level best.
|
|
|
|
|
we3Guy wrote: he wants me to encrypt the image... then dsplay it out beore saving it up...CAN ANYONE PLEASE HELP ME WITH MY PROBLEM????
So what exactly are you having difficulty with? Encrypting an image, displaying an image, or saving an image to disk? Three different questions require three different answers.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
my question was....
i'm doing this project whereby,
i have a "load" button that enables me to display a picture in bitmap format...
Next i have to encrypt the picture and display it again..
and decryption as well in future
Thanks
Regards
|
|
|
|
|
we3Guy wrote: Next i have to encrypt the picture...
Well, there's CRAPI, and then there are these:
http://www.codeproject.com/cpp/encrypt.asp
http://www.codeproject.com/file/aencrypt.asp
http://www.codeproject.com/cpp/cryptit.asp
http://www.codeproject.com/cpp/blowfish.asp
http://www.codeproject.com/cpp/aes.asp
http://www.codeproject.com/cpp/xor256.asp
http://www.codeproject.com/cpp/EncryptionCryptoAPI.asp
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for the websites they were nicely writtened.... but.... they were not very useful to me... thanks anyway....
by the way,erm.......
if i want to do editing to the image, do i take the pixels of the image or the array bytes of the image? AND.... how should i go about doing it?
THANKS~!!!!
Best Regards
|
|
|
|
|
What is the difference between
#include (iostream.h)
and
#include (iostream) .
Are they different? If so, what are their differences?
-- modified at 0:29 Wednesday 2nd August, 2006
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
Hakuna-Matada wrote: #include (iostream.h)
To link to Old Standard C++ Library
Hakuna-Matada wrote:
#include (iostream).
Used to link to New Standard C++ Lib
In the new C++ lib there are some differences . For ex
1)open functions do not take a third parameter (the protection parameter).
2)You cannot create streams from file handles. etc....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think iostream.h is keept for backwards compatibility, all the old and new stuff is in iostream, don't know why they switched.
|
|
|
|
|
Just FYI: They didn't switch. The .h versions were non-standard. That is, they were what everyone used before there was a standard. The problem was that each system implemented them slightly differently. When the standard was released, most systems kept the .h versions for backward compatability. They are now being phased out of almost all systems completely.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hey all,
I have two differnet projects coded in VC++6.0 version. I want to merge both the projects. How do I do it?
ie., Project2 needs to be included in project1. Can the project as a whole be added or just the files, say, include the cpp and .h files from project2 in to project1?
What is the best way to do it?
Any ideas/help please?
Thanks in advance,
Anusha.
|
|
|
|
|
Basically, a "Workspace" in Visual C++ 6, or a "Solution" in Visual C++ 7.0 ~ 8.0, is what for holding one or more projects.
Maxwell Chen
|
|
|
|
|
thanks for ur response.
But If I include my project2 in my project 1 workspace, then I understand there can be two projects in one work space.
But What I need is to use .cpp and .h files from project2 in project1 and build them or can I build the two projects together?
Basically my project2 is dialog based and project1 is single document.
I want to use the project2dlg.cpp and project2dlg.h and all the relevant files that is dependant in to my project1.
Is htere a way I can do it or should I recode my project1 accordingly to just include the files n functions that I want from project2.
Hope this is clear. If u need any furhter info. please let me know.
Thanks.
|
|
|
|