Hi All
I having an issue in using Boost regex with a MFC CString.
The regex is very simple: it must check if the string ends with the name of a dll I am looking for.
In the code below the CString Path DOES contain the dll I am looking for, but I don't know why the regex is failing. Uisng ReleaseBuffer increases the buffer size so the L...
i am trying to rezize dailog which are added to property sheet using move window function but nothing is affecting. it taking same size as in resource file.
how to resize it in code ?
...
Hi, I am working on dialog based MFC application in WinCE.
I created few controls in a dialog and scrolled down.
When i scroll up again, the controls in the first screen got disappeared.
Controls getting created in OnInitDialog() like below at coordinates (50,10)
test->Create(_T("Title"), WS_CHILD|WS_VISIBLE, CRect(50,10,200,40), this...
Hello guys.
I'm writing a tetris game using C++ and MFC. I have a timer and OnTimer handler. Handler looks like this:
... do some game-only logic ...
this->RedrawWindow();
And in OnPaint handler I draw blocks, map(with bitmap background), score etc. For drawing i use bitmaps and BitBlt function. Everything is drawn from scratch, i red...
Hi,
I have created a treeview at runtime in MFC application , I have added few nodes to it now i want to do some stuff on click of nodes so how i can get click event of treeview ?
My code looks like this :
CTreeCtrl *m_ctlTreeview;
m_ctlTreeview = new CTreeCtrl ;
m_ctlTreeview->Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP |
...
Hi,
I need to perform some file operations on WinCE platform.
The paths of file differ in Device compared to Emulator.
So i need to choose file according to the environment, like below.
#if defined(WINCE_EMULATOR) //This macro is just for illustration
#define path ".\Storage Card\\1.txt" //Emulator configuration
#else
#define path...
I recently converted a visual studio 6.0 project to visual studio 2010 and I'm encountering an issue whenever calling GetDlgItem on certain items. The following code is failing.
CWnd *pWnd = (CWnd*) GetDlgItem(IDC_BATCH);
pWnd->GetWindowText(szBatchNum);
I see this code in my resource file for the form that's calling the above code.
...
Hi,
Many application are using multi-top-level windows.
One of the good example is for layered window: if application need a real transparent control, the best way under MS windows is to use layered window(win32 programming, no WPF). But Layered Window must be top-level window.
The problem happens during you restore a minimized applicat...
Hi,
According to MSDN, WM_SIZE should be sent to window when window is minimized or restored.
But my application window, which is WTL CDialogImpl never get WM_SIZE when minimize or restore.
I use spy++ to check on it, I can get WM_SYSCOMMAND, WM_WINDOWPOSCHANING, WM_ACTIVE, WM_ACTIVEAPP etc, but no WM_SIZE.
I checked some other WTL ...
Hi,
I am using CFtpConnection class for creating my FTPClient Library using MFC.
I am using GetFile to download file from Server.
MY requirement is like if i am downloading 100 MB video from server when 50-60 MB video is downloaded and in between if i play that while it should play upto that particular location what it has downloaded up...
I need to temporarily disable a few items from an accelerator table when the input focus is on a CEdit field.
My application has some commands associated with keyboard keys (A, S, D, etc.) and I need to disable those while the user is entering text in the field.
...
I'm new to multithreading.
I created a class inherit from CWinThread called CMyUIThread, and also a dialog called CMyInfoDlg which has a text and a progress ctrl. I would to show modeless dialog in new created thread. Below is partial code:
BOOL CMyUIThread::InitInstance()
{
// TODO: perform and per-thread initialization here
// NOTE:...
Hi, I created a WinCE dialog based application.
I want to add minimize option at the top right corner.
If i create an MFC dialog based application, a checkbox will be present for Minimize button asking whether minimize is required for the dialog being created.
But if i create MFC Application for SmartDevice, minimize checkbox will not ...
Hi ,
I was developing one FTPClient using MFC (CFTPconnection) just i want to know whethere we can use this in Windows 7 and Vista OS ?
...
I got this exception in my program:
Unhandled exception at 0x0051cce0 in
JSONDataParsing.exe: 0xC0000005:
Access violation reading location
0x00000004
.
I tried catching the Exception, but of no use. I know where the problem occurs. But wanted to know how I can trap the exception. I used try, catch block around the code wher...
I can't find a simple CToolBar example of all things..
I created a toolbar in the resource editor, and loaded the toolbar in my code like this:
toolbar = new CToolBar;
toolbar->CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP, CRect(0, 0, 0, 0), AFX_IDW_TOOLBAR);
toolbar->LoadToolBar(IDR_TOOLBAR);
I have also handl...
I am in the process of trying to make an app that has most of its development done in Visual C++ 6.0 adhere to Windows theming, or to be precise the visual styles aspect of it. The application in question is a MFC application with the MBCS characterset. Getting theming to kick in in the first place required the InitCommonControlsEx(...);...
In MFC C++, When we add a new resourcein a EXE, says string, it will generate an ID automatically:
#define ID_SHOW_OUTPUT 10313
When it has a plugin(DLL) which has the similar ID, it will cause undefined behavior after trigerred.
To play safe, I tried to define the my own private ID:
#define ID_SHOW_OUTPUT (...
(WINAPI create file - WINAPI write file)
Flag used in winapi (FILE_FLAG_NO_BUFFERING) works fine, when I use winapi functions to write the file.
(WINAPI create file - CFile - write file)
In this situation the error also had occured, but it was because of absent file name in CFile object, that was created from the file handle received f...
Hi,
I have a MFC Combobox i want to add A-Z drives to my combox at runtime
Currently i am adding like this
m_cmbdrive.AddString("A:");
m_cmbdrive.AddString("B:");
m_cmbdrive.AddString("C:")
upto
m_cmbdrive.AddString("Z:");
But it seems not to be gud approach .
Any modularlize code if any body can help on this ?
...