|
what don't you have in it ?
what are you trying to do that it doesn't explain ?
if you don't give us a concrete example, we won't be able to help much
|
|
|
|
|
Sakthiu wrote: How do i compile a cpp program using cl.exe ?
How about:
cl somefile.cpp Obviously this is a very simplistic example. You'll need to add your own compiler switches (as has already been given to you).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello!!
i have multiple childs in my application.
some calls at click events and some are static.
I want to communicate two child dialog. event created dialog communicate with static dialog
e.g.
suppose i have one child dialog which contian the listview control (static dialog or global dialog).
now when i click on menu item dialog .its create new dynamic dialog which contain combo box.
on the CBN_SELCHANGE event. i open the fileopen dialog and i want to add file in the listview containg dialog(static dialog).
can any body help me?
Thank you
modified at 8:13 Wednesday 24th January, 2007
For that i have written the following code.
POINT point;
point.x=126;
point.y=83;
HWND hwndListboxDlg = ChildWindowFromPoint(GetParent(hDlg),point);
HWND hwndListbox = GetDlgItem(hwndListboxDlg,IDC_LIST4);
LRESULT iCount=ListView_GetItemCount(hwndListbox);
When i debug the application its find the handle for hwndListboxDlg ,but unable to find the
IDC_LIST4.
Amit
-- modified at 8:20 Wednesday 24th January, 2007
|
|
|
|
|
Hello!
I am using the following Function to draw text to a screen:
Status DrawString( const WCHAR *string,
INT length,
const Font *font,
const PointF &origin,
const StringFormat *stringFormat,
const Brush *brush
);
Works fine, but there is one major problem : even if I use PointF(0,0) as origin, the text is displayed with an x-offset (the concrete width in pixel seems to depend on the Font-Object I use within the DrawString - Function).
Any Solution about that? Is this a known bug or even a feature?
Thanks in advance!
-- modified at 6:43 Wednesday 24th January, 2007
|
|
|
|
|
_NielsB wrote: the text is displayed with an x-offset
How much of an x offset?
|
|
|
|
|
As I wrote, it seems to depends on the Font that is in use within the function call.
|
|
|
|
|
i am new to mfc.
i my application i am usind CTime object. i need to store time beyond 1st jan 2038 in that object. I guess CTime object wont be able to store values beyond 1st jan 2038 , so what other options i have ,,, say i want to store year value as 2150.
pls help
Vikram
|
|
|
|
|
Try using COleDateTime instead.
|
|
|
|
|
thanks ... COleDatetime seems to be working fine..
|
|
|
|
|
vikram Verma wrote: i need to store time beyond 1st jan 2038 in that object
As the other guy said use COleDateTime, but do not use COleDateTime::GetCurrentTime...
From MSDN...
COleDateTime::GetCurrentTime. The current implementation calls the C run-time function time, which returns a time_t. This limitation isn't currently documented—it presumably took Chris's digging through the Microsoft Foundation Classes (MFC) source code to find it. (As Dr. GUI says, "Use the source, Luke!") Good job. Don't use this function if you need to be year 2038 compliant. Note also that COleDateTime has a constructor and assignment operator that take a time_t—don't use those either.
A suitable replacement will be GetLocalTime.
|
|
|
|
|
Thanks .... .. for my app COleDatetime Seems to be working fine... But would like to find a better option.
|
|
|
|
|
Hi,
I am working on a project that requires to generate a report after some testing. The report will include some text, one or two pictures and some tables. The dev environment is Visual C++. Did anyone ever work on similar task before? Is there any controls that I can use? Or is there any articles with detailed intro on how to accomplish it?
Thanks a lot!
David
|
|
|
|
|
you mean, like a log file, or you want graphics, statistics, etc...?
have you considered using Crystal Reports then ?
|
|
|
|
|
The report has to be generated directly from the app, and it could be a Word file or pdf file. The content will inlcude text, graphics and tables.
|
|
|
|
|
|
Hi,
I have a dialog application without titlebar. i want to know, when the user clicks on the taskbar button which event is posted to the application.
thanks in advance.
Omar Lodhi
|
|
|
|
|
what do you want ? move the dialog draging from anywhere in the dialog, don't you ?
handle WM_NCHITTEST
ps: when you ask for some help, please give a more explicit title to the thread. "Need Help" is not valid, as everyone asking a question here needs help
|
|
|
|
|
OmarLodhi wrote: I have a dialog application without titlebar. i want to know, when the user clicks on the taskbar button which event is posted to the application.
WM_ACTIVATE, WM_ACTIVATEAPP
|
|
|
|
|
spPropChangeParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
spPropChangeParams.ClassInstallHeader.InstallFunction = DIF_PROPERTYCHANGE;
spPropChangeParams.Scope = DICS_FLAG_GLOBAL;
spPropChangeParams.StateChange = DICS_DISABLE;
spPropChangeParams.HwProfile = 0;
if ( !SetupDiSetClassInstallParams(hDevInfo, &spDevInfoData, (SP_CLASSINSTALL_HEADER*) &spPropChangeParams, sizeof(spPropChangeParams)) )
{;}
else if ( !SetupDiCallClassInstaller(DIF_PROPERTYCHANGE, hDevInfo, &spDevInfoData) )
{;}
Hi all,
Iam using above code to disable memory stick. It is working fine. But When any files are opened in the meomry stick it is not able to disabling memory stick.. Any help on this is greatly appreciated...
Thanks
--pavan
|
|
|
|
|
pavan_sw wrote: ut When any files are opened in the meomry stick it is not able to disabling memory stick.
This is the intended behaiviour: The user is asked to close all files on the stick.
When your program has opened the files by itself, it can also close all files from the stick and try dismounting again.
If you have not opened the files, but another process has, maybe you can quit the processes holding the files open?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Thanks, Then how to identify which process(s) using files on memory stick.
|
|
|
|
|
I am trying to hook windows messages whenever there is a z-order change. I have been able to do that successfully when the window to be hooked is the active window. It get WM_ACTIVATEAPP and WM_WINDOWPOSCHANGING. But no message is received when the window hooked is out of focus.
Please help how can this event be trapped.
drai
|
|
|
|
|
Hi all,
I would like to know api or classes for Closing manually opened files in a specific drive in windows
Any suggestions on above are greatly appreciated...
Thanks
-pavan
|
|
|
|
|
how are these files opened ?
in general, the application that is opening a file is intended to close it then !
|
|
|
|
|
These files are opened by manually(with keyboard or mouse). I want to close them programatically
|
|
|
|