|
Hi , I am new to VC++, I have a edit control on a dialog box and in one of the functions I am assigning some text to a variable m_edit = "Test". m_edit is the member variable asigned to the edit box using the class wizard. Run time whenI see the dialog box even after the assignment the dit controls text is not changing. what should I do to make the value assigned visible on the edit box
|
|
|
|
|
If m_edit is a control (not data) member (i.e. m_edit is of type CEdit ), do the following:
m_edit.SetWindowText ("Test");
to set the edit control's text.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
m_edit is of type CString and is a data memebr variable...
|
|
|
|
|
You need to call UpdateData() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Use: DDX_Text(pDX, IDC_EDIT1, m_edit);
and after assigning the values use:
m_edit = "Test";
UpdateData( false );
http://www.priyank.in/
|
|
|
|
|
Is there an easy way in C++ to tell if a number divides evenly?
|
|
|
|
|
Smells like homework. See the "%" operator.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thank you for reminding me about the modulus operator. I forgot about it.
|
|
|
|
|
I was wondering if anyone knew how to owner draw and/or change color of images within an CImageList. I have tried lots of things none of which seem to work. I have a list of colors that relate to an index number. I would like to draw a bitmap/icon next to my corresponding data in a list view of the correct color.
I have tried creating a bitmap, drawing in a memory DC and then calling CImageList::Add() with my bitmap -- not working. I have tried, getting a bitmap from CImageList::GetImageInfo() and drawing in it -- not working... maybe I'm not doing something right? Anyone had any luck with this and possibly have some sample code?
Thanks
|
|
|
|
|
I've researched this topic on my compiler, microsoft visual studio, and I've done everything that the tutorial said to do, but I can't get it to work. i want to have colors cycling through each of the letters in a certain sentence, lets say..."hello." I'd want two or three colors to cycle left to right at a certain interval in which I set. the tutorial said I have to set some sort of table or something. thanks.
dudeoffrance
|
|
|
|
|
Is this even close to what you are after?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
close enough. That would be good too. But i was looking for being able to change each letter's color, but that would be nice too.
dudeoffrance
|
|
|
|
|
dudeoffrance wrote:
But i was looking for being able to change each letter's color...
Isn't that what the snippet I showed achieved?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
when i try to open it it wont show me whatever you have in mind, but if you know how to change each colors letter, please tell me how. It would be greatly appreciated.
dudeoffrance
|
|
|
|
|
Im try to make a simple application with window, when i
do this , the first time, it works very well, but when i save the c++ file, the compiler save like a space work or like a projec. when i try to use the program in another day,don´t work !!! : and have the next message:
(the programm have #include stdafx.h, don´t have precompiler headers activated, and don´t have erros (is very short the code !!! (the firs time, always work))
and have the next message:
DEBUG WIN32
COMPILING
stdafx.cpp
C:\Program files .....\include\winnt.h(1092) error C2146: Syntax error: missing ';' before identifier 'KSPIN_LOCK'
C:\Program files .....\include\winnt.h(1092) fatal error C1004: unexpected end of file found
im working with WinMe
so... help me !!!
|
|
|
|
|
Assuming you have not touched the stdafx.cpp file, what does the stdafx.h file look like?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi all,
I have created a character buffer (char buff[]) which contains the data of a word document (the document contains text and images).
i would like to pass this data onto a printer. I have managed to get the handle of the printer using GetPrinterDC. but what i can't figure out is how am i going to pass my buffer data to this DC?
If given the handle of a window, we can find its DC and then pass that data to the printer DC using BitBlt, but in my case i don't have a handle, but only an array of characters which represent some image.
Can somone suggest a method?
|
|
|
|
|
I have Resource Id in string format.
ex ("IDC_EDIT").
How can i convert it into ID format to get the handle of the Edit box
using GetDlgItem.
if anybody come across the problem .pls let me know the solution.
Advance thanks,
Chezhian
|
|
|
|
|
|
hi,
But i have the Id in string format "IDC_EDIT" instead IDC_EDIT
|
|
|
|
|
MAKEINTRESOURCE(x)
???
Currently I don't have VC++ in my PC, not quite sure...
----------------
CEdit* pEDIT = (CEdit*)GetDlgItem(MAKEINTRESOURCE("IDC_EDIT"));
Maxwell Chen
|
|
|
|
|
I tried but it gives error
|
|
|
|
|
rgchezhian wrote:
But i have the Id in string format "IDC_EDIT" instead IDC_EDIT
Why? You should have a line in the project's resource.h file similar to:
#define IDC_EDIT 123 You should then have something comparable to the following in the project's .rc file:
IDD_MY_DIALOG DIALOG DISCARDABLE 0, 0, 423, 127
BEGIN
EDITTEXT IDC_EDIT,38,83,40,14,ES_AUTOHSCROLL
END Then you can use Priyank's suggestion.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I've written a small app that opens a divx avi file and displays the frames. It uses AVIFile operations, AVIFileOpen, AVIStreamGetFrameOpen, etc. It worked ok when I had divx codec installed.
I unistalled the divx codec and installed ffdshow, but now I can't get any frames from the avi file. AVIStreamGetFrameOpen fails, which I think means it can't find the codec to uncompress the video.
I can open the avi in Windows Media Player ok, gSpot reports that it uses the ffdshow decoder, but I can't get my app to work.
Anyone know what's happening here?
|
|
|
|
|
Hello
Media Player is playing your file using DirectShow, but you are trying to play it using Vide for Windows. It's not the same. The list of supported codecs can differ for DX and VfW.
May be uninstalling ffdshow, you've uninstalled VfW version of the codes, or may be it was unregistered somewhere.
With best regards,
Andrew
|
|
|
|