|
Thanx Prasad, that answers my question ...
Only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi,
I'm fairly new to the socket programming.
How to update the data getting from socket into database?
Please help me.
Regards,
Ravi Shankar.S
|
|
|
|
|
I want to make installer of my project. I want to integrate msxml6.dll with my project.
as far as i know there are two ways in which i can instanciate msxml6.dll object.
1. Put it in system32 so it can be retrieved by application at run time : But this will break if someone elese updates it or repairs OS.
2. Put it in my program directory, make a registry entry in my namespace and While instanciating [CreateInstance()] I supply exact path (from registry) of DLL to be instanciated.
Now, I am not sure about how second option to be coded.
Is there any other approach ?
I went through tutorial given by msdn for the same. The have merge module for msxml4. I am not sure how to do it for msxml6. Please help.
|
|
|
|
|
You shouldn't be installing MSXML yourself. Use the redistributable installer from MS.
|
|
|
|
|
Its true,
But say, client system does not have msxml6 and i want to install it then they have given a method of using merge module. Which i can put it in my installer. But as you can see its for msxml4. Any idea how to doit ? do u hav any documentation for the same ?
Check my previou link for msxml4 merge module.
thnx for reply,
|
|
|
|
|
Hi,
my string is CString STemp="PV SV MD";
I have to check whether SV or PV or MD is present in the string.
if(PV is present)
{
certain functions;
}
if(SV is present)
{
}
I have to check the presence of any two characters in a string.How can i make this?
I use Find() but it gives the position but i want a particular character.
Any function is there??Pls...
Anu
|
|
|
|
|
Anu_Bala wrote: I use Find() but it gives the position but i want a particular character.
PV or SV you mentioned are strings.
Anu_Bala wrote: I use Find() but it gives the position but i want a particular character
Whats problem with this ? if Find return -1, string is not present, other wise its there.
|
|
|
|
|
Ya, i used Find().
I need one more help that is my string reads like this
"pv m3 PV|| sv m3 SV||MD||"
here i want to extract the string " sv m3 " from the above string.The number of characters may vary.But space and new line are used to seperate the words.
Pls help me out.
I think u get my point.
Anu
|
|
|
|
|
Anu_Bala wrote: here i want to extract the string " sv m3 " from the above string
Then whats problem with Find ?
Anu_Bala wrote: The number of characters may vary
I assume you want to say, it can "SV m3 SV",is it?,
|
|
|
|
|
Thanks for reply..
I explain you my need in details.
First the string is like this sTemp="sub m3 PV||add m3 SV||MD||"
Then i have to extract few things and i have to put in to seperate string
Final String, CString StrFinal = "PV||SV||MD"
I know to extract first two things i.e., sub m3
i did like this
int pos2 = sTemp.Find("\n");
sTemp3 = sTemp.Mid(pos2-3);
sTemp=sTemp3;
here STemp = PV||add m3 SV||MD
And then i have to extract add and m3.
But i dont know to extract the middle add m3 . i need this thing
Anu
|
|
|
|
|
Cant you use same logic? i.e.
I assume each sub string you mentioned here is preceded by '\n'.
And what does || stands for ? Is it a kind of separator ? If yes, you can use it,too.
i.e. Find "||" and extarct 2 chararacters preceding it.
Keep appending result string.
|
|
|
|
|
Do you need to get a middle a string like your example?
|
|
|
|
|
Yes,that || is a newline character which is displayed like this in our coding.
Anu
|
|
|
|
|
Is it possible for you to find space between add m3 or you dont have a space in your string
|
|
|
|
|
Hi,
You can use Strcmp function to compare two strings.
Regards
Velayudhan
|
|
|
|
|
use CString::Find if your string isnt exist return value of Find is -1 else its location of string
|
|
|
|
|
I found that some *.cpl have exported many useful functions.
how colud I launch some export function?
for example:
in firewall.cpl,there are some export functions:
CPlApplet
Install
ShowControlPanel
ShowNotificationDialogW
Uninstall
Thank you
|
|
|
|
|
Run control.exe to launch an applet, for example:
control %systemroot%\system32\firewall.cpl
|
|
|
|
|
Thank you. I knew how to launch an applet.
I mean how to launch an export function of an applet.
|
|
|
|
|
I have a strange problem within a CDialogBar. I need to paint some text in a different font, so I used a static box which I paint over. I capture the WM_PAINT message as OnPaint().
What I intended to do was invalidate the static box to cause a paint command, then inside the SetPatInfo() routine (inside the paint), validate the static box. There seems to be a timing problem as first my routine draws to the box and then another message comes along which updates the static box.
I can verify this by making the CDialogBar disappear from the screen and then reappear, in which case there is no invalid area and just my update is performed under the OnPaint().
I went farther to prove it by invalidating just 1/2 of the box in which case only 1/2 of the box is overwritten after I update it. My question is: why doesn't validateRect stop the second update and where is the second update coming from?
A solution to the problem is to update a single pixel in the corner of the box, but I want to know what is going on and why. Here are some code snippets:
void CMyToolbar::OnPaint()
{
CPaintDC dc(this); // device context for painting
SetPatInfo();
}
void CMyToolbar::Invalidate(void)
{
CWnd *wnd1;
CRect rc1;
wnd1 = GetDlgItem(IDC_PATINFO);
wnd1->GetClientRect(&rc1);
rc1.right /= 2; // for test, invalid 1/2 of rectangle
wnd1->InvalidateRect(rc1,0);
}
void CMyToolbar::SetPatInfo(void)
{
.....
wnd1 = GetDlgItem(IDC_PATINFO);
pDC = wnd1->GetDC();
.....
wnd1->GetClientRect(&rc1);
wnd1->ValidateRect(NULL); // NULL validates the whole window
sz1.cx = rc1.right;
sz1.cy = rc1.bottom;
br1.CreateSolidBrush(bkgColor);
pDC->FillRect(rc1, &br1);
.....
}
Any suggestions to telling me what is going on here would be appreciated.
Ilan
|
|
|
|
|
try Validating the rect after completing drawing operation i.e. call ValidateRect after calling FillRect .
|
|
|
|
|
Ovidiu answered my question in previous question which I unfortunately didn't see until after posting this message. His answer is:
As long as you have not handled WM_PAINT in the static control, but you draw text in it from another place, for sure you'll have troubles after another window will overlap; just test it and see if I'm right.
Ovidiu
He is ABSOLUTELY right and now I have to figure out how I can handle just the WM_PAINT for that static control. I see a WM_PAINT for the DialogBar but I can't find a separate one for just the static control.
BTW, in answer to my response, it makes no difference if I do the validateRect before or after the FillRect. I'm sure Ovidiu is on the right track, but I just have to figure out how to do it.
|
|
|
|
|
quite right.
I think you need to override CStatic class to use in you app.
|
|
|
|
|
I would like to know how to write a hidden program (it will not display in the task bar).
Please help!
|
|
|
|
|
Try using the WS_EX_TOOLWINDOW extended style when you create your window.
- S
50 cups of coffee and you know it's on!
|
|
|
|