|
hi,
1. read the structure of msg in detail,
typedef struct tagMSG {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
#ifdef _MAC
DWORD lPrivate;
#endif
} MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
wp is pMsg->wPar...
lp is pMsg->lP...
2. maybe yes, i did't check this code. you try to test it.
|
|
|
|
|
hi,
1. for pMsg, there are some other params, just only send/post wp and lp can resolve the problem?
2. ok, i will test it.but cannot now.
thank u again!
|
|
|
|
|
|
I have downdload the the fantastic control named cgfxoutbarctrl,
at http://www.codeguru.com/controls/outbar.shtml[^],now I try to chang the right view of CGfxSplitterWnd(derived from CSplitterWnd).But exception occurs when
runing it and the dialog displays "Unhandled exception in filetitle.exe(MFC42D.DLL):0x0000005 Access Violation".I found the hWnd=??? in the class pointer during debug.
Fllowing is my own code ,please tell me what's wrong with it and how to correct,thanks!!
<br />
void CMySplitterWnd::ChangeView(int row, int col, CRuntimeClass* pViewClass)<br />
{<br />
ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CView)));<br />
<br />
CView* pView = STATIC_DOWNCAST(CView, GetPane(row, col));<br />
CFrameWnd* pFrame = pView->GetParentFrame();<br />
ASSERT(pFrame);<br />
<br />
CCreateContext cc;<br />
memset(&cc, 0, sizeof(cc));<br />
cc.m_pNewViewClass = pViewClass;<br />
cc.m_pCurrentDoc = pView->GetDocument();<br />
cc.m_pNewDocTemplate = cc.m_pCurrentDoc ?<br />
cc.m_pCurrentDoc->GetDocTemplate() : NULL;<br />
cc.m_pCurrentFrame = pFrame;<br />
<br />
DeleteView(row, col);
TRACE("Rows=%d,Columns=%d",GetRowCount,GetColumnCount);<br />
VERIFY(CreateView(row, col,
pViewClass,<br />
CSize(0,0),
&cc));<br />
<br />
RecalcLayout();
<br />
CWnd* pWnd = GetPane(row, col);<br />
if (pWnd)<br />
pWnd->SendMessage(WM_INITIALUPDATE);<br />
}<br />
<br />
|
|
|
|
|
Hi all,
please tell me how can i save value of COLORREF type variable in access databse.
what type of variable use for this?
please help me for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
COLORREF is defined as typedef DWORD COLORREF;
-Saurabh
|
|
|
|
|
NUMBER with FieldSize = LONG INTEGER , see [^]
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]
|
|
|
|
|
how to set monitor frequency using vc++ code?
|
|
|
|
|
If you have sample of MSDN(I dont remember which version) it has an example for it when you run that example it shows to you a list(listbox) of frequencys and resolutions.
|
|
|
|
|
Hello,
I have created an MFC application and want to create a setu for it.
Kindly help me out.
Thanks In Advance.
Dhiraj
|
|
|
|
|
Hi,
You can use Install Shield.
or
You can Create one new Setup Project in Visual Studio.
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
use inno setup for creating setup of ur project
|
|
|
|
|
|
I can access all data from a single table.But If I want to access selected data from multiple tables then I get an error after executing.
ERROR: ORA-00903: invalid table name
DSN Name: om_ebridge.
Oracle User Name: SCOTT
Table Names: Transaction_Master,Transporter_Master,Supplier_Master,Product_Master.
CString CMyebridgeSet::GetDefaultConnect()
{
return _T("ODBC;DSN=om_ebridge");
}
CString CMyebridgeSet::GetDefaultSQL()
{
//return _T("[SCOTT].[TRANSACTION_MASTER]");(works to access data from single table.)
(But ERROR occurs if the below mentioned INNER JOIN is used to access selected data from multiple tables .Can you please help me access data).
return _T("SELECT TRANSACTION_MASTER.TRANSACTION_CODE,TRANSACTION_MASTER.VEHICLE_NO,TRANSACTION_MASTER.OPERATING_MODE,")
_T("TRANSPORTER_MASTER.transporter_name,SUPPLIER_MASTER.SUPPLIER_NAME,")
_T("PRODUCT_MASTER.PRODUCT_NAME,TRANSACTION_MASTER.unit,TRANSACTION_MASTER.Gross_Wt,TRANSACTION_MASTER.Gross_WtTime,")
_T("TRANSACTION_MASTER.Tare_Wt,TRANSACTION_MASTER.Tare_WtTime,TRANSACTION_MASTER.CONTAINER1_TAREWT,")
_T("TRANSACTION_MASTER.CONTAINER2_TAREWT ,TRANSACTION_MASTER.net_Wt,TRANSACTION_MASTER.Challan_no,TRANSACTION_MASTER.Challan_Wt,")
_T("TRANSACTION_MASTER.No_Of_Units,TRANSACTION_MASTER.Calculated_Wt,TRANSACTION_MASTER.Formula1,")
_T("TRANSACTION_MASTER.Formula2,TRANSACTION_MASTER.Formula3,TRANSACTION_MASTER.Formula4,")
_T(" TRANSACTION_MASTER.location_code,TRANSACTION_MASTER.field1,TRANSACTION_MASTER.field2,TRANSACTION_MASTER.field3 ")
_T("from PRODUCT_MASTER INNER JOIN SUPPLIER_MASTER INNER JOIN TRANSACTION_MASTER")
_T("ON SUPPLIER_MASTER.SUPPLIER_CODE =TRANSACTION_MASTER.SUPPLIER_CODE")
_T("ON PRODUCT_MASTER.PRODUCT_CODE=TRANSACTION_MASTER.PRODUCT_CODE")
_T("INNER JOIN TRANSPORTER_MASTER ON TRANSPORTER_MASTER.TRANSPORTER_CODE=TRANSACTION_MASTER.TRANSPORTER_CODE ");
}
|
|
|
|
|
Hello,
I m using Microsoft Visual Studio 6.0 editor.
When I build my application and when I Execute (ctrl + F5) my application
then again a build dialog box is get displayed (which is displayed during Build (F7)
the application) & it ask me for build the application (having option Yes, No, Cancel).
Date and time set correctly on my machine. It rebuilding just a subset of files. And same files ask for
build each time.
I 'Clean' the application & then Rebuild it, then also
this problem continues. Also I delete the 'Debug' folder from the current directory
& then Rebuild application then also that problem is not solved.
Plz give me solution.
Thanks in advance.
|
|
|
|
|
Have you tried asking here?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
How can write data in excel and pdf fle?Plz help me
|
|
|
|
|
|
All,
When I install my Win32 Service using CreateService() I am utilizing a TCHAR string (szPath) to input the full path to the service executable. However, when the service is installed instead of inputting this path to the executable it is inputting the path to the service installation executable that this code resides in.
Can someone explain to me why this would be happening?
Thanks
TCHAR szPath[MAX_PATH] = (L"\"C:\\Program Files\\Temp.exe\"");
TCHAR szStartName[50] = (L"Domain\\User");
TCHAR szStartNamePassword[50] = (L"**********");
schService = CreateService(
schSCManager,
SVCNAME,
SVCNAME,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
szPath,
NULL,
NULL,
NULL,
szStartName,
szStartNamePassword);
|
|
|
|
|
Please help me use this to create a function that will find the minimum spanning tree. I am unsure of how to use the findEdge function to find edges that I can measure their weights for to find the minimum tree. Please help. Hi this is the code for a graph from my book:
#ifndef EDGE_H
#define EDGE_H
class Edge
{
public:
int v, w, weight;
Edge(int firstVertex, int secondVertex, int edgeWeight)
{
v = firstVertex;
w = secondVertex;
weight = edgeWeight;
}
};
#endif
#ifndef GRAPH_H
#define GRAPH_H
#include <vector>
#include <list>
#include <map>
#include "Edge.h"
using namespace std;
class Graph
{
public:
int numVertices;
int numEdges;
vector<map<int, int> > adjList;
Graph(int n);
int getNumVertices() const;
int getNumEdges() const;
int getWeight(Edge e) const;
void add(Edge e);
void remove(Edge e);
map<int, int>::iterator findEdge(int v, int w);
};
#endif
#include "Graph.h"
Graph::Graph(int n)
{
map<int, int>element;
adjList.assign(n, element);
numVertices = n;
}
int Graph::getNumVertices() const
{
return numVertices;
}
int Graph::getNumEdges() const
{
return numEdges;
}
int Graph::getWeight(Edge e) const
{
return e.weight;
}
void Graph::add(Edge e)
{
int v = e.v,
w = e.w,
weight = e.weight;
adjList[v].insert(make_pair(w, weight));
adjList[w].insert(make_pair(v, weight));
numEdges++;
}
void Graph::remove(Edge e)
{
int v = e.v,
w = e.w,
weight = e.weight;
adjList[e.v].erase(w);
adjList[e.w].erase(v);
numEdges--;
}
map<int, int>::iterator Graph::findEdge(int v, int w)
{
map<int, int> m = adjList[v];
map<int, int>::iterator iter = m.find(w);
return iter;
}
|
|
|
|
|
the algorithm and code is explained in many papers. Just google it.
the next thing is that, if this is not your homework, you can use
Boost Graph Library. It supports both Kruskal and Prim's algorithms.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
#include<iostream.h>
#include<string.h>
enum Status{outoforder,ok};
//enum bool{false,true};
template <class T>
class List{
public :
List () { }
List (int s){
maxSize=s;
used=0;
a= new T [maxSize];
}
//~List () { delete []a;}
bool addObjects(T p){
if (!isFull()){
a[used]=p;
used ++;
return true;
}
else
return false;
}
int getMaxSize() { return maxSize;}
int getUsed() { return used;}
bool setObject (int index,T p )
{ if ((index <used )&&(index>=0)){
a[index]=p;
return true;
}
else
return false;
}
bool getObject (int index,T &p )
{ if (!isEmpty()) {
if ((index <used )&&(index>=0)){
p=a[index];
return true;
}
else
return false;
}
else
return false;
}
int isFull() { return used==maxSize;}
int isEmpty () { return used==0;}
private :
T *a;
int maxSize;
int used;
};
class HardDisk{
public:
HardDisk(){}
HardDisk(int c){cap=c;}
void setHd(int c){cap=c;}
int getHd(){return cap;}
private:
int cap;
};
class Processor{
public:
Processor(){}
Processor(float c){Cs=c;}
void SetPro(float c){Cs=c;}
float getPro(){return Cs;}
private:
float Cs;
};
class Ram{
public:
Ram(){}
Ram(int c){Cap=c;}
void setRam(int c){Cap=c;}
int getRam(){return Cap;}
private:
int Cap;
};
class Monitor{
public:
Monitor(){}
Monitor(char *t){strcpy(Type,t);}
void setM(char *t){strcpy(Type,t);}
char* getM(){return Type;}
private:
char Type[15];
};
class Keyboard{
public:
Keyboard(){}
Keyboard(char *t){strcpy(Type,t);}
void setK(char *t){strcpy(Type,t);}
char* getK(){return Type;}
private:
char Type[15];
};
class Mouse{
public:
Mouse(){}
Mouse(char *t){strcpy(Type,t);}
void setMo(char *t){strcpy(Type,t);}
char* getMo(){return Type;}
private:
char Type[15];
};
class CdRom{
public:
CdRom(){}
CdRom(char *t){strcpy(Type,t);}
void setCd(char *t){strcpy(Type,t);}
char* getCd(){return Type;}
private:
char Type[15];
};
class Speaker{
public:
Speaker(){}
Speaker(char* s){Size=s;}
void setSpeaker(char* s){Size=s;}
char* getSpeaker(){return Size;}
private:
char* Size;
};
class Computer{
public:
Computer(){}
Computer(Status s, int h,float pr,int rm,char* m,char *kb,char *mon):hd(h),p(pr),r(rm),m(mon),mo(m),k(kb){
status=s;}// cd=NULL;s=NULL;}
void setStatus(Status s){status=s;}
Status getStatus(){return status;}
void setHardDisk(int h){hd.setHd(h);}
int getHardDisk(){return hd.getHd();}
void setProcessor(float pr){p.SetPro(pr);}
float getProcessor(){return p.getPro();}
void setRam(int ra){r.setRam(ra);}
int getRam(){r.getRam();}
void setMonitor(char *mo){m.setM(mo);}
char *getMonitor(){return m.getM();}
void setKeyboard(char *ke){k.setK(ke);}
char *getKeyboard(){return k.getK();}
void setMouse(char *m){mo.setMo(m);}
char *getMouse(){return mo.getMo();}
void setCd(char *c){
if(cd!=NULL)
cd->setCd(c);
}
char * getCd(){
if(cd!=NULL)
return cd->getCd();
else
return NULL;
}
void setSpeaker(char *c){
if(s!=NULL)
s->setSpeaker(c);
}
char * getSpeaker(){
if(s!=NULL)
return s->getSpeaker();
else
return NULL;
}
int addSpeaker(char *t){
if(s==NULL){
s=new Speaker(t);
return 1;
}
else
return 0;
}
int removeSpeaker(){
if(s!=NULL){
delete s;
return 1;
}
else
return 0;
}
int addCd(char *t){
if(cd==NULL){
cd=new CdRom(t);
return 1;
}
else
return 0;
}
int removeCd(){
if(cd!=NULL){
delete cd;
return 1;
}
else
return 0;
}
/* void print(){
cout<<"\n.....................................\n";
cout<<"Status = "<<status<<endl;
cout<<"Hard Disk = "<<getHardDisk()<<endl;
cout<<"Processor = "<<getProcessor()<<endl;
cout<<"Ram = "<<getRam()<<endl;
cout<<"KeyBoard = "<<getKeyboard()<<endl;
cout<<"Monitor = "<<getMonitor()<<endl;
cout<<"Mouse = "<<getMouse()<<endl;
if(cd!=NULL){
{ cout<<"CDROM = "<<getCd()<<endl;}
else
cout<<"No CD Rom "<<endl;
if(s!=NULL){
cout<<"Speaker = "<<getSpeaker()<<endl;
else
cout<<"No Speaker "<<endl;
}
} */
private:
Status status;
HardDisk hd;
Processor p;
Ram r;
Monitor m;
Keyboard k;
Mouse mo;
CdRom *cd;
Speaker *s;
};
class Lab{
public:
Lab(int no , int size):ls(size){
labno=no;
}
int addComputer(Computer p){return ls.addObjects(p);}
void printComputer(){
Computer t;
for(int i=0;i<ls.getUsed();i++){
ls.getObject(i,t);
//t,print();
}
}
private:
int labno;
List <Computer> ls;
};
void main(){
Lab l1(1,10),l2(2,10),l3(3,10);
Computer ob (ok,80,2000,1,"Ball","Standard","14 in Flat ");
//ob.print();
l1.addComputer(ob);
}
|
|
|
|
|
I wouldn't expect much help with a question like that.
Why not tell us what kinds of problems you are having with this code?
That'd be a good start.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
iam facing these errors when i run the code can u plz help me fix them
1. functions containing for are not expanded inline.
2. functions containing missing return statements are not expanded.
3. tye name expected.
4. declaration missing ;
5. undefinid symbol 'a'
6. 'addobjects' is not a member of 'list <computer>'.
|
|
|
|
|