|
hi
refer the links
http://www.codeproject.com/cpp/unicode.asp
http://www.codeguru.com/forum/showthread.php?t=326350
regards
Vallikumar A
|
|
|
|
|
Not quite what I'm looking for but thanks anyway for taking the time.
|
|
|
|
|
Hi everybody... did any of you work with GetTextExtentPoint32 or GetTextMetrics? 'cause I'm having a weird issue with this stuff.
I got a BOLD font... created with CreateFont and I specified at Weight the value 900 which should be ultra bold... Black. But when I call GetTextMetrics to retrieve it's data, the tmOverhang member is always 0.
<br />
hdcControl = GetDC(hwndControl);<br />
GetTextMetrics(hdcControl, &tmControl);<br />
If I do then GetTextExtentPoint32 on my text (it's about 20 letters), it will erroneously give me a bigger pixel size than I need (with a surplus of about 30 pixels). So I guess I should use tmOverhang to counter-act that surplus, but how can I do it if tmOverhang is always 0!?
Thank you ::- ).
|
|
|
|
|
|
Calculating its total width in pixels. GetTextExtentPoint32 returns stupid values.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Problem solved, don't bother with it any more (it was a problem between the chair and the keyboard).
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
|
How do you get the ntfs permissions of a share, i have used NetShareEnum to get the file share permissions and the other information about the shares.
Any help?
Kelvin Chikomo
|
|
|
|
|
Hi all,
In my application I'm reading a file which is present in the project workspace .
when the exe is copied to the desktop from the debug folder and run from there, I'm getting an error message which says,"THE FILE COULD NOT BE OPENED"
How do i make the exe to look in to a specfic folder where i've kept the files? Thanks in Advance.
Rajeev
|
|
|
|
|
rajeev82 wrote: when the exe is copied to the desktop from the debug folder and run from there, I'm getting an error message which says,"THE FILE COULD NOT BE OPENED"
Yeah this will happen because the exe looks for files in it's path i.e the path from where it started up(not always) i.e. desktop. You've got to mention the filename path to solve this.
Or else you can do this.
Put the file where the exe is.
Then you use this function to get the path of the exe:
GetModuleFileName(...)
Append this path to the file name. Then it will work always.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hi,
If you have a file other than your application's folder, then you should tell the exact path statically to your application.
If you are storing the file in your application or temporary or system folders then you can use functions to get the file's folder.
regards
Vallikumar A
|
|
|
|
|
rajeev82 wrote: How do i make the exe to look in to a specfic folder where i've kept the files? Thanks in Advance.
try SetCurrentDirectory and GetCurrentDirectory api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi
rajeev how ru ?
If u r using the CFile class then
try this .
CFile file;
CFileException fe;
if (!("C:\\Test.xml", CFile::modeCreate |CFile::modeReadWrite | CFile::shareExclusive, &fe))
{
//handle the exception
}
Vikas Amin
Embin Technology
Bombay
-- modified at 8:15 Wednesday 18th January, 2006
|
|
|
|
|
i am making a application to capture remote desktop and this approximately complete but a problem is that i want full desktop of server side.
i have use a window so it show the desktop in only client area so i want to hide title bar and status bar.
please reply ASAP.
Bankey Khandelwal
Software Engineer
Solversa TechnologiesPvt.Ltd.
15,Yeshwant Nagar
Range Hill Road
Ganeshkhind,Pune-03
bankey.khandelwal@solversa.com
Mobile: +91-9850432990
Office : +91-20-25521888
|
|
|
|
|
|
Try messing with the windows styles. e.g.
HWND hWnd = ::CreateWindow("EDIT", "Hello", WS_POPUP|WS_VISIBLE, 0, 0, 100, 100, NULL, NULL, theApp.m_hInstance, NULL);
Makes window with no title bar and such.
Steve
|
|
|
|
|
Hi
I've created a MFC activeX control in vc++ 6.0. I am using that control in vb 6. I am catching the events fired by the control in the VB application. The problem
is that when i step through the application in VB i catch all the events thrown by the control however when i compile the application and run it i am unable to catch the events. Also when i debug the application in Visual C++ i can see that the events are being fired properly but VB application does not respond appropriately. Any body know why this might be happening?
Thanks
|
|
|
|
|
How to prevent a modal dialog from closing when we hit ESC key?
Thanks in advance,
Sarvan AL
|
|
|
|
|
Hi
While pressing ESC key by default ID_CANCEL(OnCancel) message is calling.
So write code inside OnCancel() to prevent this. Check the keypressed and if it is ESC key then dont call CDialog::OnCancel();
regards
Vallikumar A
|
|
|
|
|
Thanks Mr Vallikumar.
I've not thought of that.
Sarvan AL
|
|
|
|
|
vallikumar wrote: Check the keypressed and if it is ESC key then dont call CDialog::OnCancel()
OnCancel will be called when Esc is pressed or the Cancel button with the id IDCANCEL is clicked.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
The IsDialogMessage API provides this functionality. You would have to filter the messages passed to it - this will not be possible for dialog in general as you have not got access to the message pump. An alternative, if you can't use this technique, would be to use hooks (SetWindowsHookEx ).
Steve
|
|
|
|
|
|
The other guys have a point - My solution was like killing a gnat with a sledgehammer. Perhaps just use the GetAsyncKeyState to see if the escape key is down in a OnCancel overide.
|
|
|
|
|
Going after a gnat with a sledgehammer is always fun!
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|