|
probably the most accurate closing of app is this
HANDLE handle
DWORD lpExitCode;
handle=GetCurrentProcess();
GetExitCodeProcess(handle,&lpExitCode);
TerminateProcess(handle,lpExitCode);
Clean Exit right ?
gabby
|
|
|
|
|
try using
AfxGetMainWnd()->PostQuitMessage(0);
good luck
Imtiaz Qureshi
|
|
|
|
|
AfxGetApp()->GetMainWnd()->PostMessage(WM_CLOSE);
INTP
|
|
|
|
|
THANKS TO ALL!!!
Thank you very very very much!! (Sorry for my late Answer!!!) It works great!!
Thanks!!
Ronny
|
|
|
|
|
A doc file has some properties called summary and i want to do this in my app, in fact my app works with rtf files.For example i have enter some properties like title and i saw that Microsoft put them at the end of the doc file wnhen you press CTRL+Q in Windows Commander.I want to do the same in my app.Does somebody know how can i do this.Every suggestion is appreciated.Thanks a lot.
|
|
|
|
|
Hi friends,
I am saving my reports in excel. First i format my reports in html tags and then open the html files as excel file programattically. The problem is Excel worksheet can hold only 65535 rows. My reports have enormous data to save. So i am generating multiple html files with the max of 65500 rows.
Now , i need to know how to convert the html files into excel worksheets of a single excel workbook.
Please help me out.
Thanks in advance
Kumari
|
|
|
|
|
HI,
How can i add TOOL bar in MFC dailog based window.
Not in SDI or other only in MFC dialog based
send me sample or code
thanx
|
|
|
|
|
|
thanx it helped me ..
But if i want to add my images in Tool Bar.
for example myown BMP / JPG etc..
how can i do it.
BCoz i cannot draw image in the ToolBar editor ..
wt is the way to insert my own image in tool bar.
and of wt type of image i can insert into it ,, e.g.
BMP or JPG . or ICON .???
thanx
|
|
|
|
|
You'll find a ton of articles on toolbars here:
http://www.codeproject.com/docking/[^].
As I don't know why you can't use the toolbar editor - only 16 colors? want to load dynamically? - I really don't know what article might be of further interest. You might also want to check the bitmap articles on classes for conversions.
|
|
|
|
|
i seem to be having trouble getting keybd_event to simulate keys such as ".!@#$%" anything non-alphanumeric
in some cases it causes some problem like putting the system into standby
my guess is that i need to something else for the scan code, however MSDN says that that parameter is not used, that or there is something that needs to be put in the ExtraInfo parameter other than 0
anyone know how to get around this?
note: im using Windows M.E. and microsofts note about this function being deprecated by SendInput() only applies to Windows NT/2000/XP
|
|
|
|
|
Hi,good day.
I want control USB device in vc program.The USB device's driver have been installed.I know use to WIN32's API function CreateFile(...) open the USB device,and use to WIN32's API function ReadFile(),WriteFile() read or write this device.
I question:
How to use this WIN32's API function to control USB device!
|
|
|
|
|
Visit the usb.org site. Get the IOCTLS you need. Read the documentation. You may need to read the USB specs too.
Bikram Singh
|
|
|
|
|
How to capture and save the selected dialog as ".bmp" in VC++?
Aparna
|
|
|
|
|
|
|
Hi.
I'm trying to use direcdraw in order to make some image processing for a project of my own. In the samples that came with the SDK there is one "stillcap" that I modified, however, it is one shot at time, and what I need is to intercept the stream, to process it, and finally to display it, almost in real time. I don't know so much about directx, so if someone can help me I would appreciate it a lot.
|
|
|
|
|
I'm using the EditBox and ComboBox (with EditBox) controls.
How do you stop it from displaying partial characters (ie characters which can't be completely displayed in the editbox) ? ie. the character at the right of the editbox.
I only want to display whole characters.
Are there any flags which will give me this behaviour ?
|
|
|
|
|
1. if taking a short, fixed-length input, increase the edit box width no?
2. use multi-line edit box
3. For other cases, it can be done, but there is no easy way out. involves getting font width and resizing the edit box accordingly.
more information needed for a better answer: why would you need something like this?
Bikram Singh
|
|
|
|
|
bikram singh wrote:
more information needed for a better answer: why would you need something like this?
If you enter enough text to overfill the editbox (ie. the editbox needs to scroll), when you highlight the text from the end to the beginning, the highlight does not highlight the partial character at the right of the editbox, which apart from looking odd, it doesn't indicate to the user that more text is highlighted, other than what the user can see.
Not a big problem, but more of a user interface issue.
Some applications don't show partial characters, so I'm sure it must be possible, but I just don't know how.
bikram singh wrote:
3. For other cases, it can be done, but there is no easy way out. involves getting font width and resizing the edit box accordingly.
How would this work for non-fixed width characters, like the default MS Sans Serif font ?
|
|
|
|
|
I am facing problem is displaying the set of strings in rich edit control in Jananese/Chinese OS.
I am using rich edit control in my application to display some dynamic text based on some result. I am using WTL for my application development. The code what I have written works fine on eng and other lang OS except lang that supports DBCS. The code would go something like this:
TCHAR szTestName[MAX_PATH];
memset(szTestName, 0, sizeof(szTestName));
TCHAR szTestName[MAX_PATH];
memset(szTestName, 0, sizeof(szTestName));
_tcscpy(szTestName, _T("Test Name"));
_tcscpy(szTestResult, _T("Test Result"));
m_crichEditctrl.AppendText(szTestName);
m_crichEditctrl.AppendText(szLineFeedChar); // "\n"
m_crichEditctrl.AppendText(szTestResult);
Here I am trying to add "Test Name" in the first line and "Test Result" in the second line. The issue what I am facing is the line feed char is getting inserted after char 'm' (in Test Name), I tried even inserted different char other than line feed char, always I get the same problem. When I debugged I found out that SetSel (SetSel/ReplaceSel is called internally by AppendText api of rich edit) always returns one index less and this is taken by ReplaceSel to add the text.
Please note that this problem happens only when I use the translated japanese/chinese chars for "Test Name" and "Test Result". If I just use the english strings as shown in the code it works fine.
Am I missing setting something for the rich edit for other lang OS (especially lang that supports DBCS) except english. Please help me out on this.
Thanks in advance.
Rajeev.
|
|
|
|
|
USe variable of CString type with CEDITCONTROL
and do this
CString show= ur_str_variable + " \n ";
( Value type variable .... m_strCtrlEdit)
m_strCtrlEdit = m_strCtrlEdit + show;
( Control Type Variable ..... m_EditCtrl)
m_EditCtrl . LineScroll(1);
UpdateData(FALSE);
i hope this will work ....
Bcoz when u use UpdateData (FALSE)
it will show the value in the control from its value type variable.
GOOD LUCK
|
|
|
|
|
Is there a way to differentiate between HD's and other various USB devices such as a USB Flash Card?
I'm currently using GetDriveType() == DRIVE_FIXED but it can't tell the difference between HDs and memory sticks etc.
Todd Smith
|
|
|
|
|
|
Hello,
does anyone of you know of a good profiler that runs under Windows 98? Most I found work under 2000/XP only (codeglow, AMD code analyst etc.),or are crap (like LTProf... can't really get it to work on larger projects) . I only own the standard version of MSVC so I don't have the MS profiler. Thanks
|
|
|
|