|
Simply Add this code to WM_LBUTTONDOWN event :
void CYourDialog::OnLButtonDown(UINT nFlags, CPoint point)
{
CDialog::OnLButtonDown(nFlags, point);
PostMessage( WM_NCLBUTTONDOWN, HTCAPTION,MAKELPARAM( point.x, point.y));
}
Thats it!!!
m0n0
|
|
|
|
|
thanxs to all, it works super!
mfg
mirsad
|
|
|
|
|
Hello friends,
Would anybody let me know how can I view a TIFF file in SDK, please, it's urgent , if possible could you send me the code? I will be grateful!!!
Thanks a million,
warm regards,
Sanjay Khapre.
Software Developer
Sanjay Khapre
|
|
|
|
|
The drop down list of Combobox wont appear and i am buffled.
There are elements in the list as i can still see then when i press the Up arrow key, but the drop down list just won't appear
please help
|
|
|
|
|
aaah...well in the dialog view make sure that u have set a width for ur combobox.....u can do thiz by setting the width at the dialog view or dynamically by codeing in teh oninitDialog();
if it is in the dialog view just select the combobox(a hightlighting box appearz),now click on the dropdown arrow,and pull down the combobox downwardz to the width u want.....
if u want the width to be set thru coding,then see the below link in cp.....
http://www.codeproject.com/combobox/combobox_tut.asp[^]
hope that helpz u out!!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
I want to use tool tips in my listview window, so I followed instruction described in MSDN to add EnableToolTips() in the class initializing code. But something strange is that there is no TTN_NEEDTEXT sent from the control. I use the following code to check if there is any TTN_NEEDTEXT notification message:
BOOL CMotorolaView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
NMHDR * pNmhdr=(NMHDR*)lParam;
if (pNmhdr->code==TTN_NEEDTEXT)
TRACE0("Got TTN_NEEDTEXT message");
return FALSE;
}
Can anyone tell me is there anything wrong with my code?
Lisoft
|
|
|
|
|
lisoft wrote:
TTN_NEEDTEXT sent from the control.
Have you set the control to send the notify message? Notify = TRUE in the resource editor?
Artificial intelligence is no match for natural
stupidity.
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
I should write an application which should monitor every print request on a machine and save it in a log file.
Basically whenever user print something on a computer either from application either using ALT+PrintScr, my application should make a line in a log file identifying user currently working application that has requested printing and printer (local or network) that has performed this task.
Any recommendations where should I start?
Regards,
MomirZ
|
|
|
|
|
Why would someone use it?
Would the application constantly be on, in background memory? Would it be a script thats triggered when printer is called? Dont printers already log everything that is done, what would be different?
Network wise this might serve a purpose, multiple computers or multiple printers, having a joint log... But dont individual computers already log their actions if needed?...
Just my input, i dont mean to offend you in anyway...
Its a good idea, but what would be different towards the printers already written log, and why would people want a program constantly running in the background to eat up memory?... Maybe im not understanding your idea...
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
Thanks for your questions, I really see that my question is
I am trying to help to one of my colleagues who is an administrator of a quite large network.
His request is a result of complexity of analyzing print log files. His network have about 1000 computers and about 350 printers (plotters, cutters, etc...) Part of those are connected to workstation and those can be used only from that workstation, others are connected to workstation and are shared within one workgroup, and some of the printers are true network printers having their own print servers built in.
Now , he would like to have an easy way for making statistics (by examining log files) about usage of every printer.
Application that I am interested about should be constantly on (or work as a service), on every workstation, watch for print requests, and make a log file.
Another application that have to be installed on one of the servers (with which I have no problems of implementing) should pick those log files from workstations and prepare them for statistical analysis.
I have an broad idea how to start this project but I would like to hear opinions from people who have experience or ideas how this should be done.
Until now I haven’t been in a position to deal with printing (except of regular printing of documents from application).
Regards,
MomirZ
|
|
|
|
|
In my MDI project,there are many documents and views ,but each document have only one view .In a TreeCtrl ,when i doubleclick the tree item,the application will across the item type to creat new document and new view ,and i want to place all the document in a DocTemplate so that it will have only one file when saved.
but with this idea,I have many questions,how to create a document and create a view associate with it ,how to add these documents to the DocTemplate ,and the most important of all ,how to save these document in
the DocTemplate?
please give me some help or a demo ,Thanks!
|
|
|
|
|
I want to use Intel MMX/SSE/SSE2 instructions to optimze my video codec. HOwever, when I try a demo H.264 code with MMX/SSE instructions, the complier promts that MMX/SSE is not supoorted by my Visual C++.
What should I do to make my Visual C++ support MMX/SSE? Thanks in advance. Please send Email to my email box:gbyang@sohu.com
|
|
|
|
|
This sounds very simple, well I have a little problem trying to do that in VC++. I created a form application with .Net and the default form is perfect. I added the second one and for some reason when I include the second form's header it give me an error:
ObjIdl.h(246) : warning C4935: assembly access specifier modified from 'public'
ObjIdl.h(258) : warning C4935: assembly access specifier modified from 'public'
ObjIdl.h(7408) : error C2872: 'IDataObject' : ambiguous symbol
could be ObjIdl.h(246) : System::Windows::Forms::IDataObject IDataObject'
or 'stdafx.cpp(0) : System::Windows::Forms::IDataObject'
ObjIdl.h(7422) : fatal error C1903: unable to recover from previous error(s);
Well if anyone knows how to fix this...
Kamui
|
|
|
|
|
Have you put a using System::Windows::Forms in your stdafx.h file?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a CListControl. I can already tell when a user clicks on an item in the list control (I then update an edit control with the currently selected text from the list control), but I want to be able to capture the selection changes as a user scrolls up and down with the arrow keys. (As the selection changes, I want to update an edit control with the same text that is currently high-lighted in the list control).
E pluribus chumpus, unum chump patria.
|
|
|
|
|
I think you are using the CListControl_click event to update the control's right.
I that case if you want to be able to change capture with the keyboard key press I think is better to use the onValueChange event (or something like that) that way if the user click again on the same value you don't update it just stays the same. LESS process consuming.
Kamui
|
|
|
|
|
Handle LVN_ITEMCHANGED and look at the old/new state flags. When the old state does not contain the LVIS_SELECTED bit, and the new state does, that item is now selected.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Hello!
I'm having a problem writing string objects to a file. I just learned file I/O and am not quite sure what the problem is. I am using a string object
(basic_string<char *> ) and it doesn't seem to like what I am doing. here is some sample code:
#include <fstream>
using namespace std;
#include <cstring>
ofstream myFile("file.txt");
int main()
{
string myBuffer("Some text");
myFile.write(myBuffer, myBuffer.size());
myFile.close();
return 0;
}
this does not like my string going into the file. I have also tried the extraction operation << with it, but it says it is not defined... I thought the function fstream & operator<<(string & someString) was defined in the string class... any help?
|
|
|
|
|
|
well, that would work using the CString class, but I'm trying to use the typedef'd string class from basic_string<char *>
I believe it is in the <string> header file...
I've never used the CString class(that I know of, and I'm trying to stick to using the one I'm used to..
It doesn't work using
#include <string>
basic_string<char *> myString
myOutputFile << myString;
|
|
|
|
|
myFile.write(myBuffer, myBuffer.size()); That won't do what you want. You want to write the contents of the string, not the object itself, so do:
myFile.write(myBuffer.c_str(), myBuffer.size());
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
thanks very much! that's what I was looking for
|
|
|
|
|
Hello friends Is it possible to open a image JPEG into CDialog????, because, All the peolple make a example to open as backgound, or other classes but NEVER open in a CDialog, why??, I don't know how is it?, I review the library GDI.
Is it possible to open in a CStatic??? or a CEdit???, or a CList???.
Please If somebody know How I can to make it, help me with that.
The Best Regards
NiponWare
|
|
|
|
|
You can load a jpg with GDI+, and paint it on whatever you want. You can handle WM_ERASEBACKGROUND to do this.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hello, do you have any examples about that??.
Regards
NiponWare
|
|
|
|