|
Use CDialog::SetHelpID() to set different help IDs based on the data you are showing.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Interesting! I missed that. Thank you very much, I will try that.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
I am trying to develop an FTP Explorer but i am getting problems while setting the current directory on FTP. I m using MFC's classes for this.
CFtpConnection, CFtpFileFind etc. The function which i am using for setting directory is in CFtpFileFind. Can any one figure out whats the problem.
Thanks in Advance
|
|
|
|
|
|
|
Thanks
|
|
|
|
|
I have windows XP and I cannot call BIOS to control the cursors X and Y position in text mode. Is there any other way I can conrol the X and Y without calling BIOS?
|
|
|
|
|
|
Hi all, I need some help. I'm trying to draw to a device that does not really have a device. The resolution for this device is 204x196. An application that someone else did takes all the positions of the objects/texts and multiplies them by a factor. Unfortunatly, with this factor, I cannot get text to line up as I can on the screen and the printer. He is using a factor of 2.12, but this does not equate to one inch on the screen to one inch on the new device and to one inch on the printer. Actually, 2.18 equates to one inch. (This factor does create fonts in the correct position.)
What I was thinking was to do one of the following:
- Use the SetWindowExt/SetViewportExt -- didn't work...
- Create a expansion of one above that will allow perfact scaling then get the bit map and shrink it down.
- Use the ScaleViewportExtEx and just magnify it up to the proper scale. I cannot seem to get this to work as advertised.
So, any help that you guys can give would be greatly appericated.
Thanks
Larry
|
|
|
|
|
Some thoughts would be to do one of the following:
Figure out why the ScaleViewportExt is not working.
Do double buffer drawing and simply do a StretchBlt rather than a BitBlt when drawing to your scaled device. This approach doesn't always look very good, though.
onwards and upwards...
|
|
|
|
|
How does the WindowExt & ViewportExt work? I know they have no effect on map modes like MM_LOENGLIDS/MM_HIENGLISH/MM_LOMETRIC/MM_HIMETRIC/MM_TWIPS/MM_TEXT. It only has an effect if you are using MM_ISOTROPIC and MM_ANISOTROPIC. By using these you can create a one-to-one relations ship with other units?
Like: The screen is usally 96dpi and I have a device that is 200dpi. I create a bitmap in 200dpi (lengthXwidth), then use these to create a conversion from the 96 -> 200?
Examle:
pDC->SetMapMode( MM_ISOTROPIC );
pDC->SetWindowExt( 96 * 8.5, 96 * 11 ); // or 120 if using large fonts
pDC->SetViewportExt( 200*8.5, 200*11 );
Rect( 96, 96, 192, 192 );
pDC->Rectangle( &Rect )
Would this create a 1" x 1" on the new bitmap?
Thanks
Larry
|
|
|
|
|
Hi,
I am programming with Visual C++ 6.0. My sources files are on an intranet network. Visual C++ is installed locally on my computer. I compile and link over the network.
I plan to put my sources files in my desktop computer and compile locally because I have remark that compiling true the network is slow.
I want to know wich method is using to back up sources files at the end of the day.
Bye,
Claude
|
|
|
|
|
Gagnon Claude wrote:
the network is slow
I know what you mean. Even a 100 TX connection is slow during compiles. I think this is mainy because of permissions but I may be wrong...
I created a batch file to zip my source and copy it to the network folder.
John
|
|
|
|
|
Source control would be the best solution.
onwards and upwards...
|
|
|
|
|
it is possible to fix the size of formview in mdi?
thanx in advance.
Shinya
|
|
|
|
|
i believe that everyone have used mepg player.as we know,the player have several control panel,we can diplay some of them or not,we can seperate the panel from another,also when we move the panel near another,they will be connected automatically. now i want to realize that kind of control.
if anyone can tell me the name of the control or where can i find some source code?
thanks a lot!
gucy
|
|
|
|
|
Hello,
How to change size of a activexcontrol (which is in a dialog) dynamically. How to enable autoscroll of a dialog if size of activexcontrol is bigger than size of dialog.
Thanks,
Chito.
|
|
|
|
|
I define a rich edit box with horizontal and vertical scroll bar.
It works as it is supposed to; however, when I set the option ECO_SAVESEL with SetOption (no matter if OR or SET), the scroll bars don't come up. (SetOption is executed in InitDialog).
Does anyone have an idea, what's wrong or how to circumvent the problem?
|
|
|
|
|
I have the same problem, I'm waiting solution also.
|
|
|
|
|
add code:
m_richedit.ShowScrollBar(SB_VERT,FALSE);
it will be ok.
|
|
|
|
|
I used VS.NET 2003 to create a windows installer package but if I try and install the resulting msi package over the top of a previous install it complains with a message "... you must uninstall the previous version first"
Is there any way to allow installing over an existing one? and a related topic is can I set certain files to not be copied to the target if they exist already?
|
|
|
|
|
I have looked at the Modern C++ Design book and since none of the examples work in VC6 world, figured I should come up with something of my own.
So to start with, what do you think about this Singleton implementation?
header file
#include <windows.h>
class CSingleton
{
public:
static CSingleton & GetSingletonInstance ();
static void Guard();
static void UnGuard();
private:
CSingleton();
CSingleton(const CSingleton & );
virtual ~CSingleton();
static CSingleton * m_pSingleton;
static CRITICAL_SECTION m_CriticalSection;
static long m_lGuardCount;
};
cpp file
#include "Singleton.h"
CSingleton * CSingleton::m_pSingleton;
CRITICAL_SECTION CSingleton::m_CriticalSection;
long CSingleton::m_lGuardCount;
CSingleton::CSingleton()
{
}
CSingleton::~CSingleton()
{
}
CSingleton::CSingleton(const CSingleton & )
{
}
CSingleton & CSingleton::GetSingletonInstance()
{
if(!m_pSingleton)
{
Guard();
if(!m_pSingleton)
m_pSingleton = new CSingleton();
UnGuard();
}
return *m_pSingleton;
}
void CSingleton::Guard()
{
EnterCriticalSection(&m_CriticalSection);
m_lGuardCount++;
}
void CSingleton::UnGuard()
{
LeaveCriticalSection(&m_CriticalSection);
m_lGuardCount--;
}
How does this implementation look to you? The GuardCount is just there for reference. Doyou think Critical Section is enough or should I be using Events or Mutexes?
|
|
|
|
|
What does happen if
Anonymous wrote:
m_pSingleton = new CSingleton();
produce an exception?
How do you dispose of m_pSingleton when program ends?
|
|
|
|
|
As for the disposal part, wouldn't be cleaned up automatically as it is a static variable?
|
|
|
|
|
It is usually not very practical (system resources, unwritten files, database connections etc.), and it is extremely annoying during maintenance. I strongly recommend using std::auto_ptr or something similar.
|
|
|
|