|
|
This could well be a problem with windows XP itself.
Recently, when I try and shut down my computer when I have applications minimized, some popup a messagebox to ask a question, and XP doesnt show it. You cant switch to the application except through task manager, and then the messagebox is not shown either, and doesn't accept the keyboard input. Only option - Kill it through task manager.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Well......this is Win 2K. But yes --- same problem. This particular program I can redesign but its going to take a bit of work. Cant send it out the way it is............
|
|
|
|
|
Hello,
who can I catch Outlook events, for example
the user creates an new Contact.
I have to react to this events in C++ .
Can someone give me an example, please !
|
|
|
|
|
I don't have a code sample handy but I may be able to get one over the weekend if you want. Basically you have to create a reference to the outlook com object and create an event sink for the new contact event.
|
|
|
|
|
Thank you, that would be great if you would have some code for me.
How can I get the code ?
|
|
|
|
|
|
do you have a simple example for me, how I
can catch creating an new contact.
(I´m not so familar wiht automating outlook)
Thank you,
JohnX
|
|
|
|
|
How to show my dialog application (when restoring it from the system tray) above all non topmost windows?
|
|
|
|
|
SetWindowPos (CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NORESIZE);
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I just created a new Dialog, associated with a class. Now I go into the main Dlg class. Why is the backgroud color in the new dialog when I call DoModal for it a dark grey and it has teh Ok Cancel buttons which do not appear in the Resource file?
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
I have code where I am reading file. After I get the line into buffer I am trying to find first occurence of '*'.
How do I get the data from which is before the first occurence of '*'?
inFile.getline(inBuffer,'~');
char* p = strchr(inBuffer, '*');
|
|
|
|
|
You could temporarily stick a '\0' in it, like so:
char* p = strchr (inBuffer, '*');
if (p != NULL) {
char ch = *p;
*p = '\0';
printf ("Data before * is = %s\n", inBuffer);
*p = ch;
}
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I have one more question. I need to compare this data. Some time the len of the data can be 2 or 3 characters. My question is how do I compare this data if len is changing?
Example:
in file: compare to:
test test
sd sd
|
|
|
|
|
Use strcmp() to compare strings, strlen() to get the length of a string.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
So that means I have to declare 2 variables with 2 and 3 len. I was hoping is theire is somre way to declare 1 variable with 2 character and then in a run time if it's more that 2 char change to 3 char.
|
|
|
|
|
Sorry, I don't understand your question. If you want to test the length of a string, just use strlen() and compare its result to 2 or 3.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Compare with what, exactly?
If you want to compare each pair as "test" and "test", then "sd" vs "sd", then you really need to look at breaking up the input string into separate components (hint: strtok)
Steve S
|
|
|
|
|
Hi,
I am using the GDI+ DrawString() function with a bounding rect
to control the string positioning. While everything looks
great on my view, when I try to print using the same code,
the strings look extremely out of proportion (much larger)
and they don't fit in my rectangles.
Any suggestions?
|
|
|
|
|
maybe you developped in "small fonts" and you tested the application on a system that displays "large fonts". It's usual.
You may create a base dialog that resizes the resources according to a given font (small/large and points). in this base dialog, overload the DoModal function. add the following code:
INT_PTR CBaseDialog::DoModal()
{
CDialogTemplate dlgt;
INT_PTR nResult;
// load dialog template
if (!dlgt.Load(MAKEINTRESOURCE(m_nIDTemplate)))
return -1;
// set the system font
dlgt.SetFont(m_strFontFaceName, m_nPointSize);
// get pointer to the modified dialog template
LPSTR pdata=(LPSTR) GlobalLock(dlgt.m_hTemplate);
// let MFC know that you are using your own template
m_lpszTemplateName=NULL;
InitModalIndirect(pdata);
// display dialog box
nResult=__super::DoModal();
// unlock memory object
GlobalUnlock(dlgt.m_hTemplate);
return nResult;
}
Normaly, according to the size of font, no matter it is large or small, with this overload of DoModal, your dialog boxes will always look the same on any resolutions. the controls will even resize themselves according to the font. if the font system settings change while your application is still running, you may restart your app to apply the new settings.
Best regards.
Bouli.
|
|
|
|
|
No, this is not a matter of large/small fonts, this is happening on the same computer on which I'm developing the program.
BTW, with regard to the small/large fonts problem, I do what most developers do, I simply don't support large fonts displays.
Have no fear of perfection - You will never reach it
|
|
|
|
|
ok,
sorry I could not help you on the DrawString function. I use it in many of my projects, and I never had any problem with it.
I'm happy I could help you to support large/small fonts on your projects. Normally, aware developpers should support it. it's in the white papers of GUI's Windows.
Best regards.
Bouli.
|
|
|
|
|
How do you craete the font that you use to display the text? Post that code here, most likely cause.
Normally you create a device independent font of the same size like this:
int fontSize = -MulDiv(10, pDC->GetDeviceCaps(LOGPIXELSY), 72);
This create a font on a DC with a size of 10. Regards of the DC's DPI
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
hi im Aswin,
i have to create a service which when started acts as a server listening at a particular port. when a client sends a message the server starts process like notepad mspaint etc.
plz explain me the step by step process involved in creating the windows nt services. i know how to create the socket program for server and client .
i need to know how to integrate the socket program with windows nt services.
i have the idea about csocket.
regards
Aswin.N.Paranji
|
|
|
|
|
Check out these articles:Both Pablo and PJN write excellent articles and code.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|