|
You could try moving the frame window via MoveWindow or SetWindowPos , making it 1 pixel taller or wider. This would force it to resize the splitters, just like if the user had done it.
Software Zen: delete this;
|
|
|
|
|
Just got back from a little time away...
Tried that suggestion, but it has ill effects if the window is maximized!
I give up!
Thanks anyway.
|
|
|
|
|
If the window is maximized, reduce the size of the window by one pixel.
Software Zen: delete this;
|
|
|
|
|
Hi all,
I need to reboot computer in my VC++ project.
How to do it?
Thanks in advance.
Laura
|
|
|
|
|
With ExitWindowsEx .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Man, windows sucks. Back in the good old days, a simple "memcpy (0, "TRASH MY LITTLE MEMORY BABY", 1000);" would work wonders.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
roflol
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
It feels like Friday, doesn't it?
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
I have written a program that contains a CDocument derived class. The
user can create a document that is a template. Basically, the document
contains a list of objects like IMAGEBOXES, BORDERS, and CAPTIONS which
the user positioned on the document. This is all working fine. The user
can save and open the document.
Now, part 2. I have another application that needs to be able to open the
first program's document. However, rather than moving the document
objects around, this program needs to let the user specify what images go
in the IMAGEBOXES, what color the BORDERS should be, and what text should
go in the CAPTIONS. Also, this program does not modify the "template"
document. It needs to save a different document.
What is the logical way to implement this?
Should I just include the document class from the first program in the
second?
Can I just use the first program's document in the second program without
the view?
I do need the same basic view functionality in the second program (i.e.
drawing the IMAGEBOXES, BORDERS, and CAPTIONS. Should I use the first
program's view as well?
I don't know what my next step should be. Perhaps I should just write new
document and view classes that contain copy-and-paste pieces from the
original classes (but I want code changes for one to be reflected in the
other with the smallest chance of error).
--
If it starts to make sense, you're in a cult.
|
|
|
|
|
What about creating a base document class with all the common code for each application, and then have derived classes for the different apps. Copy and paste is not the way to go in the OO/C++ world.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
if i have to print 'u' then i have to execute this line
SendMessage(hTestWnd, WM_CHAR, (WPARAM) 'u', (LPARAM) 0);
but if i have to print character like
1-:
2-"
3-?
4->
etc
it does not work what to do?
SendMessage(hTestWnd, WM_CHAR, (WPARAM) ':', (LPARAM) 0);
r00d0034@yahoo.com
|
|
|
|
|
What does the MSDN say ? I seem to recall that the higher half of your WPARAM value needs to be set to something other than 0 for non alpha characters, maybe ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
yea it should contain contains the scan code plus the virtual-key code.
let suppose i have both the scan code and virtual key code then how to form wparam from it ?
how to get scan code and virtual key code from wparam?
r00d0034@yahoo.com
|
|
|
|
|
It appears Norm has provided a better answer anyhow.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
SendInput
The SendInput function synthesizes keystrokes, mouse motions, and button clicks.
UINT SendInput(
UINT nInputs, // count of input events
LPINPUT pInputs, // array of input events
int cbSize // size of structure
);
|
|
|
|
|
Cool, Norm. I guess it WAS worth his while to keep asking this question for weeks. I had no idea this API existed....
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thats what we're hear for
|
|
|
|
|
i have an MDI application and I am able to save the Document . Now before the Document is saved and the FileDialog invoked i need to save some parameters . If i implement "ONFileSave()" in my view class I no longer get the File Dialog prompt.
I need to be achieving both .
1. Saving my changes
2. Then call the default save mechanism of windows
Also in the FileDialog that appears how do I specify the type of the File (i.e File FIlter). I want my documents to be saved with my custom File extension .
Please help
|
|
|
|
|
(Not sure) Try calling your document's OnFileSaveAs message handler inside yours.
If this does not work, Nish has written an article that may help you: CDocument::DoSave revealed[^].
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i am having a window hwnd and i want to get its child window hwnd that has keyboard focus.
how to get it
r00d0034@yahoo.com
|
|
|
|
|
|
How do I determine the default browser of an NT-based (that is, NT 4/2k/XP/.NET) system? Is there an API call?
Actually, the simplest solution is to call ShellExecute() and just launch the HTML file. Is there a way to get an HWND for a console application?
Barring that, I need to determine the default browser, launch it, and have it open a specified URL.
Jon Sagara
If you think of wheat fields as questionable metaphors, you can think of me as the state of Kansas.
-- Mike Blaszczak
|
|
|
|
|
I'm going to create a temporary window (::CreateWindow()), and then use that to call ShellExecute(). Can anyone see any problems with this strategy? Is there a better way to do this?
Jon Sagara
If you think of wheat fields as questionable metaphors, you can think of me as the state of Kansas.
-- Mike Blaszczak
|
|
|
|
|
It appears you can just pass in NULL for the HWND.
Jon Sagara
If you think of wheat fields as questionable metaphors, you can think of me as the state of Kansas.
-- Mike Blaszczak
|
|
|
|
|
I've looked at the MSDN example, but the pEnum->Next function returns S_FALSE which means that the number of filters that were requested to be enumerated, wasn't enumerated.
IGraphBuilder *pGraph = NULL;
IEnumFilters *pEnum = NULL;
IBaseFilter *pFilter = NULL;
ULONG cFetched;
HRESULT err;
<br>
CoInitialize(NULL);
err = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder,(void**)&pGraph);
pGraph->EnumFilters(&pEnum);
<br>
while((err = pEnum->Next(1, &pFilter, &cFetched)) == S_OK)
{
FILTER_INFO fiFilterInfo;
char szFilterName[256];
pFilter->QueryFilterInfo(&fiFilterInfo);
WideCharToMultiByte(CP_ACP, 0, fiFilterInfo.achName, -1, szFilterName, 256, 0, 0);
SendMessage(GetDlgItem(ghWnd, IDC_FILTERS), LB_INSERTSTRING, -1, (LPARAM)szFilterName);
fiFilterInfo.pGraph->Release();
pFilter->Release();
}
<br>
pEnum->Release();
pGraph->Release();
CoUninitialize();
}
All help is apprecaited! Thanks all
-Rune Svendsen
|
|
|
|
|