|
What do you mean with 'in picture format ' ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This "pBuffer" i can save it as a Bitmap format like this.....
But i want to draw this pBuffer into a CStatic without converting to Bitmap...
CFile file;
CString strTemp;
char szTemp[MAX_PATH];
char *pDot;
GetModuleFileName(AfxGetInstanceHandle(),szTemp,sizeof(szTemp));
pDot = strrchr(szTemp,'.');
*(pDot+1) = 'B';
*(pDot+2) = 'M';
*(pDot+3) = 'P';
strTemp.Format(szTemp,GetTickCount());
file.Open(strTemp,CFile::modeCreate | CFile::modeWrite);
file.Write(pBuffer,dwSize);
file.Close();
|
|
|
|
|
According to your answer to CPallini, your buffer contains a BMP file. So, wiki[^] should contain all the information you need to access the pixel data. Also look for BITMAPFILEHEADER, BITMAPINFO and such structures in MSDN, these should help too. You could for example use CreateDIBSection[^] to get a HBITMAP from your data and use it to feed it to a picture (static) control or draw it yourself.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hello,
Please any one tell me where i can get message IDs for registered activex controls?
I want to automate MSFlexgrid control or MSdatagrid control using Perl. This requires sending message to those controls. But I could not find any document containing grid control messages. I could get Message ID s of most of the controls (commonly used) in winuser.h and commctrl.h. Thank you in advance.
|
|
|
|
|
ActiveX (i.e. COM ) controls have their own way (i.e. interface methods) to interact with.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'm Grateful for your concern.How to invoke interfaces externally using Perl?
|
|
|
|
|
I'm not an expert but this page [^] looks promising.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am working on Vista with VS 2005.
In my application, I am handling the WM_POWERBROADCAST message and in the message handlig function, execution some code which i must execute when the system goes to hibernate or standby(sleep) mode.
I find that on Vista, windows doesnot wait for the WM_POWERBROADCAST message handling function to return a value(true or false) before proceeding to entering into sleep mode.
On Vista, the system goes to sleep mode even before the WM_POWERBROADCAST message handling function returns a value. And because of this, my application does not have enough time to execute code in the handler function and results in a crash.
Should Windows go/not go to hibernate/sleep mode depending on the return value of the WM_POWERBROADCAST handling function?[MSDN Link]
|
|
|
|
|
The following is from the documentation -
To prevent the system from transitioning to a low-power state in Windows Vista, an application must call SetThreadExecutionState to inform the system that it is in use.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I tried calling the SetThreadExecutionState() function in the OnInitDialog() of an sample dialog based applicaiton with various combinations of flags ES_CONTINUOUS ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED, but to no avail.
Could you please tell me as to which flag is to be used with SetThreadExecutionState()?
|
|
|
|
|
I guess you have to call SetThreadExecutionState inside the WM_POWERBROADCAST handler.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Tried adding the SetThreadExecutionState() funciton in the WM_POWERBROADCAST handling funciton but to no avail.
|
|
|
|
|
sometimes I can get a handle of a windows easily,but I need a pointer of the window object,how can i do this?
thanks in advance!
|
|
|
|
|
You can attach the handle to a newly created object.
CWnd* pNewWnd = CWnd::FromHandle(hWnd);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
first i created a window object,then i get the handle of the object, after that i send the handle to another function,if i attach the handle to a new object,does it mean i have two identical object ?
|
|
|
|
|
You will then have 2 objects that work on the same window handle.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
is there any way to retrive the original object?
|
|
|
|
|
Both objects are independent.
They only works on the same window handle.
So you will have to keep the reference yourself.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
Hi ,
Dialogue box having two buttons at bottom. On is more button and other one is ok button.When user clicks on more dialogue box size need to change to show more options .and button caption will renamed to less.This requirement is exactly same as find and replace dialogue in MS-Word.Please help me how to do this.
dialogue box size need to change according option selected.
Thank you in advance.
|
|
|
|
|
|
My requirement is exactly like same as find and replace option(i.e CTRL + F ) in MS – Word. Like more button functionality.
|
|
|
|
|
coding_ram wrote: My requirement is exactly like same as find and replace option(i.e CTRL + F ) in MS – Word. Like more button functionality.
For that i gave you one function SetWindowPos. Did you try calling SetWindowPos and change the size of the dialog? Or you are looking for ready code ?
Regards,
Sandip.
|
|
|
|
|
Hi Sandip,
its working fine for me..thanks a lot.
|
|
|
|
|
You are welcome
Regards,
Sandip.
|
|
|
|