|
Hello everyone!
I'm facing a problem with the CRichEditCtrl::LineScroll member function.
I've created a RichEditCtrl (without using the ES_CENTER or ES_RIGHT styles) yet when I call the member function with the second parameter which corresponds to the number of characters to scroll horizontally in the ctrl, nothing happens.
If anyone has a suggestion on what might be wrong it would help alot!!
Thanks!
|
|
|
|
|
I've a CFormView derived class CMyView, which contains a member CTabView derived from CTabCtrl, and CTabView contains several CDialog derived classes.
For DoDataExchange(pDX) in CMyView. It is reasonable that I call DoDataExchange(pDX) of the child CTabView and in turns call DoDataExchange(pDX) of CMyDialogs.
However, it raised assertion error, as i traced back, GetDlgItem() couldn't get the dialog item.
It seems I should create another CDataExchange to do DDX for each child, but i don't know how to create CDataExchange instance myself.
|
|
|
|
|
Just call COtherDialog::UpdateData(TRUE) instead. Basically, UpdateData creates CDataExchange instance and calls DoDataExchange when bSaveAndValidate is TRUE.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
How can I change the caption of my window (CMainFrame) ?
--
Nice greets, Daniel.
|
|
|
|
|
The CMainFrame caption is build from IDR_MAINFRAME resource string and a string describing the active document. You can change the IDR_MAINFRAME string in resources.
If you want to change the caption at runtime, override the OnUpdateFrameTitle virtual method of CMainFrame or your CMDIChildFrame derived class (for the active document caption, if you are building MDI application).
Also SetWindowText method sets the caption immediatelly, but this will be sooner or later set back to default caption.
Pavel
Sonork 100.15206
|
|
|
|
|
I have a CPropertySheet object that has four CPropertyPages attached to it. How can I have the tab control of one page display as bold text and the others as normal text? Also, can this be changed dynamically at any time or can it only be done when my dialog is initialized?
Thanks!
|
|
|
|
|
i think the only way to do this is to make the tab control within the propertysheet owner draw.
check out Ownerdraw Tab Controls - Borders and All
and if you've got any further queries i'd be happy to help.
|
|
|
|
|
Hi
i'm trying to get started coding embedded stuff
downlaoded the sdk's etc
has anyone else done any ce coding so i may as a Q or 2?
regards
Bryce
|
|
|
|
|
Hi there,
Is there any way to show a bitmap when the button is disabled by CButtonST ??
If not, how can i add it to CButtonST ??
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I assume CButtonST is a class on CP - why don't you ask on the article, so the author gets an email letting him/her know you have a question ?
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Because the situation has occurred several times, I'm beginning to wonder whether there might be a way I can stop it from recurring in the future.
Here's what I'm talking about. In Tools->Options->Directories, under the "Show Directories for" dropdown box for "Include", sometimes the application I'd be working on would fail to compile due to an error typical to the one listed below:
=================================
Deleting intermediate files and output files for project 'MyPad - Win32 Debug'.
--------------------Configuration: MyPad - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
c:\program files\microsoft sdk\include\exdisp.h(1118) : error C2061: syntax error : identifier 'SHANDLE_PTR'
c:\program files\microsoft sdk\include\exdisp.h(1633) : error C2061: syntax error : identifier 'SHANDLE_PTR'
Error executing cl.exe.
MyPad.exe - 2 error(s), 0 warning(s)
=================================
By rearranging the order of the entries in the directory listbox, ninety-nine percent of the times, the errors would go away and a subsequent clean compile and linkage would occur.
Clearly, VC++ has a specific way in which it wants those entries to be.
My contention is, "Should it really matter that the order of the entries be more important than the actual presence of the entry itself?"
To me, I would think, having the entry present (to begin with) would be more important than whether it is first in line, or second in line, or third (etc.).
Is there something I can do that will stop these kind of occurrences from happening?
Thanks!!
William
|
|
|
|
|
Think about when you have two headers files with the same name in two different directories, which header file should be used. That is why the precedence is taken into account.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I am trying to display the records in the listbox.
When I try to Initialize the listbox with the value in *View.cpp, I am getting an 'Access violation'. Can someone help fixing it.
here is the code:
void CListdatabaseView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
...
...
...
CListBox *plistb = (CListBox *) GetDlgItem(IDC_LIST1);
CString str1;
str1.Format("%s","TESTING");
plistb->AddString(str1);
ddlg.DoModal();
}
|
|
|
|
|
without more to go on, i would say that the most likely problem is that 'plistb' is NULL and therefore plistb->AddString() is invalid.
add ASSERT (plistb); after the call to GetDlgItem() to test it.
|
|
|
|
|
Adding ASSERT(plistb) doesnot solve the problem. Still get the same error.
|
|
|
|
|
I'm having the same problem. Please let me know if you have found a solution. It's mostly related to trying to add data to a listbox which is not visible to current class.
Try adding the data from the CListBox's owner class and it should work. Try it from an outside class it throws an ASSERT.
Let me know please.
|
|
|
|
|
Hello,
This may sound weird but the SW_HIDE isn't working in my application.. It executes the program but doesn't hide it.. I have also tried the ShellExecute() with the SW_HIDE and it doesn't work either..
Any idea what would keep an application from being hidden?? Its a CDIalog app and all I did was add another class to the project.. CAsyncSocket
Thanks
Rob
|
|
|
|
|
The program that you are trying to run may not properly take the CmdShow input parameter into account when it starts up. THe program may ingnore this parameters and simply call ShowWindow(SW_SHOW) when it creates the main window for the application. If this is the case then you will need to find another solution.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I needed this as well the solution is
SetWindowPos
with the hide window option set
This works pretty much all the time for me!
|
|
|
|
|
Hi all,
I want to set disk quota in my VC++ project.
I got a script command:
------------------------------
diskquotasettings.pl -operation
------------------------------
but I don't know how to execute it in my code.
any one can give a hand?
Thanks
|
|
|
|
|
will that work?
I will try
Thanks
|
|
|
|
|
Execute your script file using ShellExecuteEx(), inserting the path name for your script file as one of the parameters.
See Nish's article http://www.codeproject.com/system/newbiespawn.asp
hope this helps,
Adam.
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|
|
When i run the CreateFile function i get an Access Violation error.
Unhandled exception at 0x00f186a6 in MP3.exe: 0xC0000005: Access violation reading location 0x00000110.
Here's the code:
hFile = CreateFile("C:\\result.mp3", GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
I don't understand it, i've never tried that before...
Thanks
|
|
|
|
|
Anonymous wrote:
i've never tried that before...
You still have a chance then. You should use the iostream framework instead of these ugly, C style, file handling routines. I have articles here on CP that show how to use ifstream and ofstream.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
I want my program to see if a file of a certain name is trying to or is being downloaded to my computer. Is there a way to do this?
There's always one more bug.
|
|
|
|