|
Hi Guys,
How to handle large string greater than what CString Handle's.
Thanks in Advance
Hussain
|
|
|
|
|
From the Visual C++ 6 help:
"A CString object can store up to INT_MAX (2,147,483,647) characters..."
Maybe you need something different? When did you find limits?
|
|
|
|
|
Some times I heared that CDoub... Some class with this type of name can store more charchters than CString. I Forgot its name.
Hussain
|
|
|
|
|
MOHAMMED AZGHAR HUSSAIN wrote:
I Forgot its name.
When/if you remember it, post again and we'll discuss it.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi All
Can anyone please let me know how can I create a shared directory using Win32 APIs.
Thanks and Regards
Ram
|
|
|
|
|
call net.exe share <share name="">=<path>
Don't try it, just do it!
|
|
|
|
|
The function I believe you are interested in is NetShareAdd() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The Create function of the MFC CWnd class has a parameter for the ID of window/control. (Almost) all CWnd derived classes have such a parameter.
When I create a control dynamically, do I have to specify a correct ID or can I just fill in any value (e.g. 0 or -1)? Is this ID actually used? and if so, for what is it used and how do I obtain the next available ID?
|
|
|
|
|
You can specify any ID you want to. The normal ID used for 'don't care' is IDC_STATIC (-1).
The ID will be used if you want to retrieve the control by its ID, such as when calling GetDlgItem , GetDlgItemText , SetDlgItemText , etc.
The only way you could get the 'next available ID' would be to walk the window's child controls using GetWindow (get the first with GW_CHILD, then use GW_HWNDNEXT to get subsequent children) calling GetDlgCtrlID on each one.
|
|
|
|
|
Dear All,
I am developing an application in MFC VC++ Version 6.0 for Windows 2000. I start my application as soon as the system logs on, by giving the path of my exe in Run field i.e.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
I want to run my program in safe mode also. But unfortunately my program doesnot starts in the safe mode automatically because Run entry in registy doesnot work in this case.
Please suggest any way to run my application in safe mode also.
Feel free to ask any further queries in this regards,
Thanks
Rohit Dhamija
|
|
|
|
|
I would say that what you're trying to achieve is impossible. You'd need to re-create your application as a service, then rebuild the Windows Kernel to start up your service when it boots to safe mode.
And actually, I am happy that this is the way it works. Think for a moment what would happen if a virus got to your Windows and made itself start no matter where you booted ? In Windows XP/2000, this problem would be pretty sh*tty indeed
Greets,
Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi,
I am developing an application where i need to serialize the XML files, which I have on my local hard disk with the XML files at my server. I am also using Rijndael algorithm to encrypt the files. Please suggest me how to go ahead with it as i don't have any idea on serializing data.. I want to mirror all the changes st server XML files to the local ones. If i can do it when the files are encrypted is the best. If not then I have to decrypt and then modify it..by serializing..and then encrypt it..again.. Please help me out..
Any help or pointers are highly apprecaited..I am using MFC..for doing the same..
Thanks a lot in advance..
Regards,
Himanshu
|
|
|
|
|
i am one project where i have to transfer controls data between two dialog.
i can manage to send the data from ist dialog to second
like this...
CMyDialog2 m_mydlg2;
m_mydlg2.myvariable2=myvariable1;
m_mydialog2.DoModal();
this works correctly
but now i need to get the data of second dialog in first one
after closing the second dialog
can anyone help me for that
thax
|
|
|
|
|
CMyDialog2 m_mydlg2;
m_mydlg2.myvariable2=myvariable1;
int nRet = m_mydialog2.DoModal();
if(nRet == IDOK) // if okay was clicked get the data from the dialog
{
myvariable1 = m_mydialog2.myvariable2; // get the variable back out of the dialog
}
Michael
|
|
|
|
|
Use Michaels's suggestion, or pass a pointer to the second dialog, as in:
m_mydlg2.myptrvariable2 = &myvariable1; Now when myptrvariable2 is modified in the second dialog, the first dialog will automatically "see" the change(s).
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How can a self-extracting file get parameter from html ?
Hi, guys:
I've developed a dll together with several other files and I want to put them onto my website so that anyone visits it will download a self-extracting file, when the download is finished all the files should be extracted into a system directory, say c:\winnt\system\foo, and the indicated main exe file will start automatically.
The problem is how can I get some parameters from the html page? The famous PackageForTheWeb can do most work for me but I still do not know anything about the parameters.
Thanks for your patience and any help is much appreciating.
TIA
|
|
|
|
|
What parameters? Post examples. In general, the client downloads the self-extracting file and then executes it.
Kuphryn
|
|
|
|
|
I know this is more of a WTL question, but I figured it could be answered here more quickly. If not then sorry for posting this here. I see many people with code using WTL that have docking windows (like VS.NET) and I wanted to know if WTL actually has a docking window class or if they've all simply been created from scratch.
If they are created from scratch does anyone know why everyone uses WTL to do it? I've never seen docking windows (like VS.NET) created with anything other than WTL.
Thanks in advance.
- monrobot13
|
|
|
|
|
unsigned char *px = new unsigned char[bm.bmHeight*bm.bmWidthBytes];
bitmap->GetBitmapBits(bm.bmHeight*bm.bmWidthBytes,px);
Please, tell me the color format of the px above.
Thank you,anyway!
Hello World!
|
|
|
|
|
Won't work. For starters, some formats have extra bytes of padding on the end of each scanline, so your size could be wrong.
However, if bmWidthBytes is accurate, then it's easy.
bmWidthByte value color format
1 paletised, could be 1, 4 or 8 bit
2 16 bit
3 24 bit
4 32 bit ( but the last 8 are ignored.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
unsigned char *px = new unsigned char[bm.bmHeight*bm.bmWidthBytes];
bitmap->GetBitmapBits(bm.bmHeight*bm.bmWidthBytes,px);
i found px[2] is a red color BYTE.
whereas px[0] and px[1] is what color BYTE.
Thank you!
Hello World!
|
|
|
|
|
Windows generally stores 24 and 32 bit images as BGR, rather than RGB.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
unsigned char *px = new unsigned char[bm.bmHeight*bm.bmWidthBytes];
bitmap->GetBitmapBits(bm.bmHeight*bm.bmWidthBytes,px);
if my image is 24 bit, the px array is stored as neither BGR nor RGB.
why so?
Thank you!
Hello World!
|
|
|
|
|
The only possible reaon I can think of is my first hunch - GetBitmapBits does not work. Actually, I think it does, only if your bitmap is a DIBSection.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hello, everyone!
How to get network interface name of local machine? For example, the value of my machine is "NDIS 5.0 driver" and "MS TCP Loopback interface".
Thanks in advance,
Geo
|
|
|
|