|
Look into this registry entry:
HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language\
You are going to have to traverse through the entries and find the language code you are looking for. There should be code out on the web on how to traverse through registry entries to find a particular key.
Here you will find a list of Windows language codes:
http://www.science.co.il/Language/Locale-Codes.asp[^]
|
|
|
|
|
So what is the first windows' parent windows.
BTW, I create the first window myself, not using the framework.
BOOL CWnd::Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext)
{
ASSERT(pParentWnd != NULL);
ASSERT((dwStyle & WS_POPUP) == 0);
return CreateEx(0, lpszClassName, lpszWindowName,
dwStyle | WS_CHILD,
rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top,
pParentWnd->GetSafeHwnd(), (HMENU)(UINT_PTR)nID, (LPVOID)pContext);
}
|
|
|
|
|
use CWnd::CreateEx
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
The code failed, why?
CWnd *pWnd=new CWnd;
LPCTSTR pClassName = AfxRegisterWndClass(CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW);
BOOL b = pWnd->CreateEx(0, pClassName, L"MyWnd",
WS_VISIBLE|WS_OVERLAPPEDWINDOW,
CRect(0,0,100,100), NULL, 1);
|
|
|
|
|
Hi everyone.
I want write a problem to edit binary file, but it is too slow when open big file, Can who send me one source code to me.
|
|
|
|
|
the source code is too big, the email can not open it.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
ShiXiangYang wrote: Can who send me one source code to me.
Would you like mustard with it?
|
|
|
|
|
much pepper pls.
|
|
|
|
|
Mike, you never told us you were running a burger stall as well.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Hi everyone,
I am in need of help here. I have a dll which create a text file using FILE* and CFile class ( I tried both ways). At each line of text, text are "\t" delimited and "\n" at the end of text. The dll is created in C++ Visual Studio v6. There used to be a application (writen in version 6 as well) calling this dll and it works fine. Now, the application is ported into C++ VS2005 platform and calling this dll. It crashes at the end of file. Basically, it doesn't pick up the last "\n" and it run into while loop one more time. Since the additional loop doesn't see an EOF or "\n", it crashes. Can anyone tells me what's going on?
One interesting thing is that the same file reader function is used elsewhere in the same application and it works fine. Please help. I've run out of ideas and tests.
modified on Friday, March 20, 2009 9:16 PM
|
|
|
|
|
Possibly yoou should post the relevant code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Everything is as usual. Here is a fragment of the code. Note that COXCsvFile class is a wrapper from Ultimate Toolbox.
COXCsvFile inFile;
CFileException fe;
int nRow=0;
//
// Open the input file
int nColumns = GetOurApp()->m_MIUtility.GetFileColumnCount(sFile, "\t");
if (!inFile.Open(sFile, CFile::modeRead, &fe))
{
return 1;//no record added
}
TRY
{
//inFile.GetColumns(4);
inFile.GetColumns(nColumns);
inFile.SetFieldDelimiter(_T('\t'));//set delimiter as tab
//
// Read the records in one at a time from the second table.
//
while (inFile.ReadLine())
{
inFile.ReadColumn(0, sSelCell);
inFile.ReadColumn(1, sNbCell);
inFile.ReadColumn(2, sRLAttempts);
inFile.ReadColumn(3, sTimeInActiveSet);
dSCellSCODE.strCell = sNbCell;
dSCellSCODE.strCI = strRowData;
m_aTempData.Add(dSCellSCODE);
nRow++;
}
inFile.Close();
}
CATCH_ALL(e)
{
inFile.Abort();
return 1;
}
END_CATCH_ALL
|
|
|
|
|
Are you sure it is ReadLine method failing (isn't, for instance ReadColumn )?
Probably your best friend is the debugger (and possibly you've to go deep into source, maybe even in the Toolbox's ones).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I stepped into the readLine(). It reads all the lines til the last one. For some odd reasons, it doesn't get the last '\n'. As the result, it tries to read an extra line. Since the next reading doesn't have a '\n' within the buffer size, it crashes.
|
|
|
|
|
Can someone help? I am stuck with this bug.
|
|
|
|
|
Hi All,
I'm not having a lot of luck declaring a combo box in the class code for my dialog resource. I'm using VC++ ver 2.0, non-MFC, Win32 with SDK calls only. I'm making additions to a large and complex legacy program.
Without the combo box declared in the code, the dialog opens fine when the program launches, but when I add the combo box, I get the following two message boxes:
First:
"Create Dialog failure"
Engineering Note ...
Dialog Creation Error
Be sure that there is a Dialog named, "" amongst the program's resources.
Then: an "OK" box:
Exiting due to Error
[8002] Window Create
Error code-20: Create Dialog failure
When I click on the OK, the entire program exits. I've typed the three last lines of each above, letter-for-letter from the messages displayed.
In my class in my .h file, I've declared the following:
ComboBox m_PhNoComboBox;
I added the following to my constructor in my .cpp file:
m_PhNoComboBox (this, WMM_IDC_MND_PHNOS_COMBO)
right after the constructor's function identifier and parameters line and the code builds, but gives that run-time error.
Does anyone have any idea what might be causing this? Should anything else be added?
Searching, I found nothing relevant about the error codes 8002 and 20.
Here's how I'm declaring the combo box in the resource description:
-------------------
WMM_MY_DIALOG DIALOG DISCARDABLE 101, 36, 296, 201
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "My Dialog"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX WMM_IDC_MND_PHNOS_COMBO,137,22,137,164,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Close",IDCANCEL,15,177,32,14
END
-------------------
Best regards,
|
|
|
|
|
check the WMM_MY_DIALOG definition in resource.h
|
|
|
|
|
I'm using Windows media player to display movies within my application - which works fine. But I have noticed if I double-click the movie it expands to full screen. Now I don't want that - I want it to stay in the window where I put it. I cannot find a setting that affects this, any ideas?
|
|
|
|
|
Hi Keith
Did you find the answer to your question?
I am trying to do the same thing in vb.net and cannot find a setting that affects this.
Does anyone out there know how to do this?
|
|
|
|
|
No I didn't find an answer.
|
|
|
|
|
hello.
I've a problem with the method GetSaveFileName.
When the option "Hide file extension for know file type" is checked, and the file name contains a ".", the filename is truncated.
here is my code:
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(OPENFILENAMEW);
ofn.hwndOwner = (HWND)olhParentHWnd;
ofn.lpstrFilter = "(Doc files)\0*.pkp\0\0";
ofn.nFilterIndex = 1;
ofn.lpstrDefExt = ".pkp";
ofn.lpstrFile = "MyDoc.prefered";
ofn.nMaxFile = _MAX_PATH;
ofn.lpstrTitle = "Save pkp file"
ofn.Flags = OFN_NOREADONLYRETURN | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_EXPLORER | OFN_NOVALIDATE;
ofn.Flags |= OFN_ENABLEHOOK;
ofn.Flags |= OFN_ENABLESIZING;
ofn.lpfnHook = (LPOFNHOOKPROC)CMySavepkpFile::CustomSaveDlgHookProc;
ofn.lpstrInitialDir = "C:\Documents and Settings\Administrator\My Documents";
GetSaveFileName(&ofn);
Unfortunately, the default displayed name is "Mydoc" instead of "MyDoc.prefered".
Any idea ?
|
|
|
|
|
zouzoulikou wrote: ofn.lpstrTitle = "Save pkp file"
You are missing a semicolon.
zouzoulikou wrote: ofn.lpstrInitialDir = "C:\Documents and Settings\Administrator\My Documents";
Why are you not using double backslashes?
zouzoulikou wrote: Unfortunately, the default displayed name is "Mydoc"...
This is expected behavior.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
You're right. I must use double blackslashes. In fact, I've adapted the code before submitting it here.
So the correct code is :
ofn.lpstrInitialDir = "C:\\Documents and Settings\\Administrator\\My Documents";
Note: Any idea for my problem ?
|
|
|
|
|
zouzoulikou wrote: Note: Any idea for my problem ?
What problem? Regardless of the setting, ofn.lpstrFile will contain the correct value (with the extension intact) if the OK button is clicked. You will have to correctly assign that member to a buffer, however, like:
char szBuffer[MAX_PATH] = "MyDoc.prefered";
ofn.lpstrFile = szBuffer;
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|