|
Thanks for your answer Ravi!
In fact I had already tried that, unsuccesfully...
I don't know exactly when this function is called, but I thought it is only when the application is opened for the first time... no??
Thanks again
Isabelle
|
|
|
|
|
pl-isa wrote:
but I thought it is only when the application is opened for the first time... no??
Actually, WM_SHOWWINDOW is sent whenever the window is shown, hidden, minimized, maximized or restored, not only at startup. But you're right - what I should have said is, add these lines to your OnPaint() handler:
CMyDialog::OnPaint (...)
{
m_myPicStaticCtrl.Invalidate();
m_myPicStaticCtrl.UpdateWindow();
}
This should force an immediate repaint of the static control. If this doesn't work, I'd put TRACE() statements in your static control's OnPaint() handler to see if it's doing anything funky. It might be getting called, but not painting after the first invocation.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
Did you tried the RedrawWindow() of your CStatic control in your OnPaint()?
Regards,
Eli
|
|
|
|
|
Hi Eli,
I had also already tried the RedrawWindow(), but unsuccesfully...
Are threads use for that kind of things??
If you have any other ideas... don't hesitate!
Thanks a lot for your answer!
Isabelle
|
|
|
|
|
Hello All,
I am planning to design my help system for my application. I want to use CHM file format. I am new to this format and I have a basic queries:
Can any body please help me out in this.
As per my understanding CHM is compressed form of HTML. My query is "When I will decompress the contents of CHM format will i get my out put in HTML format".
Any suggestion about how a help system should be designed are most welcome.
Thanks,
Ritu
Anukrati
|
|
|
|
|
|
|
You can decompile the CHM file to a set of files in the CHM file.
I use PowerCHM to decompile and compile it.
|
|
|
|
|
Hi,
I would search a library / activex o SDK tools for developer a program in Visual C++ that permit cut and paste and write of result of mp3 audio file.
For example. i take a song and extract from 10th second to 30th second and write a new file in specific format.
Who i can make ?
Thanks
Hi.
I'm new developers
|
|
|
|
|
|
I am getting an error message, tried hard to come out of this. anybody can help????????????????????
Please Treat it as urgent
sysInfo :- is a class which is calling 'getIPAddress()' which is of type 'std::string'
in sysInfo class the result is returned in the form of std::string,
this is being called in main() function.
os.m_IP_Address = sysInfo.getIPAddress();'
'os' is a object of class which inherits the Recordset class and
'm_IP_Address' is of type CString which is the column name in which the value of "sysInfo.getIPAddress()" should be placed
(os.m_IP_Address = sysInfo.getIPAddress();)
But ,I get the error message as shown below.
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >' (or there is no acceptable conversion)
Language:- VC++ and the data base is MSAccess
Please give me tthe solution for this with the code example.
|
|
|
|
|
|
i cant seem to center text in a text box. there doesn't appear to be an option for this in the toolbar. Im usin borland c++.
I don't know what to write here!!!!
|
|
|
|
|
|
How do I go about doing this?
I don't know what to write here!!!!
|
|
|
|
|
I doubt Borland C++ has such a class.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
It's been almost 15 years since I've used a Borland compiler, but can you do something like:
SetWindowLong(hwndEdit, GWL_STYLE, GetWindowLong() | ES_CENTER);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have two splitter in my window.one splitter contais treeview.another split contains property sheet with pages.based on the selection in tree i would like to change th epages in property sheets.if any body know this requirement please let me know.
|
|
|
|
|
rgchezhian wrote:
...i would like to change th epages in property sheets.
What do you mean by "change the pages?"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have property sheet.within that i have 3 pages.
based on slection (selection based on the node in a treewhich is aside in another view)i would like to chane the pages(property pages) of property sheet.
|
|
|
|
|
Sounds like a job for the sheet's SetActivePage() method.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
SetActive() is for select page among the set of pagess.but my requirement is delete the page and addpage into property sheet from another view dynamically.
|
|
|
|
|
rgchezhian wrote:
but my requirement is delete the page and addpage...
Then use RemovePage() and AddPage() respectively.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes i used but i couldn't delete or add.since i couldn't get the handle of property sheet from my treeview.
|
|
|
|
|
I am trying to centre the dialog launched by the GetOpenFileName API function. My hook function tries to centre the window in response to the WM_INITDIALOG but has no effect - the dialog still appears in the top-left corner. The hook function is definitely being called.
I've tried responding to all the messages that the hook function is called with and still nothing happens.
If anyone has any ideas what else I could try I'd be very grateful,
Thanks,
Stuart
UINT CALLBACK OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
UINT uiRetCode = 0;
switch(uiMsg)
{
case WM_INITDIALOG:
CWnd* pWnd = CWnd::FromHandle(hdlg);
if(pWnd != NULL)
{
pWnd->CenterWindow();
}
uiRetCode = 1;
};
return uiRetCode;
}
// Display file selection box
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
// Define filters. Get all link files (shortcuts)
ofn.lpstrFilter = _T("Shortcuts (*.lnk)\0*.lnk\0");
// Set the dialog title
ofn.lpstrTitle = _T("Resource Finder");
// Set the initial directory to be the All users Start Menu
ofn.lpstrInitialDir = tempString;
// Specify a buffer to hold the file selections
ofn.lpstrFile = path;
ofn.nMaxFile = MAX_BUFFER;
ofn.Flags = OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_PATHMUSTEXIST
| OFN_FILEMUSTEXIST| OFN_HIDEREADONLY | OFN_ENABLEHOOK ;
ofn.lpfnHook = OFNHookProc; //Addr of callback
// Display the dialog
int nResult = ::GetOpenFileName(&ofn);
|
|
|
|