|
i am not struggling to find desktop path,problem is delete shortcut file.So plz give me tips to do that.
Thanks for reply
|
|
|
|
|
Read the first bit of my post. I repeat: "What is wrong with DeleteFile" ?
CString s = szPathDesktop;
s += _T("\\myshortcut.lnk");
if (!DeleteFile (s))
{
dw = GetLastError ();
}
Iain.
|
|
|
|
|
Hi all,
I am facing one problem with my application.
I am using "hnwse.cur" by adding it into resource
code is like
HCURSOR hDragCur = (HCURSOR)LoadImage(_AtlBaseModule.m_hInst, (LPCWSTR)MAKEINTRESOURCE(IDC_HAND_CURSOR),IMAGE_CURSOR, 28, 28, LR_DEFAULTCOLOR);
if(hDragCur)
SetCursor(hDragCur);
This is working fine in Xp but in vista it is showing black hand cursor.
Can any buddy please help me to resolve this problem.
|
|
|
|
|
I wnat to know how can i create a series of edit boxes dynamically.
for exampe in a dialog box there is an edit box and a button. i type in 5 in the edit box and enter the button,
once i click on the button 5 edit box should be created dynamically.. is it possible to do it?
|
|
|
|
|
Yes, take a look at CEdit::Create[^] (BTW, all windows can be created this way).
|
|
|
|
|
Mission Accomplished
Thanks
|
|
|
|
|
Hello,
I need to work with DNS primary lookup zone, rigth now I'm doing it by calling shell, anyone knows which dll should I use to add/remove records?
Thanks in advance
Paolo
|
|
|
|
|
You can use the IP Helper API[^] to add/remove DNS lookup zones. I believe there are some samples of its usage here on codeproject.
Best Wishes,
-David Delaune
|
|
|
|
|
Hiii dear all,
How to compair two GUIds apart from making them const string and then perform strcmp.
Thank you
vikas da
|
|
|
|
|
I would recommend using memcmp()[^]
memcmp(&guidOld, &guid, sizeof(GUID));
Best Wishes,
-David Delaune
|
|
|
|
|
You can also use the == operator on two GUIDs since VC++ has
a built-in overload for comparing GUIDs.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
And he could also use IsEqualGUID [^]. So many choices, whats a software engineer to do? Read the documentation maybe?
-David Delaune
|
|
|
|
|
Randor wrote: Read the documentation maybe?
Maybe
Randor wrote: And he could also use IsEqualGUID [^].
It looks like that's what the compiled == code calls, which eventually uses memcmp().
Wow...so many choices! Heh
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks alot..initially i was having only one choice now i have many ...
Thanks alot...
vikas da
|
|
|
|
|
I have create a rich edit control and use the EM_SETZOOM message to scale the text in the control.
code :
1, #define _RICHED_VER 0x0300
2, Create the rich edit control, the handle of the control is m_RichCtrl;
3, SendMessage(m_RichCtrl,EM_SETZOOM,2,10);
but it seems that the EM_SETZOOM message doesn't take effect,why?
|
|
|
|
|
Hi,
I am working on an mfc application in which there is a chat module.
My CRichEditCtrl is able to display chinese, arabic, hindi and several other languages.
But it is not possible to display languages such as Urdu, Bengali, Gujrati Tamil etc.
What can be the possible reason.
Thanks In Advance
Dhiraj
|
|
|
|
|
Are you missing fonts for these languages?
-Saurabh
|
|
|
|
|
Actually I am copying urdu bengali and tamil text from google and pasting it in Edit control till here it is fine but it is not getting displayed in the CRichEditCtrl.
Thanks
Dhiraj
|
|
|
|
|
Hey Wizards,
I need some assistance in finding some "C", (NO MFC) source code that
will do the following:
1) Find out it Daylight Savings Time is on.
2) calculate the start and end dates of daylight savings time.
3) incorporate the US/Canada changes for the new start and end dates
of daylight savings time.
4) Retrieve the timezone you are in.
5) have all this done in simple "C" code. No "C" MFC code.
I can't seem to find this source code project anywhere on the Internet, and NO, this is not homework. It is for a project of mine.
Any help would surely be appreciated. Thanks!
"BaseCarrier"
|
|
|
|
|
Don't really know if this helps in your cause but did you have a look at extern int _daylight;
extern long _timezone;
extern char *_tzname[2]; in time.h
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Good morning.
to check if dayligh saving is on i use the reading of a registry value.
Key: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation
Value: DisableAutoDaylightTimeSet [DWORD]
if the value exist and is egal to 1 then the Daylight Saving option is ON.
[Actually i do not remember where i have found that (may be here)]
For the time zone you are in you can use the Win32 methods
_gmtime32_s and _localtime32_s and you make the difference.
you will have the current value for the time zone.
Hope this will help
Regards
Franck
|
|
|
|
|
Thank you David.
If I include those header files in .cpp file, then the compiler generates the error as it doesn't find the header file for CObject in MyClass.h file.Again if I include afx.h (which is usually indirectly included by stdafx.h in MyClass.h file in order to solve, the error "compiler limit: internal heap limit is reached " is once again generated.
Taruni
|
|
|
|
|
Is this a reply to someone?
Either codeproject database has messed up (which would not be the first time), or you have!
Iain.
|
|
|
|
|
I am drawing a line over a picture background. Color of line can be any thing. I want to erase the same line by redrawing it again with same coordinate. I already have used 'CDC::SetROP2(R2_XORPEN)' but it has following flaws
1. It works on background with uniform color.
2. Resulting color of line depends on background color.
3. If background has a picture, color of line varies pixel to pixel of picture.
I simply want, how to draw/erase a line over any background, as Windows Paintbrush Application.
modified on Friday, November 21, 2008 12:35 AM
|
|
|
|
|
You can simply redraw everyting under the line and then not draw the line on them.
|
|
|
|