|
I've never had much luck on VC++ 6.0 copying a dialog resource cleanly.
Now I'm trying it with VC++ 2003. I'm trying to copy a dialog from one project to another with the intent of including the .cpp and .h files later on to save me some work but copy/paste does not do anything and drag and drop from one project to the other gives visual indicators during the drag as if it wants to do it, but nothing happens when I attempt the drop.
I'm probably just missing something very important and probably very obvious but I can't seem to get it to work.
Any ideas how to copy a dialog template from one project to the next without needing to dig into the .rc file directly?
|
|
|
|
|
I usually open the 2 RC files in NOTEPAD -- and copy dialogs by hand.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
So we really are stuck doing it by hand still. Not surprising but very odd for a nth generation "Visual" IDE.
Thanks for the feedback.
Does VC++ 2005 or 2008 handle copying or is it still by hand there as well?
(I never tried that with VC++ 2005 beta when I tested it back then.)
|
|
|
|
|
Hello everyone!
Here are my questions:
1) When drawing ellipses, rectangles, lines, et cetera, how do you select a color? I can't use SetDCPenColor() because they're not supported on Win9x/ME. And I'm on Win3.1.
2) How do you free memory from a HBITMAP?
Thanks in advance!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Lord Kixdemp wrote: 1) When drawing ellipses, rectangles, lines, et cetera, how do you select a color?
Create a pen and a brush. Select them into the DC you're going to draw on.
The pen will be used for the outline, the brush for the interior.
Lord Kixdemp wrote: 2) How do you free memory from a HBITMAP?
DeleteObject()
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I dont know why you got vote 3?
|
|
|
|
|
Doesn't matter to me. If the OP needs more info then (s)he's free to ask.
Explaining all of the basics of GDI (which is well documented) here is kind
of beyond the scope of this forum.
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark replied my question in its entirety, I don't know why someone voted 3... I didn't even know there was a voting system until Hamid said that and I figured it out. o_O
*Is voting... takes some time*
Windows Calculator told me I will die at 28.
|
|
|
|
|
Yeah you can of 1 to 5 give to someone (like 5 to me )
|
|
|
|
|
Do you like, win something with high scores?
Windows Calculator told me I will die at 28.
|
|
|
|
|
For win we need to write a good article and submit it on the codeproject.(I told you because it's first time that you are using of vote so I was thinking you start with 5
Except it I like to ask a question of you whats the meaning of your Signature I saw it already?
|
|
|
|
|
|
Lord Kixdemp wrote: Good article? Hmm... I've got a great idea in mind.
Good luck.
Lord Kixdemp wrote: Coincidence or reality? Only destiny will know
I dont like think to it I am because I can think.;)
|
|
|
|
|
Hi,
How do I generate line number information in the MAP files for C++/VC++ projects? I am using Visual C++ 2005 and could not find any option to generate such information. VC++ 6.0 had an option for generating line number information in the MAP file. This option is present on C++ tab, Debug info drop-down in VC++ 6.0
Thanks and Regards.
|
|
|
|
|
It looks like the /MAPINFO:LINES linker option has been removed starting with VS 2005.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
May I ask what you need the MAP file for? Many people are under the mistaken impression that to debug a release build you need a MAP file, whereas in reality you can just enable debug information in your release build and use your debugger (almost) as per normal.
Steve
|
|
|
|
|
Every now and then when I am looking at crash dumps from the field.... if the debugger's not helping (using a PDB), sometimes the map has a clue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
Map files does have information at times which can be useful. More over I receive a screen shot from customers or beta testers which has just offset information. Using map files and line number information is sometimes easier to locate the crash location as discussed in some of the articles on this site.
|
|
|
|
|
In my solution I have 2 projects, a static library project and a executable project.
How do you set the entry point on the executable project to the WinMain() inside the static library?
|
|
|
|
|
In the linker/advanced properties of the project, you should be able to set
an entry point.
Remember you may be bypassing CRT library initialization if that applies.
See /ENTRY (Entry-Point Symbol)[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I want to make my program full screen on device, now when a device key is hit a message or a tool bar come on top and does not go. I want that message dose not come or go after few seconds.
Please help
Thanks a lot
|
|
|
|
|
Suggestion: You can use DirectX APIs to get an exclusive full screen.
|
|
|
|
|
I have to use a third-party ActiveX control in my project,it creates many classes when used in VC 6.0 and is very powerful,but in VC.NET,it creates only one class,and only a few methods,and there are many methods that we can not know the meaning by their names,such as Wrapper1(),Wrapper2()...,so I can not use the control easily,can you tell me how I can use it`s all methods,thanks very much!
|
|
|
|
|
I have picture box within dialog box.
I want to find it's location on dialog box
I used the function as
CRect myRect;
CWnd *ptr = GetDlgItem(IDC_PICTURE);
ptr->GetClientRect(&myRect);
but this gives me height and width of picture box
but i want to find the exact location of picture box
i.e. top-left coordinate of picturebox according to the dialog box client area.
Please help me for this......
Chetan
|
|
|
|
|
CRect myRect;
CWnd *ptr = GetDlgItem(IDC_PICTURE);
ptr->GetWindowRect(&rect);
ScreenToClient(&rect); Using GetWindowRect() returns the screen coordinates of the control. The ScreenToClient() call converts the screen coordinates to client coordinates, in this case relative to the dialog.
Software Zen: delete this;
|
|
|
|