|
It seemed you closed debug window. you can make it show again as follow:
1. click Tools/Customize...
2. Select Toolbars tab
3. check debug in Toolbars, it will show immediatly
good luck!
|
|
|
|
|
You are my hero of the day, thanks!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have an application that uses a custom image format.
What I am trying to do is make it possible to switch to
'thumbnails' in an explorer window, and have it show the thumbnails,
or when selected show it as a preview in the left pane (just like JPG's
and GIF's do already). How do I go about doing this? Just register the file type? or do I need to fiddle with the .net system.drawing.image encoder class?
Thanks!
|
|
|
|
|
Forgot to Add: I REALLY want this custom fileformat to be openable by
the 'windows picture and fax viewer' as well.
|
|
|
|
|
|
the code is simple:
vector<int> ivec;
int ival;
while (cin >> ival)
ivec.push_back( ival );
when i run this program, provide input, say, 1 2 3 4 5 6,then, what key should i use to end input?
Thanks for your time!
|
|
|
|
|
You would have to define an exit code, for example 9999 which must be entered to exit. The code would look like:
vector ivec;
int ival;
cout << "Enter 9999 to break.";
while(cin >> ival)
{
if(ival == 9999) break;
ivec.push_back(ival);
}
The Control-C combination always works, but it breaks your complete program, so the code above is much better.
-Dominik
|
|
|
|
|
Homework's a bitch, isn't it?
Software Zen: delete this;
|
|
|
|
|
I am new TCP IP Programming
I have captured the IP Packets and HEADER information
But i unable to see data Part of packet can any one tell me how an see
data part of packet or where i can read about it
|
|
|
|
|
Try searching the MSDN for "Windows Sockets".
Software Zen: delete this;
|
|
|
|
|
hello all
I have just purchased the Vc++ .net standard edition.
well, if i create a new project with the wizard i can easily change the 'use MFC as a shared DLL' option to 'use static MFC linking' and quickly rebuild my application in order to get one self-contained EXE.
On the other hand, when i load some VC++ samples (the ones supplied with the product ie: commoncontrols sample etc.) they have set the 'use MCF as a shared DLL' option on as a default, so i can build them and get the EXE needing the MFCxx.dll at runtime to work fine.
Now, if in these sample projects I switch the 'use MFC statically linking' option, even if that is correctly displayed in the project settings property page (General page), the resulting built executable still actually shows its dependencies on the MFC DLL (I can see them both using the 'dependency walker' and directly from the EXE size which is smaller than the statically linked one).
I noticed that under the c/c++ preprocessor property page all of these sample projects have always the _AFXDLL flag enabled: but if i cut it (as the wizard generated projects dont' have that flag enabled) the output windows warns that i have to use the /MD option (instead of the /MT one used by the wizard projects). So I use /MD and the project is built and I can launch it, but i wonder if this is really OK, as, as i said, the wizard projects actually use /MT (besides not having the _AFXDLL flag on).
Any info/tips about the above will be greatly appreciated, as i'd like to statically link the sample projects
thanks in adavance
|
|
|
|
|
Mondrianx wrote:
So I use /MD and the project is built and I can launch it, but i wonder if this is really OK
That's ok. _AFXDLL works in conjunction with /MD (/MDd in debug).
_AFXDLL is to tell you don't statically link with MFCxx.lib, thus MFCxx.dll will be automatically loaded at run-time. But that's not enough since the C run-time (msvcrt) needs to be configured as well, hence the /MD compiler switch.
That's what is usually done when you switch from "use mfc as shared dll" to "use static mfc linking". I guess if it doesn't do exactly that, that's because you've a limited version : there's one product called VC++.NET but there are several license limitations[^]. From what I remember, one of the licenses is just for learning, not for actual app building and ditributions, hence what you see. The fact is, while a given limited edition may not allow you to do several things using the GUI, it is already known that you most of the time can managed to do them anyway using cmdline options, such like what you did!
How low can you go ? (MS rant)
|
|
|
|
|
Hello all!
I have a little problem in my project (VC++ 6.0).
I want to show user a dialog box with question "exit app or not" when he tries to close application.
Where shoult I write a handle to this event?
Thank you!
Dmitry Timin
|
|
|
|
|
I believe you can do this by overriding the default OnClose() method (WM_CLOSE message)in the main frame window of your application. Then call the CFrameWnd::OnClose () method if the user clicks "OK".
- Anatari
|
|
|
|
|
how will you differ if user clicked exit or the computer is going shutdown? a message box would than be totaly anoying.
|
|
|
|
|
In my SW i have to save all the data in a new folder.how to create folders.is shell inevitable?
yanigv kcarija
|
|
|
|
|
_mkdir, _wmkdir
int _mkdir( const char *dirname );
-c
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
After I hit reply to your question, I realized that I have forgotten the code I wrote yesterday night to create folders. But I am sure there is one.
Sorry.
"* Code till death *"
http://www.askarya.com
|
|
|
|
|
try this API:
BOOL CreateDirectory(
LPCTSTR lpPathName, // directory name
LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD
);
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
hi
i am wiritng my own print dialogbox. on that i place the controls for setting properties. i like to set that properties to selected printer. i wrote below code. but printer doesn't set the user selected properties . please correct the code where i am wrong. otherwise please give guidence
Thank you
void CmyPrintSetup::OnButPrint()
{
// TODO: Add your control notification handler code here
unsigned char temp[32];
DEVMODE *devout,*devin;
DWORD dwNeeded,dwRet;
DEVMODE* pDevMode;
if(!OpenPrinter(printername,&hprinter,NULL))
MessageBox("Printer can't be opened","error",MB_OK);
dwNeeded=DocumentProperties(NULL,hprinter,printername,NULL,NULL,0);
pDevMode=(DEVMODE*)malloc(dwNeeded);
dwRet=DocumentProperties
(NULL,hprinter,printername,pDevMode,NULL,DM_OUT_BUFFER);
if (dwRet != IDOK)
{
/* If failure, cleanup and return failure. */
free(pDevMode);
ClosePrinter(hprinter);
}
pDevMode->dmOrientation=m_orientation;
pDevMode->dmCopies=m_copies;
dwRet=DocumentProperties
(NULL,hprinter,printername,pDevMode,pDevMode,DM_IN_BUFFER|DM_OUT_BUFFER);
if(dwRet!=IDOK)
{
MessageBox("properties initialization error","error",MB_OK);
}
}
please help it's urgent
|
|
|
|
|
hi
i am wiritng my own print dialogbox. on that i place the controls for setting properties. i like to set that properties to selected printer. i wrote below code. but printer doesn't set the user selected properties . please correct the code where i am wrong. otherwise please give guidence
Thank you
void CmyPrintSetup::OnButPrint()
{
// TODO: Add your control notification handler code here
unsigned char temp[32];
DEVMODE *devout,*devin;
DWORD dwNeeded,dwRet;
DEVMODE* pDevMode;
if(!OpenPrinter(printername,&hprinter,NULL))
MessageBox("Printer can't be opened","error",MB_OK);
dwNeeded=DocumentProperties(NULL,hprinter,printername,NULL,NULL,0);
pDevMode=(DEVMODE*)malloc(dwNeeded);
dwRet=DocumentProperties
(NULL,hprinter,printername,pDevMode,NULL,DM_OUT_BUFFER);
if (dwRet != IDOK)
{
/* If failure, cleanup and return failure. */
free(pDevMode);
ClosePrinter(hprinter);
}
pDevMode->dmOrientation=m_orientation;
pDevMode->dmCopies=m_copies;
dwRet=DocumentProperties
(NULL,hprinter,printername,pDevMode,pDevMode,DM_IN_BUFFER|DM_OUT_BUFFER);
if(dwRet!=IDOK)
{
MessageBox("properties initialization error","error",MB_OK);
}
}
please help it's urgent
|
|
|
|
|
hi,
3 questions.
1.how to display symbols in listbox text like the wave equation?formatting the string using the ascii octal just gives a box in place of the symbol.
2.how to add tabs in a string and not get black boxes when displayed in a list box.
3.how to set the precision for floats.i have to display say 1.23 and not 1.23046.
where can i find good illustrated examples of printf family?
thanx.
|
|
|
|
|
1. I presume you need to owner draw
2. \t is a tab, if it won't show, the answer again is owner draw
3. ostringstream will do that for you, so will printf, you can use printf if you don't care about safety, or if you're especially worried about exe size.
examples of printf abound in the MSDN.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
1. you'll probably have to draw them yourself (see "owner-drawn" listbox)
2. see 1, or replace the tabs with spaces
3. MSDN, any book on C, etc.. but, if you want to limit the number of decimal places, use this notation: %.3f . this will give you three digits after the decimal.
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
hi,
i am just not getting how to make a help file like all those softwares.the msdn is too cryptic for me .can any one guide in simple steps.what are all those arrays etc?
i also don't find any articles or demo projects or even queries about that here.
Alex
|
|
|
|
|