|
A picture control is a static control with the SS_BITMAP, SS_ICON, or
SS_ENHMETAFILE style.
To set the control's image you can use the STM_SETIMAGE message
(I'll assume you're using the SS_BITMAP style):
HBITMAP hNewBitmap = ...;
HBITMAP hPreviousBitmap = ::SendMessage(hwndPicConrol, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hNewBitmap); Where is the image coming from that you want to set to the control?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thnk you for reply. But how do i get the handle to picture control. i.e hwndPictureControl
|
|
|
|
|
If you created the control with CreateWindow[Ex]() then the API will return the handle.
If the control is on a dialog created from a dialog resource, the you can use GetDlgItem()
to get a handle to a dialog control given its ID.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi all
I want load GIF file in the touro c++ but I don't know how I can
do its
plz hellp me
thanks alot
bye
|
|
|
|
|
mahideh wrote: in the touro c++
Are you using the windows APIs?
- NS -
|
|
|
|
|
I should use from GIF format file for load its in to DOS
but I don't know how I use from LZW code for decode data of image and draw image in consul
|
|
|
|
|
For see detaily of graphic formats and how to read and open them see CXImage class on the codeproject maybe it will be helpful for you.
|
|
|
|
|
If you can use Windows APIs, you could use GDI+[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Can any body tell me how can i extract all the links from
the html data.
any standard protocol to get the link from the data.
or all posible ways for url in the data absolute url or relative url.
|
|
|
|
|
you can use regular expression to extract the url from the html data.i have done this before but not in c++,just in java.
|
|
|
|
|
hi thanx but i want it in vc++
any way thanx
|
|
|
|
|
There are also some regex library in c++.
|
|
|
|
|
The Boost library includes a very nice regular expression[^] library for use from C++. Documentation and examples are good. You can probably Google for a site that lists regular expressions for extracting information from HTML.
Software Zen: delete this;
|
|
|
|
|
Host the document in MSHTML and use the anchors property of the IHTMLDocument2 interface.
|
|
|
|
|
Dear Friends,
I m trying to write one application to get Oracle reconnection. But i m not getting reconnected.
What can be a problem?? can anybody help me??
megha
|
|
|
|
|
Come on !
How could expect one to know, what exactly is problem ? Explain, what you are trying ? And where you are stuck ?
Prasad
MS MVP - VC++
|
|
|
|
|
Ohh yes.... sorry boss..
Here is the problem..
while reconnecting i m trying to execute a query to check whethere i got connected to DB or not??
That query returns me true which means i m connected to Database. Now i want to update some records from file to DB and at that time i m getting "OERROR_INVPARENT" error.
My question is how it can return me two different things at two different places.
Did u get my problem now??
|
|
|
|
|
Gaurang Shah 033 wrote: LPSTARTUPINFO si;
LPPROCESS_INFORMATION pi;
STARTUPINFO si;
PROCESS_INFORMATION pi;
Am I right?
- NS -
|
|
|
|
|
|
You are welcome.
- NS -
|
|
|
|
|
Hi,
I have made the Followind chages to my code but now it gives me followind Exceprion
Unhandled exception at 0x7c4f3ac3 in Dekstop-GUI.exe: 0xC0000005: Access violation writing location 0x00416856.
The Code is as follow.
<br />
<br />
void ShowImage(void)<br />
{<br />
LPWSTR str = L"c:\\WINNT\\system32\\notepad.exe";<br />
STARTUPINFO si;<br />
PROCESS_INFORMATION pi;<br />
<br />
BOOL ProcCreated;<br />
ZeroMemory( &si, sizeof(si) );<br />
si.cb = sizeof(si);<br />
ZeroMemory( &pi, sizeof(pi) );<br />
<br />
ProcCreated =CreateProcess( NULL,str,NULL,NULL,FALSE,0,NULL, NULL,&si,&pi ); <br />
<br />
}<br />
<br />
|
|
|
|
|
The following modifications may help you...
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si,sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWMAXIMIZED;
ZeroMemory(&pi,sizeof(pi));
- NS -
|
|
|
|
|
Thnx,
But Error Still persist.
The prior code I just post to you is working well in other application. But it gives the Error in this Application only.
I am using MouseHook in my Programming. Can it generate any Probelem.
|
|
|
|
|
The second paramater expects a LPTSTR you are passing a LPCTSTR. CreateProcess() will try to modify the string in the second paramater.
TCHAR str[ MAX_PATH ];<br />
_tcscpy_s( str, MAX_PATH, _T("c:\\WINNT\\system32\\notepad.exe") );<br />
<br />
CreateProcess( NULL, str, ... )
|
|
|
|
|
Thnx a lot. problem solved. might be u had find this probelm silly. But I am a vary beginner programmer in VC++.
|
|
|
|