|
|
:(I am making a C++ project on dialog base using MySql database. When I build it an error message appears:"C:\User\C++\SqlDialog\mysql.h(5) : fatal error C1083: Cannot open include file: 'afxdtctl.h': No such file or directory". I checked. There is no such header file in my computer. I use MS Dev.studio, rev. 5.
Pls. help me to solve my problem!!
|
|
|
|
|
I have been unable to pass a value from one class to the other in an SDI application in MFC. I tried it by declaring a static variable in a header file and then including this header file in both the classes.Then by incrementing value in one class and I tried to get in in the other class. That is not working properly. It is not updating the value.
Plz suggest me how to do it(i.e pass val. from one dialog to the other );
Suggest me the easiest ways of doing so. Because I am a beginner in VC++ so kindly guide me step by step.
Reply me soon
|
|
|
|
|
Same problem i am facing.
|
|
|
|
|
I want to incorporate a property sheet and pages in side a Form view.
Any solution??
With Thanks and Regards
--Kamesh
|
|
|
|
|
You need to do the following:
1) Add a frame control with ID_PLACEHOLDER into your dialog and use it to define size and position of the property sheet in your form/dialog.
2) In OnInitialUpdate() method of your form class use the following to create the property sheet (m_sheet is a member of the form class, a pointer to a property sheet class ):
CWnd* pwndPropSheetHolder = GetDlgItem(IDC_PLACEHOLDER);
m_sheet = new CMyPropertySheet(pwndPropSheetHolder);
if (!m_sheet->Create(pwndPropSheetHolder,WS_CHILD | WS_VISIBLE,0))
{
delete m_sheet;
m_sheet = NULL;
return;
}
Pavel
Sonork 100.15206
|
|
|
|
|
Thanks for the sugesstion , i have done as u suggesst, but system is failing in allocating memory for the property sheet pointer, and returning.
What should i do??
With Thanks and Regards
--Kamesh
|
|
|
|
|
Are you creating it after the inherited OnInitialUpdate is called?
Returns the GetDlgItem(IDC_PLACEHOLDER) a valid pointer?
Also I missed a part of the code, after the sheet is created, you need to set it's size and position:
CRect rectPropSheet;
pwndPropSheetHolder->GetWindowRect(rectPropSheet);
m_sheet->SetWindowPos(NULL, 0, 0,
rectPropSheet.Width(), rectPropSheet.Height(),
SWP_NOZORDER | SWP_NOACTIVATE);
Pavel
Sonork 100.15206
|
|
|
|
|
Does anyone know how to simulate extended characters (128-255) with PostMessage (or SendMessage)? I guess I can do it using ALT key + number on numeric keypad
For a simple example, I did this:
<br />
PostMessage(::GetFocus(), WM_KEYDOWN , 0x12, 0x2038001);<br />
PostMessage(::GetFocus(), WM_KEYDOWN , 0x61, 0x204F001);<br />
PostMessage(::GetFocus(), WM_KEYUP , 0x61, 0xE04F001);<br />
PostMessage(::GetFocus(), WM_KEYUP , 0x12, 0xC038001);<br />
...to simulate ALT-1 (or any other numbers from 1-255 at numeric keypad..)
But it just outputs the actual number '1', so I guess it doesn't work that way?
|
|
|
|
|
Take a look at the MSDN docs for WM_SYSKEYDOWN - this is the message normally sent by windows when a key is pressed while Alt is down.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
I tried to play with WM_SYSKEYDOWN, but couldn't find out how to use it to simulate such a keystroke.
If anyone has an example, please let me know
Thanks
|
|
|
|
|
dear all
i want to encrypt and decrypt my passwords stored in ini files.
can someone point me a link to encryption/decryption.
is there a sample which shows same algorithm in vb as well as C++
to encrypt and decrypt strings.
thanx
|
|
|
|
|
|
I am curious if there is any way to determine the minimum and maximum fill points of the area filled by ExtFloodFill. I do not beleave there is, but if there is I would like to know. This knowlege would allow me to determine the area that needs to be invalidated. Otherwise I am stuct with invalidating the entire drawing area, which will slow redraw speed. Of cource the user might not notice, but I would.
------------------------------------
Trust in the code Luke. Yea right!
|
|
|
|
|
in my program,i want to add a function to shutdown the pc,my pc OS is win2000
my programming everioment is turbo c,cannot use mfc.
best regards.
|
|
|
|
|
|
Is there a simple way to tell if a text file is text or word?
ie, can it be opened in something simple like notepad...
I wouldn't want to limit my program to look at .txt or .c file extentions, althou i'm tempted at the moment.
Thanks in advance
|
|
|
|
|
I can only suggest a direction of search, since creating an empty document and opening it with Visual C++ hex editor does not help.
First of all, I beleave, there are multiple Word documents formats. Meaning, that over the years, as Word matured it would request if you wanted to convert the older format into the new format (accept the version that pissed every body off, because they could not open their old documents).
I would recommend that you open Word and look at the document formats it supports and then search the net for the specifications for the formats you are interested in. Other than ASCII text (.txt, .c??, .pas, etc..), most file formats (not all) have some sort of header information that you can examine to determine what type of data it holds.
FYI: I understand why Microsoft (and whoever) used file extensions to detetermine file type (speed), but one of the compilers I use produces a file that is mistaken as a short cut. At first I was confused, but now I take it for granted and pick what application I want to open the file.
----------------------------------------
Trust in the code Luke. Yea right!
|
|
|
|
|
thanks very much!
i didn't think of headers - thanks..
Col
|
|
|
|
|
I'm trying to figure out how to add a seperator (/) to a string ie
"yyyy mm dd" read from a file then modify the string back to "yyyy/mm/dd"
Thanks
|
|
|
|
|
see COleDateTime::ParseDateTime and COleDateTime::Format
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
Hello,
I am writing an email application in VC++ .Net. I have come across a problem, when downloading mail into a CString, that I run out of memory, especially if there are any large file attachments.
I was wondering if there was any way I could save these large emails gradually as I am downloading, in other words transferring out of memory and onto disk, as I go.
NB the emails are stored in an Access database, if it makes any difference.
I have no idea how to do the above, and would appreciate advice.
Thanks,
Trimtrom
|
|
|
|
|
Using a CString sounds like a bad idea... a fixed buffer and advancing reads should be just fine. Hard to give you a better answer since I have no clue HOW you download the mail.
And as far as I can remember, Access allows access to blobs by a stream interface so storing shouldn't pose a problem.
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
Wow! I am very supprised. First of all if you are copying every thing into a CString including the attachment(binaray format, or other), I would probubly be using a byte array. Second CString and CByteArray has a limit of 2147483647 bytes of data (Win32) and thats why virtual memory is so important (aka: swaping memory to disk behind the sceens). As for copying it to a file, if disk space is realy available, it is simple, (1) open a file (2) copy data bytes into file (3) close file (or rewind to start and process data) (4) if data file is no longer needed then remove/delete file from disk.
Question:
What am I missing since other than using CString instead of using CByteArray I do not see why you are having a problem? If you are compiling a unicode version of your software then using CSting is a major misstake, since it will expect all data to be using UNICODE.
----------------------------------------
Trust in the code Luke. Yea right!
|
|
|
|
|
Actually, real allocatable memory less than 2147483647, especially when you use CString or CByteArray classes. CString and CByteArray allocate memory in process heap, and exception will rise when you allocate more than aproximately 256 Mb.
So better allocate memory in 10 heaps by 100 Mb than in 1 Heap by 1Gb...
WBR NB
|
|
|
|