|
No, I think that the main class may pass a reference to itself when it instantiates the other ones (and hopefully needed members are public).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I have a Visual C++ application running in Visual Studio.net.
It will have numerous dialog windows that will display labels and data.
The labels and data will be displayed in Text Controls.
There are IDC_XXX names for the labels and data.
What I need to do is dynamically place the labels and data on the Windows dialog given X and Y coordinates.
I cant use a static dialog in my rc resource file.
QUESTION:
Can I move the controls on the dialog given X, Y coordinates?
If so, can someone tell me how this is done??...and how the X, Y system works in a dialog window.
Where is 0,0 etc...??
Thanks,
Jerry
|
|
|
|
|
jerry1211a wrote: Where is 0,0 etc...??
Just above and to the left of 1,1
Use SetWindowPos() or MoveWindow() , don't ask me for an example, ask your teacher.
|
|
|
|
|
jerry1211a wrote: Can I move the controls on the dialog given X, Y coordinates?
Are you looking for MoveWindow() or SetWindowPos() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Actually what I have is a dialog window with no controls at this point. I want to write text, numbers, etc to the window, using X, Y coordinates. I thought I could do this but have forgotten how...
Jerry
|
|
|
|
|
The only other way I know of is with TextOut() or DrawText() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I can use that Ok, but I need to get the device context for the dialog I created.
Is there a call to get the device context?
Thanks.
Jerry
|
|
|
|
|
jerry1211a wrote: Is there a call to get the device context?
GetDC() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank You...
Have a good day.
|
|
|
|
|
Ive been playing around with SetPixel(), My program draws random stuff, in random colors, but now i want it to have its own black backgorund which it can setpixel on, something that nothing else can go ontop of...
I firstly created my program in win32 console, in hopes that in fullscreen mode i culd use the console background as my black background, but it didnt work.
So now i need any way (well it can be win32 console, win32, or something MFC based dialog stuff etc) were my program creates its own big black dialog (or something)for me to setpixel on...
It would be good if i can clean the background every now and then too.
Anyone have any good ideas on how to do this?
/Johannes
|
|
|
|
|
Just create an offscreen bitmap, use the FillRect() api to fill with a black brush and away you go.
|
|
|
|
|
Hmm, i played around with FillRect() but i think i might have used it in the wrong way, as it basicly does the same thing as filling the screen using SetPixel..
How should i use FillRect() so its more ontop/permanent?
/Johannes
|
|
|
|
|
I want to compress .bmp file,which i am creating .
both option are available for compressing
1> while saving bitmap
2> after saving into .bmp file.
please tell me what should i do???
There Is Nothing Right & Wrong
|
|
|
|
|
You can easily compress the bitmap file using a zip library. Search CP, there are many articles about using zips. Another method would be to create a bitmap with less bloat, ie use a pallette which contains only the colors required for the bitmap. Another method would be to save the image as a format other than .bmp, like .gif, .png ( probably the best ) and .jpg. Again search CP for these methods.
|
|
|
|
|
I just got the project from the college about using c++ to make database application. i really have no idea even how to start it,just want to do some research first. I hope i could get any information for it. thanks !
ert
|
|
|
|
|
First thing you would need to decide is what sort of database you are going to use. I would recommend Sqlite, but it really depends on what sort of information you will be dealing with.
|
|
|
|
|
his project ( AFAIUnderstand ) is to MAKE a database, not access an existing database engine.
|
|
|
|
|
are you wanting to MAKE a database engine ? or are you wanting to create a FRONT-END to an existing database engine ?
|
|
|
|
|
jingguangdadao wrote: ...database application.
Which could be any number of things? Please elaborate. Have you asked your instructor for details?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to save bitmap into jpg file could anyone help me for that.
also i want reduce it's size is it possible??
Thank you.
There Is Nothing Right & Wrong
|
|
|
|
|
|
Is it possible to set a variable's value through the debugger, and if true, how is it done?
Thanks very much.
John P.
|
|
|
|
|
yes, put a breakpoint at a line where the variable is assigned , and in the watch window, you should be able to change its value.
|
|
|
|
|
Yes it is possible. Just click on the variable Value in Variables window (or Watch) and enter the value you want.
Probably not a good idea to mess with pointers and handles of course, but it's easy to change simple ints, doubles, chars etc.
Matt
if ( ! pMatt->isEnjoying("Sales") )
{
pMatt->retrain("Computer Science");
pMatt->getNewJob("Developer");
}
|
|
|
|
|
HI!!
I have one variable in one method and i want to use same variable value in 2nd method.I have no class..Can any body know how i can use one variable from one method into another method... i have no any class..
Thanking you very much..
shah satish
|
|
|
|