|
When you create a second form, add a method that returns GetWindowText() from the control in question. That'll be the string. If you want to get the text AFTER the form closes, store it in a variable when the form closes, because once it's gone, it's gone
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks, I will give it a try. I ahve spent a lot of time looking at help files and search engines, the lines of text are squirming. It would help if that GUI/OOP class taught more than puting pretty lines in a graphic window.
Thom
- Hind sight is always 20/20 -
|
|
|
|
|
LordTygger wrote:
It would help if that GUI/OOP class taught more than puting pretty lines in a graphic window.
Yeah, for sure.
LordTygger wrote:
- Hind sight is always 20/20 -
Megadeth ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I have to make a thumbnail List Ctrl with checkbox extended style, But I found that each item size in ICON style is different, if the file name is long the default size for the Item will be bigger.
For example: SetImageList(&myImageList,LVSIL_NORMAL), the size for myImageList is 100*100.
Then in the OnCustomDraw function, I use:
GetItemRect(nItemIndex,&rcBound,LVIR_BOUNDS);
if the file name's length is shorter than the 100,
the rcBound's width is 116, but if the file name is longer than 100, the rcBound's widht will increase automatic!!
When I set the checkbox extended style, the checkbox will be draw just beside the thumbnail, if the file name is not long enough, some part of the checkbox will out of the ListCtrl item area by default, in this condition, I can not draw the checkbox properly!!
So my question is:
Is there any way to change the ListCtrl Item size?
Or Is good solution to show both the thumbnail and checkbox?
Thanks a lot! Any comment is appreciate!!
|
|
|
|
|
Any help for using SendMessage or any equivalent in the richedit view for typing the character that is at 0x80 position of the font map.
I used like SendMessage(WM_CHAR, '\x080',0) which is not working.
Thanks
Jai Srimannarayana
|
|
|
|
|
I have a listctrl in report view but if I type in more than
259 characters, it just acts really wierd. It like moves data to the next line or cuts it off.
Any idea on how to resolve this? Please any response any
one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked gradaute student)
|
|
|
|
|
Hi,
Office 2003 provides smart tag functionality to outlook if Word 2003 is the default email editor. Oulook uses InternetExplorer_Server
class window to show the messages composed using MS-Word or HTML
format and this window is capable of displaying smart tags. Messages
composed in Plain Text or Rich Edit are displayed in RichEdit20W
class window and this window cannot show smart tag information.
My problem is to provide smart tag kind of functionality to this
RichEdit20W class window. Is there any way to get the handle of
email viewer window of outlook?
One more behaviour I've observed that the smart tag information is
embeded into the message at the time of composing the message and
not at the time of viewing it. My requirement is to recognize smart
tags at the time of viewing the mails. I can choose any editor for
composing the message and any editor for viewing the message. I want
the smart tag functionality be available in every case.
Please help me if you have any idea in this regard.
- Rajeev
|
|
|
|
|
This is my first crack at Multithreading and I am going to do it on MFC.
I read that MFC has 2 types of threads (The User Interface Thread and The Worker Thread). Obvious one is for the GUI Message Queue and the other is for the programs internal Work. Now onto my question:
1). Since an MFC program already has a its main thread that does all the work when you open the program, could I just leave that as the GUI thread and make one more thread as the worker thread? Or Do I have to make one thread for each?
Thanks
|
|
|
|
|
|
Hi all,
I want to list all the computers in a local network.
Computers name or IP address.
And is there any way to send messages to a compuetr with its
mac address of its adapter?
Thanks.
|
|
|
|
|
dSolariuM wrote:
I want to list all the computers in a local network.
Computers name or IP address.
NetServerEnum<br />
NetServerGetInfo
dSolariuM wrote:
And is there any way to send messages to a compuetr with its mac address of its adapter?
Dunno Know about sending message with Mac Address but you send message using NetMessageBufferSend api if you know server name
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Does anyone know where i can get the code to convert numbers to words using C++?
Looking for something basic, a few simple functions etc...
Example: "123"
"One hundred and twenty three"
|
|
|
|
|
Here are a few examples:
http://www.barasch.com/excel/cCo11432.htm
http://ourworld.compuserve.com/homepages/easysurf/cnvert18.htm
http://www.ozgrid.com/VBA/ValueToWords.htm
http://www.cs.bris.ac.uk/home/pehlivan/post/example/sec09.html
http://www.codeguru.com/Cpp/Cpp/algorithms/general/article.php/c9139/
http://www.google.com/search?hl=en&q=convert+numbers+to+words&btnG=Google+Search
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I brought home an MFC project and am now wanting to take it back to work tomorrow. Problem is my CD burner wont copy the huge .pch files (in debug and release directory). It gets to that point and just stays there with no apparent progress. Will it be okay if I remove these .pch f iles from my copy here at home, take the rest of it to work and copy over the .pch files from friday which are at work?
Thanks,
sb
|
|
|
|
|
You almost never need to copy any of the files in your /Debug and /Release dirs, since they'll be recreated when you rebuild the project. The exceptions to this rule are third-party DLLs or application-specific data files that may need to exist in these dirs. So save yourself time (and CDs) and leave these bad boys alone!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Please see this code here I am trying to fill all the pixels of a particular color with black. The figure is irregular so I can't use any of the known fill functions. The problem here is that the processing stops after some time. Probably runs out of memory(as shown by an error when the same code was run in VB).
If anyone knows any fill function for an irregular object, or can debug this code suggest it.
Any help woul be appriciated.
void dlg::floodfill(int x, int y, int r , int g, int b)// x,y are pixel positions r,g,b are color components, pixels coloured with these have to be found and replaced
{
CClientDC dc(this);
COLORREF rgb,rgb1;
rgb=dc.GetPixel(x,y);
BYTE r1,g1,b1;
r1=GetRValue(rgb);
g1=GetGValue(rgb);
b1=GetBValue(rgb);
if((r1<r+20)&&(r1>r-20))
if((g1<g+20)&&(g1>g-20))
if((b1<b+20)&&(b1>b-20))
{
rgb=RGB(0,0,0);
rgb1=dc.SetPixel(x,y,rgb);
floodfill(x-1,y-1,r,g,b);
floodfill(x,y-1,r,g,b);
floodfill(x+1,y-1,r,g,b);
floodfill(x-1,y,r,g,b);
floodfill(x+1,y,r,g,b);
floodfill(x-1,y+1,r,g,b);
floodfill(x,y+1,r,g,b);
floodfill(x+1,y+1,r,g,b);
}
}
Awasthy
Any work worth doing is worth doing well.
|
|
|
|
|
Infinite (or extremely deep) recursion, perhaps?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Try not to create the CClientDC object at each recursive call, but once, then call this:
<br />
void dlg::floodfill(CDC* pDC, int x, int y, int r , int g, int b)<br />
Hope this helps
|
|
|
|
|
For any non-trivial area of the screen, you're likely to run out of stack space.
You're also going to end up treating each pixel repeatedly.
See this article[^] for a good fill algorithm (judging by the ranking in Google's search results and the CP article rating of 4.71).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
My program is able to show visual styles after adding a minfest described in smoe articles here.
But I want, that my programm always uses the windows xp style independently which style the user has chosen in the windows-settings. That means, that i want to change the visual style, but only for this program. Is that possible?
Gabriel
|
|
|
|
|
Unless you're writing something special like a theme browser (like in the Display control panel), please don't do this. User settings exist for a reason, software should follow those settings.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
I can't seem to be able to draw an image using the CxImage library. My code is simply:
CxImage image;
HDC hdc=::GetDC(m_hWnd);
image.Draw(hdc);
Can anyone give the exact code for drawing an image?
|
|
|
|
|
i'm programming Type Assistant
i finished hook dll that can interrupt WM_KEYDOWN messages.But now,i don't know how to send words i iterrupted and after edited--->to window that a user is typing...
for a example:
when user opens notepad (or anything typing program) and type "boo",my program will search in Data and find a word having meaning.Example "book" and if user press Ctrl+Spacebar my program will add 'k' letter to notepad to make a meaning word "book".And here,i don't know how to add 'k'letter to notepad or anything other typing program.
sorry beacause my english ability is not good///
and thanks...
Here we go!!!
|
|
|
|
|
Hi,
You can use keybd_event or SendInput functions to do this.
Regards.
G.K.Z
King Zoser
|
|
|
|
|