|
no - no PathCompactPath is working properly,
but when we are display this text onto static control then it wont display full text it cuts last two three character.
but it display string properly at the debug time in CString object.
any specific reason behind it?
i am not resizing the static control even too.
thanks
rakesh
|
|
|
|
|
prasad_som wrote: Try using NormalizeRect.
Why would you suggest that? Are negative numbers even a possibility?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
dont set rect.right this way rect.right -= 15;
Set it using CRect::SetRect()
|
|
|
|
|
Ranjoy Guha wrote: dont set rect.right this way rect.right -= 15;
Set it using CRect::SetRect()
This has nothing to do with the problem as the right edge is being shrunk by 15 using either method.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Where is the HDC coming from? You should be passing in an HDC that is associated with the control that you are setting the path into (the static control), not the parent window of the static control.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
The code you have is correct. Just ensure that pWidthWnd and hDC refer to the same control.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
I am working with splitter windows.My requirement is I need to do certain tasks when I adjust(move) the splitters.Is there any event that gets triggered when I adjust the splitters or is there any other approach to do this?
Thanks in advance.
Taruni
|
|
|
|
|
Are these "certain tasks" related to the splitter or to the windows that are panes of the
splitter?
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
No. These tasks are not related to the splitter or to the windows that are panes of the
splitter.I just need to set values to some variables(which are no way related to the splitterwindows) and perform certain calculations and display the output "only when splitters are adjusted".
Taruni
|
|
|
|
|
There's a variety of places...
CSplitterWnd has the virtual methods StartTracking() and StopTracking() which are called at the
start and end of a splitter drag. Overriding these, combined with handling WM_MOUSEMOVE, you
may be able to extract the info you need.
Catching WM_SIZE in the panes won't work since the panes aren't resized until the splitter drag
is complete.
The source code for CSplitterWnd is the best source of info for this
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
hi i am having two tabs of which i have to disable a tab if a flag = 0; how to disable it from the parent dialog.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
Hi All,
i have a sample ADO application when i test through Rational Purify it is showing that there is leak in raw_Open() function.
please give me a suggestion where there is any leak in that?
[I] Summary of all memory leaks... {65488 bytes, 676 blocks}
[I] MPK: Potential memory leak of 18552 bytes from 147 blocks allocated in Connection15::Open(_bstr_t,_bstr_t,_bstr_t,long) [TestMemLeakADOConn.exe]
Offset 0x00000008 referenced by 0x0279ffe0, a location in a HeapAlloc'd block
Distribution of potentially leaked blocks
Allocation location
HeapAlloc [C:\WINDOWS\system32\KERNEL32.dll]
Connection15::Open(_bstr_t,_bstr_t,_bstr_t,long) [d:\samples\testmemleakadoconn\debug\msado15.tli:367]
}
inline HRESULT Connection15::Open ( _bstr_t ConnectionString, _bstr_t UserID, _bstr_t Password, long Options ) {
=> HRESULT _hr = raw_Open(ConnectionString, UserID, Password, Options);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
TestFunction(void) [D:\samples\TestMemLeakADOConn\test.cpp:88]
m_pConn->put_ConnectionTimeout (300);
=> m_pConn->Open(bstrConnect, "","",-1);
_CommandPtr pCmd(__uuidof(Command));
main [D:\samples\TestMemLeakADOConn\test.cpp:171]
Thanks,
Prashanth.v
|
|
|
|
|
Please be patient, and don't repost after just two hours. You will probably get an answer, but the answer might come from someone who is still asleep.
Reposting the same question isn't a good idea.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Please tell me what function i have to use at the palace of strcmp
I know its wrong for matching alphabetic characters is correct or not.
CString sMail;
GetDlgItemText(IDC_EDIT_EMAIL,sMail);
if( (!strcmp("^[A-Za-z0-9\_-]+@[A-Za-z0-9\_-]+.[A-Za-z0-9\_-]+.*", sMail))
{
MessageBox("please enter valid Email");
}
or
Any one told me what method for checking the correct mail id entered from user
mailing me
Yogi
|
|
|
|
|
|
Since no-one gave you a very clear answer or provided a solution...
It looks like you are trying to use a Regular Expression to validate an email address. Neither the CString object nor the strcmp(...) function can perform Regular Expression operations.
You need to find a RegEx engine to do that kind of comparision. boost [^] has one that you can use rather easily and it has good documentation and examples for its use.
Lastly, note that certain characters may be valid in an email address, like #$&-+=! , so you might want to limit validation to something like making sure that it contains one "@ " and at least one ". ". Email addresses should be confirmed, not just verified.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Can i set the size and the x1,y1 of the Frame in an SDI application.
KIRAN PINJARLA
|
|
|
|
|
Have a look at SetWindowPos , MoveWindow .
|
|
|
|
|
Hi,
I have one MFC application some times it gives me error message "A Required resource was" and I have to close application
from taskbar.
Can ayn one tell me what is that and how to ovecome it.
Thanks in advance,
Rushiraj
|
|
|
|
|
rushiraj.jhala wrote: "A Required resource was"
Is this complete error message , you are talking about ?
|
|
|
|
|
Yes,
This is all what I got on messagebox.
thanks,
Rushiraj
|
|
|
|
|
hello,
I created a win32 project(precompiled headers, console application). This was created to create a service( for which i used SERVICE_TABLE_ENTRY, SERVICE_STATUS, SERVICE_STATUS_HANDLE, etc... required structures and methods).
Environment used:
Windows XP, VC++.Net2005.
Should work on:
I want to make this exe to run on windows 95,98, XP, 2000 and Vista.
my stdafx.h file contains:
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
#pragma warning (disable:4430)//... i added this, since i was getting this error. and in msdn this //was given as its solution.
To this project, i have added two more files:
1) USBActivity.h
2) USBActivity.cpp
In USBActivity.cpp the hierarchy of headers included is as follows:
#include "stdafx.h"
#include <initguid.h>
#include "stdio.h"
#include <setupapi.h>
#include <dbt.h>
#include "afxcmn.h"
#include "cfgmgr32.h"
#include "Blowfish_Data_FileEncrpt.h"
#include "USBActivity.h"
The project properties are set as: Use windows Standard libraries, WIN32;_DEBUG;_CONSOLE as preprocessor definitions, Basic Run-TimeChks: Both (/RTC1, equiv. to /RTCsu) , RunTime-Library --> Multi-threaded Debug (/MTd), Use Precompiled Header (/Yu), Linker+AdditionalDependencies-->setupapi.lib.
I am getting following build errors:
Compiling...
stdafx.cpp
Compiling...
Blowfish_Data_FileEncrpt.cpp
DataSentinelService.cpp
d:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier
d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier
d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation
DoubleBuffering.cpp
SHA.cpp
USBActivity.cpp
d:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier
d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier
d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
DataSentinelService - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I guess the error is because of :
--> calling a function in an SDK header file that is currently not supported in current build environment.
Could anybody help me out... in fixing this problem.
I have also seen the project given at the following link: http://www.codeproject.com/system/RemoveDriveByLetter.asp?df=100&forumid=294340&exp=0&select=1822184&tid=1815457#xx1822184xx
Here, it is given in vc++ 6. and when i compared the build environment everything was same.
In order to enumerate enumerate all the USB devices connected to PC, using a windows service... i have to use setupAPI in order to get setupDiGetDevClass etc methods.
I also tried with including windows.h file in stdafx.h. but it was also not helpful. since was included by-default. And on including it again i am getting the following error:
d:\microsoft visual studio 8\vc\atlmfc\include\afxv_w32.h(16) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
Is there any other alternative?
Thanks
Anee
Anee
|
|
|
|
|
anumadhu wrote: #pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include
#include
Choose, ignore html tags option, so that file included will be visible. Modify your post for that.
I feel its causing because of incorrect sequence of include headers.
|
|
|
|
|
yeah, probing towards the cause of this problem, i got two causes:
1) What you said that, the wrong order of include headers.
2) Accessing the SDK files from a application(my application) which does not support current build environment.
I am using VC++.Net2005 and Windows XP. I have tried lot many options of including the order of headers.. but none of them was much helpful.
And coming to not supporting build environment, i don understand how to get into its solution.
Do you have any clue or idea.
Thanks
Anee
Anee
|
|
|
|