|
From MSDN's documentation for the GETTEXTEX Structure[^]:
"The GETTEXTEX structure contains information about an operation to get text from a rich edit control"
Are you trying this with a rich edit control? Otherwise, I don't think it will work.
Try this instead:
const int nBufLen = 512;
TCHAR buffer[nBufLen];
SendMessage(0, WM_GETTEXT, nBufLen, (LPARAM) buffer);
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
no, i already tried that.
the classes of the edit controls im trying to read are UsTextEditPane and Ate32Class
if that helps at all
|
|
|
|
|
Tim Zorn wrote:
no, i already tried that.
And...? What was the result? Post some code to see how you are doing it and what specific error you get.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
when we open a child window in a MDI application, and maximize it, its caption-bar diappears and its close, maximize and minimize buttons appears in the menu-bar.
when user maximizes an MDI child window and then clicks its close button, what message is sent to my program? i can't trap it.
|
|
|
|
|
I'm not shure, but isn't it a WM_PARENTNOTIFY message?
"There is an empty room full of people who think you are creative"
|
|
|
|
|
No.
it is a message that sholud be trapped after WM_COMMAND message.
|
|
|
|
|
hiho@ll
i had a look at this tutorial
to capture video from a webcam
now i need just the RGB data from the webcam!
i don't want the webcam data to be displayed on the screen (well i want it too) but i need the binary data!
anybody knows a filter which i can use to grab the data
cause i'm a noob at this topic, a tutorial or a sample code would be great
hmm
btw maybe i'm wrong, but it seems that there is no tutorial about direct show programming! or not?
i search for some, but i only get some doc about some functions
but what if i want to prog my own filter, how do pins work and what are they exactly?
it's not easy to find a good basic tutorial about directshow programming!
anybody knows a good resource?
thx@ll
|
|
|
|
|
To prevent rendering you'll need a null renderer
To capture images from the graph you'll need ISampleGrabber (or a variant)
Source Filter -> ISample Grabber -> Null Renderer
If you're looking for a simple way to do this, have a look at OpenCV (Intel's Open Computer Vision Library) hosted on sourceforge - you should be able to borrow or modify enough of their code to get started.
|
|
|
|
|
hiho
thx for your help!!
this library (OpenCV/cvcam) is damn cool!
it's exactly what i need and i just got it run
but i have a little problem, maybe you can help if you already worked with the library
i have a IplImage pointer to the image from which i want to read the image's RGB values
my problem is the access to the rawdata array!
the pointer points to a image structure with a value
imageData = the raw data
imageSize = the byte size (i think)
in an example i saw this code
memset(img->imageData, 0, img->imageSize/2);
which simply set's the first half of the image to black
this code crashes my prog!
the same happens if i use a loop to read every pixel values
i just can read the first 146047 bytes of the buffer
then it crashes
i'm sure it's because it's a segmentation fault
so my question
if i use image->imageSize as a byte limit for the image raw data buffer
and this is wrong
how do i know the exact size of the raw data buffer? because imageSize doesn't seem to be correct
thx
|
|
|
|
|
Hi,
I am a newbiew to .NET, MFC and Visual C++.
I have multiple Views (Say View A, B and C), and a Document in my Design. On the Print and Print Preview I need to print information from all the views. Currently I have overloaded the OnPrint() function in View A.
After View A 's print is done, how do I get it to Print View B and View C's Data. Should I post a Message to View B and C passing the CDC object, and each of the View (B &C) use the CDC object and continue the printing.
Please let me know if thats the right way to do or if there is a better way. Also how do I print across pages.
Thanks for your help.
|
|
|
|
|
Certainly you could pass a message with CDC as parameter - or create custom class to do printing and from the OnPrint method in one of the views create an array of pointers to all other views and pass this as a parameter to your print method that would then print all of them.
As per printing accross pages - done it few times and always a headache. One of the better techniques I used was clipping rectangles (per page) and moving CDC drawing origin according to the page being printed. I think this worked the best for me.
Good luck
Regards
JP
|
|
|
|
|
Hi All,
I have been trying to do this simple task for half a night and as simple as it sounds, I can't get it to work.
I have a listview and I am trying to get the text of the selected item when user selects one (this is a single select listview). I've tried the following but none work:
System::Void Form1::lv_files_SelectedIndexChanged(System::Object * sender, System::EventArgs * e){
String* sss = lv_files->SelectedItems->Item(0)->Text;
ListViewItem* selectedFile = dynamic_cast<ListViewItem*>(e);
String* sss = selectedFile->Text;
}
So how do I actually get the text of the selected item? Im tired, and passed the pissed off point so any help would be appreciated immensly
TraileR ParK LifE 4Ever >:{
|
|
|
|
|
|
It worked! Thanks a lot!
...And I've been trying all those complicated ways when this short line does it!
Thanks again
TraileR ParK LifE 4Ever >:{
|
|
|
|
|
gr8coaster329 wrote:
...And I've been trying all those complicated ways when this short line does it!
Exactly my feelings whenever I see James Bond seducing yet another Bond girl.
gr8coaster329 wrote:
Thanks again
No problem. Glad to be of help
--
"the name's Lamas, Jose Lamas" jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
lv_files->SelectedItems[0]->Text
Hi - I'm having this same issue. When I try the solution above, I get
error C2227: left of '->Text' must point to class/struct/union
(The intellisense also warns me that it won't work.)
My code is:
String* test = listView_Main->SelectedItems[0]->Text;
Any suggestions?
Thank you,
--Jordan
|
|
|
|
|
Hi
My program suppose to be sometimes hidden. when the user wants to show it, its button in the taskbar does not have the correct status. that means that if the program was first maximized (before hiding it) it is being shown maximized too but the minimize button (on the window corner) does not work and right click on its taskbar button shows only the maximize button.
Here is the code when hiding the window:
<br />
::GetWindowPlacement(hWnd,&sWndPlt);<br />
::ShowWindow(hWnd,SW_HIDE);<br />
And here is the code when Showing the window:
<br />
::SetWindowPlacement(hWnd,&sWndPlt);<br />
::ShowWindow(hWnd,SW_SHOW);<br />
::UpdateWindow(hWnd);<br />
::SetForegroundWindow(hWnd);<br />
::SetActiveWindow(hWnd);<br />
Is there a way to solve this problem?
Thanks a lot
mamtz
|
|
|
|
|
Is your MinimizeBox property of your form set to False?
TraileR ParK LifE 4Ever >:{
|
|
|
|
|
I forgot to mention that actually i have 2 programes. The first is always hidden and the second suppose to be sometimes hidden and sometimes not. The first one register the hot keys and is the one which hidding the second one.
The first program has no maximize/minimize/system menu.
The second program has these buttons and they are enabled.
Does it make things different?
|
|
|
|
|
how can i hide the taskbar while my program is running and then unhide it when the program closes.
- Kyle
|
|
|
|
|
Why would you want to do this? You should *never* change a user's preferences just to suit your program.
|
|
|
|
|
i want to do this because the taskbar cuts off the bottom of the window.
is there a way to fit the window to the screen?
- Kyle
|
|
|
|
|
If you maximize the window, it will fill the screen, excluding the taskbar. Is that not what you want to do?
|
|
|
|
|
yes that is what i wanted to do thank you i will try it
- Kyle
|
|
|
|
|
Hi Kyle
I didn't try it but i think it will work:
1. get the taskbar window handler:
<br />
HWND wDesk=GetDesktopWindow();<br />
HWND wTray=FindWindowEx(wDesk,NULL,"Shell_TrayWnd", "");<br />
2. hide it:
<br />
ShowWindow(wTray,SW_HIDE);<br />
3. show it back again:
<br />
ShowWindow(wTray,SW_SHOW);<br />
Good luck
Mamtz
|
|
|
|