|
|
no.. i totally forget about it.. thanks
|
|
|
|
|
do you know a way to use the same command line that i use in command prompt in c++
I tried,
[code]
CString command = "wzunzip -d myfilename.zip c:\\mytempfolder\\";
system(command);
system("wzunzip -d myfilename.zip c:\\mytempfolder\\");
[/code]
neither ways work, but it you are in command prompt, it works for
c:> wzunzip -d c:\myfilename.zip c:\mytempfolder\
I'm trying to programmatically extract all the files insice of the myfilename.zip file to the c;\mytempfolder
|
|
|
|
|
Try CreateProcess instead of system.
Jignesh
|
|
|
|
|
I copied the "binoculars" from toools-customize-commands-edit pane with "copy" and want to put this image on my toolbar button. This is just a new button in the standard toolbar IDR_MAINFRAME. How do I do this ? I tried "paste" but it didnt show up at runtime, even though in the resource editor, the image was there in the 16x16 square bitmap of the toolbar button (but not showing in the toolbar itself).
Please help!
|
|
|
|
|
I got it - paste was okay, you just have to go away from the toolbar item and come back and its inserted in the toolbar - something flaky but it works.
Thanks anyways.
ns
|
|
|
|
|
Hallo !
I have any problems with an VC++ project, which I first build on a win NT 4 system. Now I have a system with win2k. I used the same VC++ compiler (version 6) on both systems. But I try to start the correctly compiled and linked project, startprocess of my application stops at the calling of the ProcessShellCommand function.
I haven't any idea what the failure is.
Can somebody help me ?
Thanks a lot for all replies.
|
|
|
|
|
One suggestion which I find is needed when moving between Win98 and NT4 is to do rebuild all the files - go to the Build menu, then Rebuld all.
This is because the precompiled headrs are differnt between Win98 and NT 4.
Good luck
Elaine
Would you like to meet my teddybear ?
|
|
|
|
|
Hey !
Thanks for your answer, but I rebuild the source for more than one times on the new platform. And I didn't use precompiled headers, allways I compiled the complete project.
Any other ideas ?
|
|
|
|
|
Hi,
Can someone tell me how can I get the width of a text to one determined font, cause I want to draw a rectangle that just fit around the text.
|
|
|
|
|
|
|
Hi.
I have a problem with my SingleDocTemplate applicaation.
When I quit, I have the following message in the debug window:
Warning: destroying CSingleDocTemplate with live document.
This causes a memory leak with my document.
I tried to solve it for 3 days, but can't make it work.
Please help me.
|
|
|
|
|
BoundsChecker is reporting the following code as a memory leak:
void foo()
{
_bstr_t bstrA;
_bstr_t bstrB;
bstrA = "Fred";
bstrB = "Wilma";
bstrB = bstrA.copy(); // this causes the leak
// this fixes the leak - bstrB = bstrA
}
At first I thought it was a leak, then I decided it wasn't, now I can't decide! Is it, or isn't it
Gavin
|
|
|
|
|
Yes, that will leak. "copy" will create a copy and then the assignment will create another copy since it can not assume that the original is free for ownership.
bstrB = bstrA;
bstrB .Attach (bstrA .copy ());
bstrB = bstrA .copy (false);
These should all work just fine. But I don't do a lot of _bstr_t work.
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
I have spent a few hours trying to change the printed page to Landscape.
I have tried setting the dmorirntation in the DEVMODE structure but it made no difference. I can not seem to get to the print setup dialog info.
Could you please help by telling me how to change the page orenientaion to landscape so when I define may printed page in OnPrint and view it in print preview it is correct.
any help would be appreciated.
Desmond Mardle
|
|
|
|
|
You can see how to do this in MSDN topic CWinApp::GetPrinterDeviceDefaults.
|
|
|
|
|
Hi,
In a dialog based application, I have three resizable windows.
The first one is used for a 2D curve and it can be resized in both of x-axis and y-axis directions. The second window (image container) only can be resized at x-axis and the third window only can be resized in y-axis direction. This looks like follows:
********************
* * *
* curve (1) *(3) *
* * *
* * *
********************
* image (2) *
* *
********************
Also I can change the size of the bmp image by using StretchBlt
function.
Now, I hope that the length of the image (not the length of the second window) should follows the length of the first window in the case of resizable of whole window.
How should i do this? How can i get the length of the first window?
Thanks in advance!
chen
|
|
|
|
|
sorry, the window changed when post above message.
It looks like:
111111111111133333
111111111111133333
111111111111133333
111111111111133333
222222222222222222
222222222222222222
chen
|
|
|
|
|
Thanks1
|
|
|
|
|
It has to do with COM and Automation. It is basically just a wrapper for any possible type of data you can transmit through Automation. I think it was designed like that to work with Visual Basic better...
Even if you win the rat race, you're still a rat.
|
|
|
|
|
I want to make a serial port communication program. I define a STRUCT variable
struct _COMM_PACK
{
char sID[PACK_ID_LEN];
BYTE cCmdCode;
UINT nVerifySum;
int nDataLen;
BYTE cData[MAX_DATA_LEN];
}aSendPack;
and want to send 'aSendPack'in the Mscomm control-comm like:
comm.SetOutput(aSendPack);
but the SetOutput need a VARIANT variable
how can I do that?
thanx!
|
|
|
|
|
|
Could anyone tell me, where does windows store its default checkbox and radio images?
I've found some odd resources in ctl3d32.dll (these seem to be pre-win32), some in ctl32v2.dll (this even is not a valid PE ) and some in mfc42.dll. But 1st) i cant believe that non-mfc progs use this library, and 2nd) it hardly can believe that win produce grayed copies of these (for pressed-and-holding-buttons) on the fly.
The main purpose of this quest is creation of owner-drawn button, but I dont want to follow Davide Pizzolato's footsteps and include images as resources in built project like he did in his CxShadeButton.
Cryst
|
|
|
|
|
Here is my code :-
void CReportView::OnInitialUpdate()
{
Navigate2(_T("about:blank"),NULL,NULL);
IHTMLDocument2 *pDoc=(IHTMLDocument2 *)GetHtmlDocument();
if(!pDoc)
{
return;
}
HRESULT hr;
SAFEARRAY* psa = SafeArrayCreateVector(VT_VARIANT, 0, 1);
VARIANT *param;
MessageBox("L");
BSTR bsData = m_html.AllocSysString();
hr = SafeArrayAccessData(psa, (LPVOID*)¶m);
param->vt = VT_BSTR;
param->bstrVal = bsData;
hr = pDoc->write(psa);
hr = pDoc->close();
SysFreeString(bsData);
SafeArrayDestroy(psa);
}
You can see the MessageBox call there. If the MessageBox is there, it works right and shows the html rendering of the source contained in m_html which is a CString. If I remove the MessageBox, the html comes rightly for about 0.005 seconds [approximate guess] and then it becomes blank
Regards
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|