|
You should be able to open the .mak file with Visual Studio.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Here is my scenario
My Main Dialog creates a propertyPage , and resizes it to fit the bounds of the Main Dialog window .
mainSheet= new CPropertySheet();<br />
mainSheet->AddPage(&page1);<br />
int res=mainSheet->Create(this, WS_POPUP| WS_BORDER |WS_VISIBLE ,0 );<br />
if(!res){<br />
AfxMessageBox("Could not Create PropertySheet",MB_ICONERROR);<br />
return ;<br />
}<br />
mainSheet->AddPage(&page2);<br />
CRect r;<br />
this->GetWindowRect(&r);<br />
mainSheet->SetWindowPos(0,r.left+10,r.top+60,r.Width()-20,r.Height()-130,0);
To the PropertyPage I add 2 propertypages .
What is happenning right now is that the PropertySheet occupies the desired region of the main window , but the inner PropertyPages are displayed in their original size !
How do I make the PropertyPage resize to the current revised size of the its parent i.e the PropertyPage ?
|
|
|
|
|
|
Is there a way to save the web page contents to an image. Just the contents, no toolbar, no status bar. In other words print web page to image file??
Thanks a lot.
|
|
|
|
|
Hi all,
How can I program to pop up a WordPad window for showing some formatted text for help purpose
in visual c++ 6 ?
Thanks
|
|
|
|
|
ShellExecute or CreateProcess.
onwards and upwards...
|
|
|
|
|
Thanks for your reply.
If I use createProcess() to launch the MS WordPad, how
can I avoid the problem that there may be differences in the path name of the application in different windows platform ?
Or is there any MFC class that i could use to launch a RTF document ?
Thanks
|
|
|
|
|
That's why the recommended way to display a document is to use ShellExecute. ShellExecute will open whatever program is associated with the file extension.
onwards and upwards...
|
|
|
|
|
Hi everybody
I have written an ATL 3.0 project including two sample classes named CAttachment & CAttachments. These classes have interfaces IAttachment & IAttachments in order. IAttachments has got a method named "Item" that returns a result of the type of IAttachment. But before returning the IAttachment, I want to call some member functions of the CAttachment class to setup the IAttachment properly. I know how to create the IAttachment interface, but I don't know how to have access to the members of the CAttachment from the Item method. I will be thankful if anybody replies to me.
Regards,
Roozbeh.
|
|
|
|
|
It's a hack but you could cast your IAttachment interface to CAttachment and call the methods you desire.
CAttachment a = (CAttachment)piAttachment;
a->SomeMethodNotExposedInIAttachment();
pi->SomeMethodExposedByIAttachment();
Note, this won't work outside your implementation project as outside callers won't have access to the CAttachment class or any of its members not exposed by the IAttachment interface.
|
|
|
|
|
How is the CAttachments object producing the interface IAttachment to return?
Presumably you must be making a CAttachment object somewhere, or do you have them already created and you're just holding a list of the IAttachment interfaces?
Steve S
|
|
|
|
|
Ok, sorry for the simple subject and for possibly this simple question, but here is what I want to do:
How do I compile in VC++ 6.0 using the .NET\Vc7\INCLUDE versions of
\Microsoft Visual Studio\VC98\INCLUDE\xlocale
\Microsoft Visual Studio\VC98\INCLUDE\xlocnum
\Microsoft Visual Studio\VC98\INCLUDE\streambuf
\Microsoft Visual Studio\VC98\INCLUDE\xmemory
(how?)
I want to use the same files, except they are from:
\Microsoft Visual Studio .NET\Vc7\include
I also want to do this in only one project of a multiple project VC++ 6.0 workspace.
Thank you for the help.
Johnny
|
|
|
|
|
Just havethe desired path .NET\Vc7\INCLUDE appear before the \Microsoft Visual Studio .NET\Vc7\include in your project "include" directory settings. There's "move up/down functionality in the prop page.
|
|
|
|
|
I am compiling in VC++ 6.0, but want to use
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocale
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocnum
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streambuf
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xmemory
When I compile in 6.0, the inclusion of
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include
has no effect.
When I use the Studio IDE or look directly at the .DSP file, i don't see anywere that I can place the Studio.NET-Vc7 version AHEAD OF the 6.0-VC98 version of these files.
Any suggestion?
Thanks.
Johnny
|
|
|
|
|
Do this Tools | Options. Find Projects | VC++ Directories. Change the order of the Include Files (select from the combobox at the upper right). Just move the desired directories to the top, even add new ones if you wish
|
|
|
|
|
Hi all,
I am currently doing a project where I need to be able to have a imaging framework.
Although the framework itself runs pretty smooth, the CPaintDC of MFC kills me.
The SetPixelV is extremely slow, so I want to use another way of doing this.
I know it is possible to create a CDC in memory, but how can I put a bitmap created from this CDC put on the surface a CWnd subclassed control?
Any suggestions?
LPCTSTR Dutch = TEXT("Double Dutch ");
|
|
|
|
|
bitblt.
Code snippet to help you (heavily edited and content deleted):
BOOL DoChart(CallContextObj *pCallContextObj)
{
CDC oMemDC;
CBitmap *pOldBmp;
CBitmap oBmp;
long lWidth = 300;
long lHeight = 200;
pCallContextObj->GetParameterValue("ChartWidth",&lWidth);
pCallContextObj->GetParameterValue("ChartHeight",&lHeight);
CRect oBmpSize(0,0,lWidth,lHeight);
oMemDC.CreateCompatibleDC(NULL);
int iOldMapMode = oMemDC.SetMapMode(MM_TEXT);
CWindowDC dcScreen(NULL);
oBmp.CreateCompatibleBitmap(&dcScreen,oBmpSize.Width(), oBmpSize.Height());
pOldBmp = oMemDC.SelectObject(&oBmp);
WORD wChartType = 88;
pCallContextObj->GetParameterValue("ChartType",&wChartType);
BOOL bRetval = FALSE;
char caHeaders[512];
strcpy(caHeaders,"Invalid Chart Type");
switch (wChartType)
{
case 0:
bRetval = DoLineChart(pCallContextObj,&oMemDC,caHeaders,oBmpSize);
break;
case 1:
bRetval = DoBarChart(FALSE,pCallContextObj,&oMemDC,caHeaders,oBmpSize);
break;
case 2:
bRetval = DoBarChart(TRUE,pCallContextObj,&oMemDC,caHeaders,oBmpSize);
break;
case 3:
bRetval = DoOpenHiLowCloseChart(pCallContextObj,&oMemDC,caHeaders,oBmpSize);
break;
case 4:
bRetval = DoPieChart(pCallContextObj,&oMemDC,caHeaders,oBmpSize);
break;
}
if (bRetval)
{
LPSTR cpBuf = pCallContextObj->GetOutputBufferPtr();
long lQuality = 75;
pCallContextObj->GetParameterValue("ImageQuality",&lQuality);
char caContentType[256];
long lDataSize = WriteImage(oBmp,cpBuf,pCallContextObj->GetOutputBufferSize(),caHeaders,(DWORD)lQuality);
if (lDataSize > 0)
{
pCallContextObj->SuppressHeaders();
pCallContextObj->GetMimeType("x.jpg",caContentType);
sprintf(caHeaders,"Content-Type: %s%sContent-Length: %d%s%s",caContentType,cpCRLF,lDataSize,cpCRLF,cpCRLF);
if (pCallContextObj->ServerSupportFunction(HSE_REQ_SEND_RESPONSE_HEADER,"200 OK",0,(LPDWORD)caHeaders) || ::GetLastError() == 10054)
pCallContextObj->WriteClient((LPVOID)cpBuf,(LPDWORD)&lDataSize);
*cpBuf = 0;
}
else
bRetval = FALSE;
}
oMemDC.SetMapMode(iOldMapMode);
oMemDC.SelectObject(pOldBmp);
oMemDC.DeleteDC();
onwards and upwards...
|
|
|
|
|
Here is a starting point. Search for serial and/or com in the headings.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
Hi..
I have problems with makeing a scale in GDI.
What i make is : I draw on a memory DC then BitBlt on a window..
I want to make 2 things :
1-Set the origin of the memory DC to lower left corner instead of upper left.
2-change the scale : for example when i call LineTo(hdc,0,10) it draws 100 PX for example not 10.
after drawing on memory DC I BitBlt on the window that may or may not has its coordinates systems changed.
can this be done using SetViewportExt and SetWindowExt ?
thank you in advance
|
|
|
|
|
Will SetViewportOrg() or SetWindowOrg() help?
hspc wrote:
...it draws 100 PX for example not 10.
This sounds like a map mode issue. Check out SetMapMode() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
thank you
SetMapMode() is not enough..
using it I can set the mapping mode to MM_ANISOTROPIC but then i must use SetViewportOrg() or SetWindowOrg() to set the scale ..
the question is how ?
|
|
|
|
|
i have insert a combo box with 2 choices. i create a member variable for that combo as VALUE. what is correct way to pickup the data selected?
|
|
|
|
|
http://www.codeproject.com/combobox/combobox_tut.asp
|
|
|
|
|
Hello!
I have got task to write easy security tool for MS Windows 98. It must deny access to specified local CD-ROM device. I think one of the possible solution is to stop corresponding device driver on demand. So the question is: which win32 functions should i use for enumerating devices and stopping drivers? Or should it be done by other way? Or may be you know the right "search string" for MSDN or Google to find good explanation?
Sorry for my bad English.
Thank you!
|
|
|
|