Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • 0 Votes
    9 Posts
    2 Views
    L
    Well, I am beginning to wonder if you put any effort into searching yourself? I searched codeproject and found this article: Using the Windows RunFile Dialog - The Documented and Undocumented Way [^] samtoad wrote: access from the sidebar I think you mean from a Sidebar Gadget[^]? If so then you might be better off asking in the javascript forum. According to this documentation IShellDispatch.FileRun method[^] you should be able to do this in javascript. Note that I don't have any experience whatsoever in creating these sidebar gadgets but I *think* you should be able to edit the "Hello World"[^] gadget and add: var objShell = new ActiveXObject("shell.application"); objshell.FileRun(); I would suggest the javascript forum[^] or maybe the Microsoft sidebar development forum[^].
  • Beginner problem c++

    help c++ json question learning
    3
    0 Votes
    3 Posts
    0 Views
    L
    begzz wrote: But i get an error We cannot guess what error you get. Please edit your question, show the actual code you are using, the error that you get and where in the code it occurs.
  • Setting Up Visual Studio Code & MinGW

    question csharp c++ visual-studio
    3
    0 Votes
    3 Posts
    0 Views
    D
    The most common cause of that error is the executable your trying to compile is already running, probably from a previous launch of the app you never closed. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • Prime Number Code C

    question data-structures
    3
    0 Votes
    3 Posts
    0 Views
    D
    iHuy wrote: How do I do it? Can you do it on paper? If not, then trying to code such an algorithm is not going to work (unless someone just outright gives you the code). "One man's wage rise is another man's price increase." - Harold Wilson "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
  • vs2019 + v71 + v80

    visual-studio csharp help question announcement
    19
    0 Votes
    19 Posts
    2 Views
    N
    Oxford-Heathrow Airport taxi transfers: taxi to Heathrow & taxi from Heathrow Airport. AtoB airport taxi picks you up at Heathrow airport and take to Oxford. Taxi to Heathrow & Taxi from Heathrow Airport | AtoB Taxi[^]
  • i need your help

    help graphics tutorial
    2
    0 Votes
    2 Posts
    0 Views
    V
    Member 14982052 wrote: i am stuck in how to implment operator overloaded for multiplication and addition, i mean should i creat a class for this operation or should i implment them in the main and how to do this. You should (have to) implement them in your matrix class. See the example: [beginner - C++ operator overloading for matrix operations - follow-up - Code Review Stack Exchange](https://codereview.stackexchange.com/questions/149669/c-operator-overloading-for-matrix-operations-follow-up)
  • Why Python is Popular Language?

    python php com question learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    10 Posts
    1 Views
    L
    Richard Andrew x64 wrote: Is it possible to declare a variable of type "class"? No, because class is an abstract concept, not a type in the same sense that int is. The actual type will be the name used in the class definition. For example consider the following: class Foo { public: Foo() { std::cout << "Constructing a Foo object" << std::endl; } }; int main(int argc, char** argv) { Foo aFoo; Foo* pFoo = new Foo(); } A new object aFoo is created and stored on the local stack. A second new object is instantiated on the heap and its address passed back to be stored in the pointer pFoo. The type of both objects is Foo not class. Does that make sense?
  • 0 Votes
    2 Posts
    0 Views
    CPalliniC
    I would have written something similar to #include #define EMPLOYEE_ARRAY_SIZE 10 #define NAME_MAX_LENGTH 30 #define NOT_FOUND -1 struct employee { int id; char name[NAME_MAX_LENGTH]; }; int find_employee_by_id( const struct employee emp_array[], int emp_array_size, int id); void print_employee( const struct employee * pemp ); int main() { struct employee emp_array[EMPLOYEE_ARRAY_SIZE] = { { 1, "foo"}, {2, "boo"}, {3, "goo"}, // .. other items here }; int id = 2; int index = find_employee_by_id( emp_array, EMPLOYEE_ARRAY_SIZE, id ); if ( index != NOT_FOUND ) { printf("found emplyee details:\n"); print_employee( & emp_array[index] ); } else { printf("employee with id = %d not found\n", id); } return 0; } int find_employee_by_id( const struct employee emp_array[], int emp_array_size, int id) { int index; for (index = 0; index < emp_array_size; ++ index) if ( emp_array[index].id == id) return index; return -1; } void print_employee( const struct employee * pemp ) { printf("id = %d\n", pemp->id); printf("name = %s\n", pemp->name); } "In testa che avete, Signor di Ceprano?" -- Rigoletto
  • 0 Votes
    11 Posts
    0 Views
    V
    David Crow already answered it: [Re: How to convert my MDI Application to open each window as a separate instance of the application - C / C++ / MFC Discussion Boards](https://www.codeproject.com/Messages/5757598/Re-How-to-convert-my-MDI-Application-to-open-each)
  • 0 Votes
    8 Posts
    2 Views
    S
    No. Notice I suggested defining partially specialised templates, not the ones in - this is because the OPs problem was because of a template parameter deduction failure due to a mix of LONG and int parameters being passed to min/max. Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
  • queues to find minimum time to serve all.

    help data-structures tutorial learning
    4
    0 Votes
    4 Posts
    0 Views
    D
    fecomevi wrote: Can you help please, it is a problem just to learn about how to approach queue problems. A queue is a FIFO data structure. What exactly are you doing with it? Are you using std::queue, or a home-grown version? What code do you have in place so far? "One man's wage rise is another man's price increase." - Harold Wilson "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
  • Abort Retry and Ignore and SEH

    14
    0 Votes
    14 Posts
    0 Views
    Greg UtasG
    That kind of retry is possible, but it's unusual. My background was also telecom switches, and we used pools of fixed-size blocks, each dedicated to a specific subsystem, instead of a heap. It was similar to what I describe in this article[^], in which an orphaned block gets recovered by a background garbage collector if it remains unclaimed by the application that allocated it. Robust Services Core | Software Techniques for Lemmings | Articles The fox knows many things, but the hedgehog knows one big thing.
  • EACCES file from Ftpfolder

    json
    6
    0 Votes
    6 Posts
    0 Views
    L
    ForNow wrote: Guess Impossible to do more.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • RPC interface does not work correctly

    help csharp c++ sysadmin question
    3
    0 Votes
    3 Posts
    0 Views
    C
    Hello, thanks for the hint. I´ve already scoured this page. In my application the server and client works with "endpoint" definition not with ports. As I said. Processes that are written in C ++ communicate with one another, as do the processes that are written in C #. This is not a problem. No communication between processes written in C ++ and processes written in C #. If someone has these problems in the same way, I would be happy to hear from you. Thanks a lot CopWorker
  • std::cout inside of object

    question learning
    11
    0 Votes
    11 Posts
    0 Views
    V
    Maybe it was marius. Sometimes he refused alcohol. This picture is from 2009: [https://forums.codeguru.com/attachment.php?attachmentid=29815&d=1237155757\](https://forums.codeguru.com/attachment.php?attachmentid=29815&d=1237155757)
  • Best MMO Games

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Blum Blum Shub

    c++ help question
    22
    0 Votes
    22 Posts
    0 Views
    L
    That should already work, but you can add another set of parenthesis to make sure: x[i] = (rand() * (x[i-1] * x[i-1])) % M; So the random number times the square of x[i-1] should be calculated first.
  • Insert or embed File Dialog in a CPropertyPage

    c++ question com discussion
    2
    0 Votes
    2 Posts
    0 Views
    V
    The AFX_IDD_FILEOPEN is defined in afxres.h that is by default #incuded in your resource.h file.